~kiwec/dotfiles

0dd59fef5c3a6244f8613e17ff121c11dc6159e8 — Wolf Clément 4 years ago 0fd8b8a
Reinstallation 2016
11 files changed, 339 insertions(+), 197 deletions(-)

M .Xdefaults
D .bashrc
A .config/i3/config
A .config/i3/i3blocks.conf
A .config/i3/wallpaper.png
A .config/redshift/hooks/brightness.sh
D .conkyrc
D .i3/config
D .i3/statusline
A .xinitrc
A .zshrc
M .Xdefaults => .Xdefaults +20 -29
@@ 1,46 1,37 @@
URxvt.scrollstyle: plain
URxvt.font: xft:Inconsolata\ for\ Powerline:pixelsize=18:antialias=true:hinting=true
URxvt.boldFont: xft:Inconsolata\ for\ Powerline:bold:pixelsize=18:antialias=true:hinting=true
URxvt.scrollBar: False
URxvt.saveLines: 42000
URxvt.perl-ext-common: default.matcher
URxvt.urlLauncher: palemoon
URxvt.matcher.button: 1

! --==Colors==--
! special
*.foreground:   #dcdcdc
*.background:   #2d2d2d
*.cursorColor:  #dcdcdc
*.foreground:   #c5c8c6
*.background:   #1d1f21
*.cursorColor:  #c5c8c6

! black
*.color0:       #2d2d2d
*.color8:       #8c8c8c
*.color0:       #282a2e
*.color8:       #373b41

! red
*.color1:       #d64937
*.color9:       #d68176
*.color1:       #a54242
*.color9:       #cc6666

! green
*.color2:       #5cd637
*.color10:      #8cd676
*.color2:       #8c9440
*.color10:      #b5bd68

! yellow
*.color3:       #d68737
*.color11:      #d6a676
*.color3:       #de935f
*.color11:      #f0c674

! blue
*.color4:       #3763d6
*.color12:      #7690d6
*.color4:       #5f819d
*.color12:      #81a2be

! magenta
*.color5:       #9837d6
*.color13:      #aa71ce
*.color5:       #85678f
*.color13:      #b294bb

! cyan
*.color6:       #37b1d6
*.color14:      #76c0d6
*.color6:       #5e8d87
*.color14:      #8abeb7

! white
*.color7:       #b4b4b4
*.color15:      #dcdcdc
*.color7:       #707880
*.color15:      #c5c8c6


D .bashrc => .bashrc +0 -36
@@ 1,36 0,0 @@
# If not running interactively, don't do anything
[[ $- != *i* ]] && return

# Prompt
set_prompt () {
	Last_Command=$?
	Green='\[\e[01;32m\]'
	Red='\[\e[01;31m\]'
	Reset='\[\e[00m\]'
	White='\[\e[01;37m\]'
	PS1="$White\\w"
	if [[ $Last_Command == 0 ]]; then
		PS1+="$Green"
	else
		PS1+="$Red"
	fi
	if [[ $EUID == 0 ]]; then
		PS1+="#"
	else
		PS1+="$"
	fi
	PS1+="$Reset "
}
PROMPT_COMMAND='set_prompt'

alias ls='ls -Ahlq --color=tty'
alias pamixer='python2 ~/.bin/pulseaudio-mixer-cli.py'
alias cal='cal -m'
alias kssh='ssh root@ocean.kiwec.net'
alias redsky='node ~/Documents/GitHub/redskycli/index.js'
alias ga='git add --all'
alias vi='nvim'
alias vim='nvim'
alias wine='WINEARCH="win32" wine'
alias winetricks='WINEARCH="win32" winetricks'


A .config/i3/config => .config/i3/config +147 -0
@@ 0,0 1,147 @@
set $mod Mod4
floating_modifier $mod

font pango:agave 8

# Media keys
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 3%+ unmute
bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 3%- unmute
bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle
bindsym XF86AudioPlay exec --no-startup-id mpc toggle
bindsym XF86AudioNext exec --no-startup-id mpc next
bindsym XF86AudioPrev exec --no-startup-id mpc prev

# start a terminal
bindsym $mod+Return exec --no-startup-id xterm -fa agave -fs 10

# kill focused window
bindsym $mod+Shift+A kill

# start dmenu (a program launcher)
bindsym $mod+r exec --no-startup-id dmenu_run -b -nb \#1b1b1b -nf \#999999 -sb \#1990B7 -sf \#1c1c1c -fn "agave-8"

# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+m focus right

# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+M move right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# split in horizontal orientation
bindsym $mod+h split h

# split in vertical orientation
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+z layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# focus the parent container
bindsym $mod+q focus parent

# focus the child container
#bindsym $mod+d focus child

# switch to workspace
bindsym $mod+ampersand workspace 1
bindsym $mod+eacute workspace 2
bindsym $mod+quotedbl workspace 3
bindsym $mod+apostrophe workspace 4
bindsym $mod+parenleft workspace 5
bindsym $mod+minus workspace 6
bindsym $mod+egrave workspace 7
bindsym $mod+underscore workspace 8
bindsym $mod+ccedilla workspace 9
bindsym $mod+agrave workspace 10

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+eacute move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+egrave move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+ccedilla move container to workspace 9
bindsym $mod+Shift+agrave move container to workspace 10

# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym j resize shrink width 10 px or 10 ppt
        bindsym k resize grow height 10 px or 10 ppt
        bindsym l resize shrink height 10 px or 10 ppt
        bindsym m resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keys
        bindsym Left resize shrink width 10 px or 10 ppt
        bindsym Down resize grow height 10 px or 10 ppt
        bindsym Up resize shrink height 10 px or 10 ppt
        bindsym Right resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
}

bar {
        status_command		i3blocks -c ~/.config/i3/i3blocks.conf
	position		top
	strip_workspace_numbers	yes
	workspace_buttons	yes
	tray_output		primary
	separator_symbol	" "
	colors {
		background		#1b1b1b
		separator		#ffffff
		statusline		#999999
		focused_workspace	#000000 #1990B7 #1c1c1c
		active_workspace	#000000 #1b1b1b #999999
		inactive_workspace	#000000 #1b1b1b #999999
		urgent_workspace	#000000 #ff5151 #1c1c1c
	}
}

for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable

exec --no-startup-id redshift -l 48.58:7.67
exec --no-startup-id feh --bg-scale ~/.config/i3/wallpaper.png
exec --no-startup-id mpd

A .config/i3/i3blocks.conf => .config/i3/i3blocks.conf +29 -0
@@ 0,0 1,29 @@
command=/usr/lib/i3blocks/$BLOCK_NAME
separator_block_width=15
markup=none

[mediaplayer]
interval=5
signal=10

[disk]
label=⌂
interval=30

[cpu_usage]
label=⚙
interval=10

[volume]
label=♪
instance=Master
interval=5

[battery]
label=BAT
label=⚡
interval=30

[time]
command=date '+%Y.%m.%d %H:%M:%S'
interval=5

A .config/i3/wallpaper.png => .config/i3/wallpaper.png +0 -0
A .config/redshift/hooks/brightness.sh => .config/redshift/hooks/brightness.sh +27 -0
@@ 0,0 1,27 @@
#!/bin/sh

# Set brightness via xbrightness when redshift status changes

# Set brightness values for each status.
# Range from 1 to 100 is valid
brightness_day="100"
brightness_transition="50"
brightness_night="10"
# Set fade time for changes to one minute
fade_time=60000

case $1 in
	period-changed)
		case $3 in
			night)
				xbacklight -set $brightness_night -time $fade_time
				;;
			transition)
				xbacklight -set $brightness_transition -time $fade_time
				;;
			daytime)
				xbacklight -set $brightness_day -time $fade_time
				;;
		esac
		;;
esac

D .conkyrc => .conkyrc +0 -27
@@ 1,27 0,0 @@
### Conky configuration fil
#e
out_to_x no
own_window no
out_to_console yes
double_buffer no
background no
update_interval 2.0
total_run_times 0
short_units yes
if_up_strictness addressone
use_spacer left
override_utf8_locale no
cpu_avg_samples 2
default_color FF0000
update_interval 0.01

TEXT
[{ "full_text" : " ${exec mpc -f "%file%" | head -1}" , 
"color" : 
"\#d68176" },\
 { "full_text" : " ${fs_used /} /${fs_size}", "color":"\#d68176"},\
 { "full_text" : " ${fs_used /home} /${fs_size /home}" , "color" : "\#d68176" },\
 { "full_text" : " ${exec amixer get Master -M | grep -oEm 1 "[[:digit:]]*%"}", "color" : 
"\#d68176" },\
 { "full_text" : " ${time %a %d-%m-%y}", "color":"\#d68176"},\
 { "full_text" : " ${time %H:%M:%S}", "color" : "\#d68176"}],

D .i3/config => .i3/config +0 -100
@@ 1,100 0,0 @@
font pango:Terminus 10

