diff options
| author | 2014-10-25 22:26:54 +0200 | |
|---|---|---|
| committer | 2014-10-25 22:26:54 +0200 | |
| commit | 3e94a3e724c36267fa2e4039e3759473c59e8510 (patch) | |
| tree | 379d0598c0d26d3b0c746604d80bb9e803371fb0 /herbstluftwm | |
| parent | 8ecace69cb3b35ac6b72859ebf0be70d11d2d71e (diff) | |
| download | dotfiles-3e94a3e724c36267fa2e4039e3759473c59e8510.tar.gz dotfiles-3e94a3e724c36267fa2e4039e3759473c59e8510.tar.bz2 dotfiles-3e94a3e724c36267fa2e4039e3759473c59e8510.zip | |
Restructured dotfile repo to take advantage of GNU Stow
Diffstat (limited to 'herbstluftwm')
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/autostart | 203 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/dependencylist | 12 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/lock.sh | 7 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/notify.sh | 30 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/panel.sh | 219 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/popup.sh | 60 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/start.sh | 13 |
7 files changed, 544 insertions, 0 deletions
diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart new file mode 100755 index 0000000..109ea43 --- /dev/null +++ b/herbstluftwm/.config/herbstluftwm/autostart | |||
| @@ -0,0 +1,203 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # this is a simple config for herbstluftwm | ||
| 4 | |||
| 5 | hc() { | ||
| 6 | herbstclient "$@" | ||
| 7 | } | ||
| 8 | |||
| 9 | get_x_color() { | ||
| 10 | xresources=$(cat ~/.Xresources) | ||
| 11 | color=$(echo $xresources | sed "s/.*\*color$1: \(#[0-9A-Fa-f]*\).*/\1/") | ||
| 12 | echo $color | ||
| 13 | } | ||
| 14 | |||
| 15 | hlwm_scripts="$HOME/.config/herbstluftwm" | ||
| 16 | |||
| 17 | #wallpaper | ||
| 18 | wallpaper=/home/tom/Pictures/fall1.jpg | ||
| 19 | |||
| 20 | #Numix color palette | ||
| 21 | export WM_LIGHT=$(get_x_color 15) | ||
| 22 | export WM_LLIGHT=$(get_x_color 7) | ||
| 23 | export WM_ACCENT=$(get_x_color 9) | ||
| 24 | export WM_LDARK=$(get_x_color 8) | ||
| 25 | export WM_DARK=$(get_x_color 0) | ||
| 26 | |||
| 27 | #Panel and window_p | ||
| 28 | window_p=20 | ||
| 29 | monitor_w=$(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/') | ||
| 30 | panel_h=24 | ||
| 31 | panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc) | ||
| 32 | dmenu_opts="-h $panel_h -w $panel_w -x $window_p -y $window_p -p Run: -nb $WM_DARK -nf $WM_LIGHT -sb $WM_ACCENT -sf $WM_DARK" | ||
| 33 | |||
| 34 | hc emir_hook reload | ||
| 35 | |||
| 36 | # remove all existing keybindings | ||
| 37 | hc keyunbind --all | ||
| 38 | |||
| 39 | # keybindings | ||
| 40 | Mod=Mod4 # Use the super key as the main modifier | ||
| 41 | |||
| 42 | hc keybind $Mod-Shift-q quit | ||
| 43 | hc keybind $Mod-Shift-r reload | ||
| 44 | hc keybind $Mod-Shift-c close | ||
| 45 | hc keybind $Mod-Return spawn xterm | ||
| 46 | hc keybind $Mod-grave spawn dmenu_run $dmenu_opts | ||
| 47 | hc keybind XF86AudioLowerVolume spawn amixer set Master 5%- | ||
| 48 | hc keybind XF86AudioRaiseVolume spawn amixer set Master 5%+ | ||
| 49 | |||
| 50 | # basic movement | ||
| 51 | # focusing clients | ||
| 52 | hc keybind $Mod-Left focus left | ||
| 53 | hc keybind $Mod-Down focus down | ||
| 54 | hc keybind $Mod-Up focus up | ||
| 55 | hc keybind $Mod-Right focus right | ||
| 56 | hc keybind $Mod-h focus left | ||
| 57 | hc keybind $Mod-j focus down | ||
| 58 | hc keybind $Mod-k focus up | ||
| 59 | hc keybind $Mod-l focus right | ||
| 60 | |||
| 61 | # moving clients | ||
| 62 | hc keybind $Mod-Shift-Left shift left | ||
| 63 | hc keybind $Mod-Shift-Down shift down | ||
| 64 | hc keybind $Mod-Shift-Up shift up | ||
| 65 | hc keybind $Mod-Shift-Right shift right | ||
| 66 | hc keybind $Mod-Shift-h shift left | ||
| 67 | hc keybind $Mod-Shift-j shift down | ||
| 68 | hc keybind $Mod-Shift-k shift up | ||
| 69 | hc keybind $Mod-Shift-l shift right | ||
| 70 | |||
| 71 | # splitting frames | ||
| 72 | # create an empty frame at the specified direction | ||
| 73 | hc keybind $Mod-u split bottom 0.5 | ||
| 74 | hc keybind $Mod-o split right 0.5 | ||
| 75 | # let the current frame explode into subframes | ||
| 76 | hc keybind $Mod-Control-space split explode | ||
| 77 | |||
| 78 | # resizing frames | ||
| 79 | resizestep=0.05 | ||
| 80 | hc keybind $Mod-Control-h resize left +$resizestep | ||
| 81 | hc keybind $Mod-Control-j resize down +$resizestep | ||
| 82 | hc keybind $Mod-Control-k resize up +$resizestep | ||
| 83 | hc keybind $Mod-Control-l resize right +$resizestep | ||
| 84 | hc keybind $Mod-Control-Left resize left +$resizestep | ||
| 85 | hc keybind $Mod-Control-Down resize down +$resizestep | ||
| 86 | hc keybind $Mod-Control-Up resize up +$resizestep | ||
| 87 | hc keybind $Mod-Control-Right resize right +$resizestep | ||
| 88 | |||
| 89 | # tags | ||
| 90 | tag_names=( I II III IV V VI VII VIII IX X ) | ||
| 91 | tag_keys=( {1..9} 0 ) | ||
| 92 | |||
| 93 | # Selecting workspaces | ||
| 94 | hc keybind Alt-Control-Left use_index -1 | ||
| 95 | hc keybind Alt-Control-Right use_index +1 | ||
| 96 | hc rename default "${tag_names[0]}" || true | ||
| 97 | for i in ${!tag_names[@]} ; do | ||
| 98 | hc add "${tag_names[$i]}" | ||
| 99 | key="${tag_keys[$i]}" | ||
| 100 | if ! [ -z "$key" ] ; then | ||
| 101 | hc keybind "$Mod-$key" use_index "$i" | ||
| 102 | hc keybind "$Mod-Shift-$key" move_index "$i" | ||
| 103 | fi | ||
| 104 | done | ||
| 105 | |||
| 106 | # cycle through tags | ||
| 107 | hc keybind $Mod-period use_index +1 --skip-visible | ||
| 108 | hc keybind $Mod-comma use_index -1 --skip-visible | ||
| 109 | |||
| 110 | # layouting | ||
| 111 | hc keybind $Mod-r remove | ||
| 112 | hc keybind $Mod-space cycle_layout 1 | ||
| 113 | hc keybind $Mod-s floating toggle | ||
| 114 | hc keybind $Mod-f fullscreen toggle | ||
| 115 | hc keybind $Mod-p pseudotile toggle | ||
| 116 | |||
| 117 | # mouse | ||
| 118 | hc mouseunbind --all | ||
| 119 | hc mousebind $Mod-Button1 move | ||
| 120 | hc mousebind $Mod-Button2 zoom | ||
| 121 | hc mousebind $Mod-Button3 resize | ||
| 122 | |||
| 123 | # focus | ||
| 124 | hc keybind $Mod-BackSpace cycle_monitor | ||
| 125 | hc keybind $Mod-Tab cycle_all +1 | ||
| 126 | hc keybind $Mod-Shift-Tab cycle_all -1 | ||
| 127 | hc keybind $Mod-c cycle | ||
| 128 | hc keybind $Mod-i jumpto urgent | ||
| 129 | hc set focus_follows_mouse 1 | ||
| 130 | |||
| 131 | # theme | ||
| 132 | hc attr theme.tiling.reset 1 | ||
| 133 | hc attr theme.floating.reset 1 | ||
| 134 | hc set frame_border_active_color $WM_LDARK | ||
| 135 | hc set frame_border_normal_color $WM_DARK | ||
| 136 | hc set frame_bg_normal_color $WM_LDARK | ||
| 137 | hc set frame_bg_active_color $WM_DARK | ||
| 138 | hc set frame_border_width 0 | ||
| 139 | hc set always_show_frame 0 | ||
| 140 | hc set frame_bg_transparent 1 | ||
| 141 | hc set frame_transparent_width 0 | ||
| 142 | hc set frame_gap 0 | ||
| 143 | |||
| 144 | hc attr theme.active.color $WM_ACCENT | ||
| 145 | hc attr theme.normal.color $WM_DARK | ||
| 146 | hc attr theme.urgent.color orange | ||
| 147 | hc attr theme.inner_width 1 | ||
| 148 | hc attr theme.inner_color $WM_DARK | ||
| 149 | hc attr theme.border_width 3 | ||
| 150 | hc attr theme.floating.border_width 4 | ||
| 151 | hc attr theme.floating.outer_width 1 | ||
| 152 | hc attr theme.floating.outer_color $WM_DARK | ||
| 153 | hc attr theme.active.inner_color $WM_DARK | ||
| 154 | hc attr theme.active.outer_color $WM_DARK | ||
| 155 | hc attr theme.background_color $WM_DARK | ||
| 156 | |||
| 157 | hc set window_gap $window_p | ||
| 158 | hc set frame_padding 0 | ||
| 159 | hc set smart_window_surroundings 0 | ||
| 160 | hc set smart_frame_surroundings 1 | ||
| 161 | hc set mouse_recenter_gap 1 | ||
| 162 | |||
| 163 | # rules | ||
| 164 | hc unrule -F | ||
| 165 | #hc rule class=XTerm tag=3 # move all xterms to tag 3 | ||
| 166 | hc rule focus=on # normally focus new clients | ||
| 167 | #hc rule focus=off # normally do not focus new clients | ||
| 168 | # give focus to most common terminals | ||
| 169 | #hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on | ||
| 170 | hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on | ||
| 171 | hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on | ||
| 172 | hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off | ||
| 173 | |||
| 174 | # unlock, just to be sure | ||
| 175 | hc unlock | ||
| 176 | |||
| 177 | herbstclient set tree_style '╾│ ├└╼─┐' | ||
| 178 | |||
| 179 | #Start panel in all monitors | ||
| 180 | start_panel() { | ||
| 181 | for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do | ||
| 182 | "$1" $monitor $panel_h $window_p & | ||
| 183 | done | ||
| 184 | } | ||
| 185 | |||
| 186 | # find the panel | ||
| 187 | panel=$hlwm_scripts/panel.sh | ||
| 188 | [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh | ||
| 189 | if pgrep panel.sh >> /dev/null | ||
| 190 | then | ||
| 191 | kill $(pgrep panel.sh) | ||
| 192 | start_panel $panel | ||
| 193 | else | ||
| 194 | start_panel $panel | ||
| 195 | fi | ||
| 196 | |||
| 197 | $hlwm_scripts/start.sh "xautolock -time 5 -locker $hlwm_scripts/lock.sh" | ||
| 198 | $hlwm_scripts/start.sh "feh --bg-fill $wallpaper" | ||
| 199 | $hlwm_scripts/start.sh "compton --config $HOME/.compton" | ||
| 200 | $hlwm_scripts/start.sh "xrdb -load $HOME/.Xresources" | ||
| 201 | $hlwm_scripts/start.sh "pulseaudio --start" | ||
| 202 | $hlwm_scripts/start.sh "dropboxd" | ||
| 203 | $hlwm_scripts/start.sh "$hlwm_scripts/notify.sh $monitor_w $window_p $panel_h $hlwm_scripts/popup.sh" | ||
diff --git a/herbstluftwm/.config/herbstluftwm/dependencylist b/herbstluftwm/.config/herbstluftwm/dependencylist new file mode 100644 index 0000000..a18055d --- /dev/null +++ b/herbstluftwm/.config/herbstluftwm/dependencylist | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | compton | ||
| 2 | bar-aint-recursive | ||
| 3 | bc | ||
| 4 | wireless_tools | ||
| 5 | dmenu2 | ||
| 6 | feh | ||
| 7 | pulseaudio | ||
| 8 | alsa-utils | ||
| 9 | sed | ||
