[herbstluftwm] Remove keybindings

These are now handled by the xbindkeys tool.
This commit is contained in:
Tom Willemse 2022-02-28 00:43:44 -08:00
parent 5323fc8b9e
commit 4155b1f044

View file

@ -54,112 +54,12 @@ hc keyunbind --all
# useful. # useful.
Mod=Mod4 Mod=Mod4
# These are dangerous keybindings, they could be very annoying if
# they're accidentally pressed, so using Shift here to make it a
# little less easy to do this is a good idea.
hc keybind $Mod-Shift-q quit
hc keybind $Mod-Shift-r reload
# Usually I close the applications I use through a menu or keybinding
# inside the application, but not all applications offer
# this. Sometimes need to tell the window manager to do so.
hc keybind $Mod-k close
# Normally I try to have frames set-up the way I like them
# programmatically, not manually, but sometimes I need to do it
# manually anyway and remove them afterwards.
hc keybind $Mod-Mod1-k remove
# Always spawn an instance of Rxvt Unicode.
hc keybind $Mod-Return spawn kitty
# Switch to a running instance of URxvt or Hyper, or start one.
hc keybind $Mod-c spawn hlwm-run-or-raise '\(URxvt\|Hyper\|kitty\)' kitty
# Switch to a running instance of Conkeror, or start one.
hc keybind $Mod-b spawn hlwm-run-or-raise '\(Conkeror\|[Ff]irefox\|Chromium\|Next\)' firefox
# 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
# Lock the screen with C-M-l.
hc keybind Control-Mod1-l spawn i3lock --color 000000
# Swap visible tags
hc keybind $Mod-x spawn hlwm-switch-tags
# Since I use the colemak keyboard layout, hjkl doesn't make much
# sense. I use neio instead since that is almost in the same place
# (though one place to the right). I try to use my run-or-raise script
# 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
# 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
# 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
# Games and sometimes other applications don't always like being
# forced into a strangely sized box, floating mode helps.
hc keybind $Mod-Control-f floating toggle
# Playing games in fullscreen mode can end badly by having the game
# spread across both monitors. Also watching a twitch stream with lots
# of text is best in fullscreen.
hc keybind $Mod-f cycle_layout 1 vertical max
hc keybind $Mod-Shift-f fullscreen toggle
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
# mouse # mouse
hc mouseunbind --all hc mouseunbind --all
hc mousebind $Mod-Button1 move hc mousebind $Mod-Button1 move
hc mousebind $Mod-Button2 zoom hc mousebind $Mod-Button2 zoom
hc mousebind $Mod-Button3 resize hc mousebind $Mod-Button3 resize
# focus
hc keybind $Mod-BackSpace cycle_monitor
# Use u because i is already used by by navigation commands.
hc keybind $Mod-u jumpto urgent
# Add some media key bindings for MPD.
hc keybind XF86AudioPlay spawn mpc toggle
hc keybind XF86AudioNext spawn mpc next
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"
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
hc keybind XF86AudioMute spawn ponymix toggle
hc keybind XF86AudioLowerVolume spawn ponymix decrease 10
hc keybind XF86AudioRaiseVolume spawn ponymix increase 10
fi
# Change the default layout to fullscreen. # Change the default layout to fullscreen.
hc set default_frame_layout 2 hc set default_frame_layout 2
@ -172,18 +72,6 @@ tag_keys=(bracketleft braceleft braceright parenleft equal
hc rename default "${tag_names[1]}" || true hc rename default "${tag_names[1]}" || true
for i in $tag_indexes; do for i in $tag_indexes; do
hc add "${tag_names[$i]}" hc add "${tag_names[$i]}"
key="${tag_keys[$i]}"
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))
# 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"
hc keybind "$Mod-Shift-$key" move_index "$j"
fi
done done
# theme # theme