diff options
| author | 2015-08-31 22:27:10 +0200 | |
|---|---|---|
| committer | 2015-08-31 22:27:10 +0200 | |
| commit | 86271da691beb99cbb0b1448211da39e867385fc (patch) | |
| tree | a428c12b7c5ec48185739497d04fe2d816ab5945 /herbstluftwm | |
| parent | 434d648f01469fcd6ece9d4ca6f4a5630822b840 (diff) | |
| parent | 3d1e91b881d292f840d459c4911022f30807b4ff (diff) | |
| download | dotfiles-86271da691beb99cbb0b1448211da39e867385fc.tar.gz dotfiles-86271da691beb99cbb0b1448211da39e867385fc.tar.bz2 dotfiles-86271da691beb99cbb0b1448211da39e867385fc.zip | |
Merge branch 'hlwm_refactoring'
Diffstat (limited to 'herbstluftwm')
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/autostart | 206 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/dependencylist | 5 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/hlwm-keybindings | 80 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/hlwm-rules | 13 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/hlwm-theming | 31 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/panel_handler.sh | 17 | ||||
| -rwxr-xr-x[-rw-r--r--] | herbstluftwm/.config/herbstluftwm/panel_indicators.sh | 71 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/populate_panel.sh (renamed from herbstluftwm/.config/herbstluftwm/panel.sh) | 147 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/start.sh | 2 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/start_panel.sh | 34 | ||||
| l--------- | herbstluftwm/.config/herbstluftwm/themes/current | 1 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/themes/purpur (renamed from herbstluftwm/.config/herbstluftwm/theme.sh) | 9 |
12 files changed, 327 insertions, 289 deletions
diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart index 683fbf1..78a81b4 100755 --- a/herbstluftwm/.config/herbstluftwm/autostart +++ b/herbstluftwm/.config/herbstluftwm/autostart | |||
| @@ -1,14 +1,16 @@ | |||
| 1 | #!/bin/bash | 1 | #!/usr/bin/env bash |
| 2 | |||
| 3 | # this is a simple config for herbstluftwm | ||
| 4 | 2 | ||
| 3 | # Herbstclient shortcut | ||
| 5 | hc() { | 4 | hc() { |
| 6 | herbstclient "$@" | 5 | herbstclient "$@" |
| 7 | } | 6 | } |
| 7 | export -f hc | ||
| 8 | |||
| 9 | # The current directory | ||
| 10 | export HLWM_CONF_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
| 8 | 11 | ||
| 9 | #Include the theming script | 12 | #Include the theming script |
| 10 | dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | 13 | source "$HLWM_CONF_DIR/themes/current" |
| 11 | source "$dir/theme.sh" | ||
| 12 | 14 | ||
| 13 | #Detect monitors | 15 | #Detect monitors |
| 14 | hc set auto_detect_monitors 1 | 16 | hc set auto_detect_monitors 1 |
| @@ -19,175 +21,41 @@ monitor_w=($(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/')) | |||
| 19 | panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc) | 21 | 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" | 22 | 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 | 23 | ||
| 22 | # remove all existing keybindings | 24 | # Tags |
| 23 | hc keyunbind --all | 25 | tag_names=() |
| 24 | 26 | tag_keys=({1..9} 0) | |
| 25 | # keybindings | 27 | for key in ${tag_keys[@]}; do |
| 26 | Mod=Mod4 # Use the super key as the main modifier | 28 | if [ $key -eq 0 ]; then key=10; fi |
| 27 | 29 | key=$(echo "$key - 1" | bc) | |
| 28 | hc keybind $Mod-Shift-q quit | 30 | name=$(echo "obase=2;$key" | bc | awk '{ printf "%04d", $0 }') |
| 29 | hc keybind $Mod-Shift-r reload | 31 | tag_names+=($name) |
| 30 | hc keybind $Mod-Shift-c close | 32 | done; |
| 31 | hc keybind $Mod-Return spawn xterm | 33 | |
| 32 | hc keybind $Mod-grave spawn dmenu_run $dmenu_opts | 34 | # Source hlwm-config-files |
| 33 | hc keybind XF86AudioLowerVolume spawn amixer set Master 1%- | 35 | source "$HLWM_CONF_DIR/hlwm-keybindings" |
| 34 | hc keybind XF86AudioRaiseVolume spawn amixer set Master 1%+ | 36 | source "$HLWM_CONF_DIR/hlwm-theming" |
| 35 | 37 | source "$HLWM_CONF_DIR/hlwm-rules" | |
| 36 | # basic movement | 38 | |
| 37 | # focusing clients | 39 | # Unlock, just to be sure |
| 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 keybind Alt-Control-h use_index -1 | ||
| 83 | hc keybind Alt-Control-l use_index +1 | ||
| 84 | hc rename default "${tag_names[0]}" || true | ||
| 85 | for i in ${!tag_names[@]} ; do | ||
| 86 | hc add "${tag_names[$i]}" | ||
| 87 | key="${tag_keys[$i]}" | ||
| 88 | if ! [ -z "$key" ] ; then | ||
| 89 | hc keybind "$Mod-$key" use_index "$i" | ||
| 90 | hc keybind "$Mod-Shift-$key" move_index "$i" | ||
| 91 | fi | ||
| 92 | done | ||
| 93 | |||
| 94 | # cycle through tags | ||
| 95 | hc keybind $Mod-period use_index +1 --skip-visible | ||
| 96 | hc keybind $Mod-comma use_index -1 --skip-visible | ||
| 97 | |||
| 98 | # layouting | ||
| 99 | hc keybind $Mod-r remove | ||
| 100 | hc keybind $Mod-space cycle_layout 1 | ||
| 101 | hc keybind $Mod-s floating toggle | ||
| 102 | hc keybind $Mod-f fullscreen toggle | ||
| 103 | hc keybind $Mod-p pseudotile toggle | ||
| 104 | |||
| 105 | # mouse | ||
| 106 | hc mouseunbind --all | ||
| 107 | hc mousebind $Mod-Button1 move | ||
| 108 | hc mousebind $Mod-Button2 zoom | ||
| 109 | hc mousebind $Mod-Button3 resize | ||
| 110 | |||
| 111 | # focus | ||
| 112 | hc keybind $Mod-BackSpace cycle_monitor | ||
| 113 | hc keybind $Mod-Tab cycle_all +1 | ||
| 114 | hc keybind $Mod-Shift-Tab cycle_all -1 | ||
| 115 | hc keybind $Mod-c cycle | ||
| 116 | hc keybind $Mod-i jumpto urgent | ||
| 117 | hc set focus_follows_mouse 1 | ||
| 118 | |||
| 119 | # theme | ||
| 120 | hc attr theme.tiling.reset 1 | ||
| 121 | hc attr theme.floating.reset 1 | ||
| 122 | hc set frame_border_width 0 | ||
| 123 | hc set always_show_frame 0 | ||
| 124 | hc set frame_bg_transparent 1 | ||
| 125 | hc set frame_normal_opacity 0 | ||
| 126 | hc set frame_active_opacity 0 | ||
| 127 | hc set frame_transparent_width 0 | ||
| 128 | hc set frame_gap 0 | ||
| 129 | |||
| 130 | hc attr theme.active.color $color_accent | ||
| 131 | hc attr theme.normal.color $color_bg | ||
| 132 | hc attr theme.urgent.color orange | ||
| 133 | hc attr theme.inner_width 1 | ||
| 134 | hc attr theme.inner_color $color_bg | ||
| 135 | hc attr theme.border_width 3 | ||
| 136 | hc attr theme.floating.border_width 4 | ||
| 137 | hc attr theme.floating.outer_width 1 | ||
| 138 | hc attr theme.floating.outer_color $color_bg | ||
| 139 | hc attr theme.active.inner_color $color_bg | ||
| 140 | hc attr theme.active.outer_color $color_bg | ||
| 141 | hc attr theme.background_color $color_bg | ||
| 142 | |||
| 143 | hc set window_gap $window_p | ||
| 144 | hc set frame_padding 0 | ||
| 145 | hc set smart_window_surroundings 0 | ||
| 146 | hc set smart_frame_surroundings 1 | ||
| 147 | hc set mouse_recenter_gap 1 | ||
| 148 | |||
| 149 | # rules | ||
| 150 | hc unrule -F | ||
| 151 | hc rule focus=on # normally focus new clients | ||
| 152 | |||
| 153 | #hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on | ||
| 154 | hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on | ||
| 155 | hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off | ||
| 156 | |||
| 157 | hc rule --class~'(.*[Ss]team.*)' --tag=IX --focus=off | ||
| 158 | hc rule --class~'(.*[Hh]exchat.*)' --tag=X --focus=off | ||
| 159 | hc rule --class~'(.*[Ss]potify.*)' --tag=X --focus=off | ||
| 160 | hc rule --class~'(.*[Ss]kype.*)' --tag=VIII --focus=off | ||
| 161 | |||
| 162 | # unlock, just to be sure | ||
| 163 | hc unlock | 40 | hc unlock |
| 164 | 41 | ||
| 165 | herbstclient set tree_style '╾│ ├└╼─┐' | 42 | herbstclient set tree_style '╾│ ├└╼─┐' |
| 166 | 43 | ||
| 167 | #Start panel in all monitors | 44 | # Start panel in all monitors |
| 168 | start_panel() { | 45 | panel=$HLWM_CONF_DIR/start_panel.sh |
| 169 | for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do | ||
| 170 | "$1" $monitor& | ||
| 171 | done | ||
| 172 | } | ||
| 173 | |||
| 174 | # find the panel | ||
| 175 | panel=$dir/panel.sh | ||
| 176 | [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh | 46 | [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh |
