diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart index 8304936..4bb142e 100755 --- a/herbstluftwm/.config/herbstluftwm/autostart +++ b/herbstluftwm/.config/herbstluftwm/autostart @@ -12,7 +12,7 @@ function hc() { herbstclient "$@"; } # This function picks a random wallpaper from a list collection. function random-wallpaper() { find ~/pictures/wallpapers -type f \ - -wholename '*/3840x1080/*' -o -wholename '*/patterns/*' \ + -wholename '*/3840x1080/*' -o -wholename '*/patterns/*' \ | shuf -n 1 } @@ -23,8 +23,8 @@ function random-wallpaper() { # switched. function lock-tag-to-monitor() { herbstclient chain \ - , new_attr string tags.by-name."$1".my_monitor \ - , set_attr tags.by-name."$1".my_monitor "$2" + , new_attr string tags.by-name."$1".my_monitor \ + , set_attr tags.by-name."$1".my_monitor "$2" } ## Reload hook: @@ -74,7 +74,7 @@ hc keybind $Mod-b spawn hlwm-run-or-raise '\(Conkeror\|[Ff]irefox\|Chromium\)' f # Switch to a running instance of Emacs, or create an Emacs client # frame. Start an Emacs daemon if necessary. hc keybind $Mod-t spawn hlwm-run-or-raise Emacs \ - emacsclient --create-frame --alternate-editor='' + emacsclient --create-frame --alternate-editor='' # Lock the screen with C-M-l. hc keybind Control-Mod1-l spawn i3lock --color 000000 # Swap visible tags @@ -86,24 +86,24 @@ hc keybind $Mod-x spawn hlwm-switch-tags # as much as I can, and have the layouts set-up correctly already, but # sometimes I still need to move around, resize and move clients. resizestep=0.05 -hc keybind $Mod-Shift-h shift left -hc keybind $Mod-Shift-j shift down -hc keybind $Mod-Shift-k shift up -hc keybind $Mod-Shift-l shift right -hc keybind $Mod-Control-h resize left +$resizestep -hc keybind $Mod-Control-j resize down +$resizestep -hc keybind $Mod-Control-k resize up +$resizestep -hc keybind $Mod-Control-l resize right +$resizestep +hc keybind $Mod-Shift-h shift left +hc keybind $Mod-Shift-j shift down +hc keybind $Mod-Shift-k shift up +hc keybind $Mod-Shift-l shift right +hc keybind $Mod-Control-h resize left +$resizestep +hc keybind $Mod-Control-j resize down +$resizestep +hc keybind $Mod-Control-k resize up +$resizestep +hc keybind $Mod-Control-l resize right +$resizestep # I usually try to have my layouts set-up programmatically, but this # isn't always possible or practical. -hc keybind $Mod-s split bottom 0.5 -hc keybind $Mod-Shift-s split right 0.5 +hc keybind $Mod-s split bottom 0.5 +hc keybind $Mod-Shift-s split right 0.5 # Switching tags by number (key) isn't always practical, sometimes # switching to next/previous tag is easiest. hc keybind $Mod-period use_index +1 --skip-visible -hc keybind $Mod-comma use_index -1 --skip-visible +hc keybind $Mod-comma use_index -1 --skip-visible # Games and sometimes other applications don't always like being # forced into a strangely sized box, floating mode helps. @@ -119,10 +119,10 @@ hc keybind $Mod-p pseudotile toggle # The following cycles through the available layouts within a frame, but skips # layouts, if the layout change wouldn't affect the actual window positions. # I.e. if there are two windows within a frame, the grid layout is skipped. -hc keybind $Mod-space \ - or , and . compare tags.focus.curframe_wcount = 2 \ - . cycle_layout +1 vertical horizontal max vertical grid \ - , cycle_layout +1 +hc keybind $Mod-space \ + or , and . compare tags.focus.curframe_wcount = 2 \ + . cycle_layout +1 vertical horizontal max vertical grid \ + , cycle_layout +1 # mouse hc mouseunbind --all @@ -131,7 +131,7 @@ hc mousebind $Mod-Button2 zoom hc mousebind $Mod-Button3 resize # focus -hc keybind $Mod-BackSpace cycle_monitor +hc keybind $Mod-BackSpace cycle_monitor # Use u because i is already used by by navigation commands. hc keybind $Mod-u jumpto urgent @@ -143,14 +143,14 @@ hc keybind XF86AudioPrev spawn mpc prev # Add a screenshot button. hc keybind Print spawn scrot \ - "${HOME}/pictures/screenshots/desktop/%Y%m%d_\$wx\$h_scrot.png" + "${HOME}/pictures/screenshots/desktop/%Y%m%d_\$wx\$h_scrot.png" -if which lumeus >/dev/null 2>&1; then +if which lumeus > /dev/null 2>&1; then hc keybind XF86MonBrightnessUp spawn lumeus +10% hc keybind XF86MonBrightnessDown spawn lumeus -10% fi -if which ponymix >/dev/null 2>&1; then +if which ponymix > /dev/null 2>&1; then hc keybind XF86AudioMute spawn ponymix toggle hc keybind XF86AudioLowerVolume spawn ponymix decrease 10 hc keybind XF86AudioRaiseVolume spawn ponymix increase 10 @@ -160,24 +160,24 @@ fi hc set default_frame_layout 2 ## Tags: -tag_names=( dev web {3..10} ) -tag_indexes=( {1..${#tag_names}} ) -tag_keys=( bracketleft braceleft braceright parenleft equal - asterisk parenright plus bracketright exclam ) +tag_names=(dev web {3..10}) +tag_indexes=({1..${#tag_names}}) +tag_keys=(bracketleft braceleft braceright parenleft equal + asterisk parenright plus bracketright exclam) hc rename default "${tag_names[1]}" || true for i in $tag_indexes; do hc add "${tag_names[$i]}" key="${tag_keys[$i]}" - if ! [ -z "$key" ] ; then + if ! [ -z "$key" ]; then # ZSH array indexes start at 1, herbstluftwm tag indexes start # at zero, so subtract one to match them. - j=$(( $i - 1 )) + j=$((i - 1)) # first check if the tag is locked to some monitor. # if so, first focus the monitor hc keybind "$Mod-$key" chain \ - , silent substitute M tags."$j".my-monitor focus_monitor M \ - , use_index "$j" + , silent substitute M tags."$j".my-monitor focus_monitor M \ + , use_index "$j" hc keybind "$Mod-Shift-$key" move_index "$j" fi done