# Media keys
bindsym XF86AudioRaiseVolume exec amixer -q set Master 3%+ unmute
bindsym XF86AudioLowerVolume exec amixer -q set Master 3%- unmute
bindsym XF86AudioMute exec amixer -q set Master toggle
bindsym XF86AudioPlay exec mpc toggle
bindsym XF86AudioNext exec mpc next
bindsym XF86AudioPrev exec mpc prev

# use Mouse+Mod4 to drag floating windows to their wanted position
floating_modifier Mod4

# start a terminal
bindsym Mod4+Return exec urxvt

# kill focused window
bindsym Mod4+Shift+q kill

# start dmenu (a program launcher)
bindsym Mod4+r exec dmenu_run

# alternatively, you can use the cursor keys:
bindsym Mod4+Shift+Left move left
bindsym Mod4+Shift+Down move down
bindsym Mod4+Shift+Up move up
bindsym Mod4+Shift+Right move right

# split in horizontal orientation
bindsym Mod4+w split h

# split in vertical orientation
bindsym Mod4+v split v

# enter fullscreen mode for the focused container
bindsym Mod4+f fullscreen toggle

# toggle tiling / floating
bindsym Mod4+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym Mod4+space focus mode_toggle

# switch to workspace
bindsym Mod4+d workspace 1
bindsym Mod4+h workspace 2
bindsym Mod4+t workspace 3
bindsym Mod4+n workspace 4
bindsym Mod4+s workspace 5

# move focused container to workspace
bindsym Mod4+Shift+d move container to workspace 1
bindsym Mod4+Shift+h move container to workspace 2
bindsym Mod4+Shift+t move container to workspace 3
bindsym Mod4+Shift+n move container to workspace 4
bindsym Mod4+Shift+s move container to workspace 5

# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym Mod4+Shift+r restart

# resizing
bindsym Mod4+a resize shrink width 10 px or 10 ppt
bindsym Mod4+e resize grow height 10 px or 10 ppt
bindsym Mod4+comma resize shrink height 10 px or 10 ppt
bindsym Mod4+o resize grow width 10 px or 10 ppt

bar {
	status_command bash $HOME/.i3/statusline
	position bottom
	font pango:FontAwesome 10
	colors {
		background #2d2d2d
		separator #dcdcdc
		focused_workspace #d64937 #d64937 #2d2d2d
		active_workspace #2d2d2d #2d2d2d #dcdcdc
		inactive_workspace #2d2d2d #2d2d2d #dcdcdc
		urgent_workspace #2d2d2d #2d2d2d #dcdcdc
	}
}

new_window none
new_float none

for_window [class="Steam"] floating enable
for_window [class="Steam.exe"] floating enable
for_window [class="Wine"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable

exec redshift -l 48.58:7.67
exec feh --bg-scale /home/kiwec/Images/wall.jpg
exec mpd
exec [[ -z $(pgrep -xU $UID mpdscribble) ]] && mpdscribble
exec alsactl -f /home/kiwec/.config/alsa/asound.state restore
exec steam -silent

client.focused          #d64937	#d64937 #2D2D2D #2e9ef4
client.focused_inactive #2d2d2d #2d2d2d #dcdcdc #484e50
client.unfocused        #2D2D2D #2d2d2d #dcdcdc #292d2e
client.urgent           #2D2D2D #2D2D2D #dcdcdc #900000

D .i3/statusline => .i3/statusline +0 -5
@@ 1,5 0,0 @@
#!/bin/bash
echo '{"version":1}'
echo '['
echo '[],'
exec conky

A .xinitrc => .xinitrc +1 -0
@@ 0,0 1,1 @@
exec i3

A .zshrc => .zshrc +115 -0
@@ 0,0 1,115 @@
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
  export ZSH=/home/.oh-my-zsh

# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="lambda"

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(archlinux systemd lol colored-man-pages command-not-found cp 
git 
gitignore 
npm node web-search)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias rmr="rm -r"

# theme
if [ "$TERM" = "linux" ]; then
  /bin/echo -e "
  \e]P0282a2e
  \e]P1a54242
  \e]P28c9440
  \e]P3de935f
  \e]P45f819d
  \e]P585678f
  \e]P65e8d87
  \e]P7707880
  \e]P8373b41
  \e]P9cc6666
  \e]PAb5bd68
  \e]PBf0c674
  \e]PC81a2be
  \e]PDb294bb
  \e]PE8abeb7
  \e]PFc5c8c6
  "
  # get rid of artifacts
  clear
fi

EDITOR=nvim