diff options
| author | 2015-02-22 17:15:39 +0100 | |
|---|---|---|
| committer | 2015-02-22 17:15:39 +0100 | |
| commit | d0ecb2a9d770b1987e3be7cdc549d46880b89c5e (patch) | |
| tree | d493b4afd8268adb3e1f374cd73e5db662f260d6 /config/herbstluftwm | |
| parent | b86e22c339276441f344d61ad104a7cebd3b5858 (diff) | |
| download | dotfiles-d0ecb2a9d770b1987e3be7cdc549d46880b89c5e.tar.gz dotfiles-d0ecb2a9d770b1987e3be7cdc549d46880b89c5e.tar.bz2 dotfiles-d0ecb2a9d770b1987e3be7cdc549d46880b89c5e.zip | |
Moved from stow to dotfiles for dotfile management
Diffstat (limited to 'config/herbstluftwm')
| -rwxr-xr-x | config/herbstluftwm/autostart | 191 | ||||
| -rw-r--r-- | config/herbstluftwm/dependencylist | 15 | ||||
| -rwxr-xr-x | config/herbstluftwm/lock.sh | 7 | ||||
| -rwxr-xr-x | config/herbstluftwm/notify.sh | 19 | ||||
| -rwxr-xr-x | config/herbstluftwm/panel.sh | 160 | ||||
| -rw-r--r-- | config/herbstluftwm/panel_indicators.sh | 127 | ||||
| -rwxr-xr-x | config/herbstluftwm/popup.sh | 46 | ||||
| -rwxr-xr-x | config/herbstluftwm/start.sh | 13 | ||||
| -rw-r--r-- | config/herbstluftwm/theme.sh | 33 |
9 files changed, 611 insertions, 0 deletions
diff --git a/config/herbstluftwm/autostart b/config/herbstluftwm/autostart new file mode 100755 index 0000000..78e9af8 --- /dev/null +++ b/config/herbstluftwm/autostart | |||
| @@ -0,0 +1,191 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # this is a simple config for herbstluftwm | ||
| 4 | |||
| 5 | hc() { | ||
| 6 | herbstclient "$@" | ||
| 7 | } | ||
| 8 | |||
| 9 | #Include the theming script | ||
| 10 | dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
| 11 | source "$dir/theme.sh" | ||
| 12 | |||
| 13 | #Detect monitors | ||
| 14 | hc set auto_detect_monitors 1 | ||
| 15 | hc detect_monitors | ||
| 16 | |||
| 17 | #Panel and window_p | ||
| 18 | monitor_w=($(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/')) | ||
| 19 | panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc) | ||
| 20 | dmenu_opts="-h $panel_h -w $panel_w -x $window_p -y $window_p -p Run: -nb $color_bg -nf $color_fg -sb $color_accent -sf $color_bg" | ||
| 21 | |||
| 22 | # remove all existing keybindings | ||
| 23 | hc keyunbind --all | ||
| 24 | |||
| 25 | # keybindings | ||
| 26 | Mod=Mod4 # Use the super key as the main modifier | ||
| 27 | |||
| 28 | hc keybind $Mod-Shift-q quit | ||
| 29 | hc keybind $Mod-Shift-r reload | ||
| 30 | hc keybind $Mod-Shift-c close | ||
| 31 | hc keybind $Mod-Return spawn xterm | ||
| 32 | hc keybind $Mod-grave spawn dmenu_run $dmenu_opts | ||
| 33 | hc keybind XF86AudioLowerVolume spawn amixer set Master 1%- | ||
| 34 | hc keybind XF86AudioRaiseVolume spawn amixer set Master 1%+ | ||
| 35 | |||
| 36 | # basic movement | ||
| 37 | # focusing clients | ||
| 38 | hc keybind $Mod-Left focus left | ||
| 39 | hc keybind $Mod-Down focus down | ||
| 40 | hc keybind $Mod-Up focus up | ||
| 41 | hc keybind $Mod-Right focus right | ||
| 42 | hc keybind $Mod-h focus left | ||
| 43 | hc keybind $Mod-j focus down | ||
| 44 | hc keybind $Mod-k focus up | ||
| 45 | hc keybind $Mod-l focus right | ||
| 46 | |||
| 47 | # moving clients | ||
| 48 | hc keybind $Mod-Shift-Left shift left | ||
| 49 | hc keybind $Mod-Shift-Down shift down | ||
| 50 | hc keybind $Mod-Shift-Up shift up | ||
| 51 | hc keybind $Mod-Shift-Right shift right | ||
| 52 | hc keybind $Mod-Shift-h shift left | ||
| 53 | hc keybind $Mod-Shift-j shift down | ||
| 54 | hc keybind $Mod-Shift-k shift up | ||
| 55 | hc keybind $Mod-Shift-l shift right | ||
| 56 | |||
| 57 | # splitting frames | ||
| 58 | # create an empty frame at the specified direction | ||
| 59 | hc keybind $Mod-u split bottom 0.5 | ||
| 60 | hc keybind $Mod-o split right 0.5 | ||
| 61 | # let the current frame explode into subframes | ||
| 62 | hc keybind $Mod-Control-space split explode | ||
| 63 | |||
| 64 | # resizing frames | ||
| 65 | resizestep=0.05 | ||
| 66 | hc keybind $Mod-Control-h resize left +$resizestep | ||
| 67 | hc keybind $Mod-Control-j resize down +$resizestep | ||
| 68 | hc keybind $Mod-Control-k resize up +$resizestep | ||
| 69 | hc keybind $Mod-Control-l resize right +$resizestep | ||
| 70 | hc keybind $Mod-Control-Left resize left +$resizestep | ||
| 71 | hc keybind $Mod-Control-Down resize down +$resizestep | ||
| 72 | hc keybind $Mod-Control-Up resize up +$resizestep | ||
| 73 | hc keybind $Mod-Control-Right resize right +$resizestep | ||
| 74 | |||
| 75 | # tags | ||
| 76 | tag_names=( I II III IV V VI VII VIII IX X ) | ||
| 77 | tag_keys=( {1..9} 0 ) | ||
| 78 | |||
| 79 | # Selecting workspaces | ||
| 80 | hc keybind Alt-Control-Left use_index -1 | ||
| 81 | hc keybind Alt-Control-Right use_index +1 | ||
| 82 | hc rename default "${tag_names[0]}" || true | ||
| 83 | for i in ${!tag_names[@]} ; do | ||
| 84 | hc add "${tag_names[$i]}" | ||
| 85 | key="${tag_keys[$i]}" | ||
| 86 | if ! [ -z "$key" ] ; then | ||
| 87 | hc keybind "$Mod-$key" use_index "$i" | ||
| 88 | hc keybind "$Mod-Shift-$key" move_index "$i" | ||
| 89 | fi | ||
| 90 | done | ||
| 91 | |||
| 92 | # cycle through tags | ||
| 93 | hc keybind $Mod-period use_index +1 --skip-visible | ||
| 94 | hc keybind $Mod-comma use_index -1 --skip-visible | ||
| 95 | |||
| 96 | # layouting | ||
| 97 | hc keybind $Mod-r remove | ||
| 98 | hc keybind $Mod-space cycle_layout 1 | ||
| 99 | hc keybind $Mod-s floating toggle | ||
| 100 | hc keybind $Mod-f fullscreen toggle | ||
| 101 | hc keybind $Mod-p pseudotile toggle | ||
| 102 | |||
| 103 | # mouse | ||
| 104 | hc mouseunbind --all | ||
| 105 | hc mousebind $Mod-Button1 move | ||
| 106 | hc mousebind $Mod-Button2 zoom | ||
| 107 | hc mousebind $Mod-Button3 resize | ||
| 108 | |||
| 109 | # focus | ||
| 110 | hc keybind $Mod-BackSpace cycle_monitor | ||
| 111 | hc keybind $Mod-Tab cycle_all +1 | ||
| 112 | hc keybind $Mod-Shift-Tab cycle_all -1 | ||
| 113 | hc keybind $Mod-c cycle | ||
| 114 | hc keybind $Mod-i jumpto urgent | ||
| 115 | hc set focus_follows_mouse 1 | ||
| 116 | |||
| 117 | # theme | ||
| 118 | hc attr theme.tiling.reset 1 | ||
| 119 | hc attr theme.floating.reset 1 | ||
| 120 | hc set frame_border_width 0 | ||
| 121 | hc set always_show_frame 0 | ||
| 122 | hc set frame_bg_transparent 1 | ||
| 123 | hc set frame_normal_opacity 0 | ||
| 124 | hc set frame_active_opacity 0 | ||
| 125 | hc set frame_transparent_width 0 | ||
| 126 | hc set frame_gap 0 | ||
| 127 | |||
| 128 | hc attr theme.active.color $color_accent | ||
| 129 | hc attr theme.normal.color $color_bg | ||
| 130 | hc attr theme.urgent.color orange | ||
| 131 | hc attr theme.inner_width 1 | ||
| 132 | hc attr theme.inner_color $color_bg | ||
| 133 | hc attr theme.border_width 3 | ||
| 134 | hc attr theme.floating.border_width 4 | ||
| 135 | hc attr theme.floating.outer_width 1 | ||
| 136 | hc attr theme.floating.outer_color $color_bg | ||
| 137 | hc attr theme.active.inner_color $color_bg | ||
| 138 | hc attr theme.active.outer_color $color_bg | ||
| 139 | hc attr theme.background_color $color_bg | ||
| 140 | |||
| 141 | hc set window_gap $window_p | ||
| 142 | hc set frame_padding 0 | ||
| 143 | hc set smart_window_surroundings 0 | ||
| 144 | hc set smart_frame_surroundings 1 | ||
| 145 | hc set mouse_recenter_gap 1 | ||
| 146 | |||
| 147 | # rules | ||
| 148 | hc unrule -F | ||
| 149 | hc rule focus=on # normally focus new clients | ||
| 150 | |||
| 151 | #hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on | ||
| 152 | hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on | ||
| 153 | hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off | ||
| 154 | |||
| 155 | hc rule --class~'(.*[Ss]team.*)' --tag=IX --focus=off | ||
| 156 | hc rule --class~'(.*[Hh]exchat.*)' --tag=X --focus=off | ||
| 157 | hc rule --class~'(.*[Ss]potify.*)' --tag=X --focus=off | ||
| 158 | hc rule --class~'(.*[Ss]kype.*)' --tag=VIII --focus=off | ||
| 159 | |||
| 160 | # unlock, just to be sure | ||
| 161 | hc unlock | ||
| 162 | |||
| 163 | herbstclient set tree_style '╾│ ├└╼─┐' | ||
| 164 | |||
| 165 | #Start panel in all monitors | ||
| 166 | start_panel() { | ||
| 167 | for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do | ||
| 168 | "$1" $monitor& | ||
| 169 | done | ||
| 170 | } | ||
| 171 | |||
| 172 | # find the panel | ||
| 173 | panel=$dir/panel.sh | ||
| 174 | [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh | ||
| 175 | if pgrep panel.sh >> /dev/null | ||
| 176 | then | ||
| 177 | kill $(pgrep panel.sh) | ||
| 178 | start_panel $panel | ||
| 179 | else | ||
| 180 | start_panel $panel | ||
| 181 | fi | ||
| 182 | |||
| 183 | pulseaudio --start | ||
| 184 | |||
| 185 | $dir/start.sh "xautolock -time 5 -locker $dir/lock.sh" | ||
| 186 | $dir/start.sh "feh --bg-fill $wallpaper" | ||
| 187 | $dir/start.sh "compton --config $HOME/.compton" | ||
| 188 | $dir/start.sh "xrdb -load $HOME/.Xresources" | ||
| 189 | $dir/start.sh "xset +fp /usr/share/fonts/local" | ||
| 190 | $dir/start.sh "xset fp rehash" | ||
| 191 | #$dir/start.sh "$dir/notify.sh $dir/popup.sh" | ||
diff --git a/config/herbstluftwm/dependencylist b/config/herbstluftwm/dependencylist new file mode 100644 index 0000000..7d3babf --- /dev/null +++ b/config/herbstluftwm/dependencylist | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | alsa-utils | ||
| 2 | bar-aint-recursive | ||
| 3 | bc | ||
| 4 | compton | ||
| 5 | dmenu2 | ||
| 6 | feh | ||
| 7 | i3lock | ||
| 8 | playerctl | ||
| 9 | pulseaudio | ||
| 10 | pulseaudio-alsa | ||
| 11 | scrot | ||
| 12 | sed | ||
| 13 | stlarch_font | ||
| 14 | wireless_tools | ||
| 15 | xautolock | ||
diff --git a/config/herbstluftwm/lock.sh b/config/herbstluftwm/lock.sh new file mode 100755 index 0000000..04c4638 --- /dev/null +++ b/config/herbstluftwm/lock.sh | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | SCREENCAP="/tmp/lock.png" | ||
| 4 | scrot $SCREENCAP | ||
| 5 | convert -gaussian-blur "12x3" $SCREENCAP $SCREENCAP | ||
| 6 | i3lock -i $SCREENCAP | ||
| 7 | rm $SCREENCAP | ||
diff --git a/config/herbstluftwm/notify.sh b/config/herbstluftwm/notify.sh new file mode 100755 index 0000000..40c5330 --- /dev/null +++ b/config/herbstluftwm/notify.sh | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | while true; do | ||
| 4 | |||
| 5 | bat_lvl=$(cat /sys/class/power_supply/BAT1/capacity) | ||
| 6 | bat_stat=$(cat /sys/class/power_supply/BAT1/status) | ||
