This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/env/wm/sxhkdrc

230 lines
7.2 KiB
Plaintext
Raw Normal View History

2016-01-06 11:55:04 -06:00
# node manager shortcuts
2016-01-07 02:16:53 -06:00
# focus the node for the given path jump
super + {p,b,comma,period}
2016-10-01 01:26:31 -05:00
bspc node -f @{parent,brother,first,second}
2016-01-06 11:55:04 -06:00
2016-01-07 02:16:53 -06:00
# set modes to tiled/floating for current node
2016-01-06 11:55:04 -06:00
super + {s,f}
bspc node -t {tiled,floating}
2016-01-07 02:16:53 -06:00
# set modes to pseudo_tiled/fullscreen for current node
super + shift + {s,f}
2016-10-01 01:26:31 -05:00
bspc node -t {pseudo_tiled,fullscreen -l above}
2016-01-06 11:55:04 -06:00
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
2016-07-19 13:50:51 -05:00
# focus the next floating node
super + ctrl + f
bspc node -f next.floating
2016-01-06 11:55:04 -06:00
# swap positions with the previous node
super + apostrophe
bspc node -s last
# swap the current node with the biggest node on the current desktop
super + m
bspc node -s biggest
# move/swap between nodes using vim-style arrows
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# swap previous/next desktops
super + bracket{left,right}
bspc desktop -f {prev,next}
# preselect the splitting area for the current node
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# clear the splitting area
super + ctrl + {_,shift + }space
bspc {node -p cancel,desktop -c}
# expand the current node
super + alt + {h,j,k,l}
2016-10-01 01:26:31 -05:00
bspc node {@west -r -10,@south -r +10,@north -r -10,@east -r +10}
2016-01-06 11:55:04 -06:00
# shrink the current node
super + alt + shift + {h,j,k,l}
2016-10-01 01:26:31 -05:00
bspc node {@east -r -10,@north -r +10,@south -r -10,@west -r +10}
2016-01-06 11:55:04 -06:00
# set node split ratio
super + ctrl + {1-9,0}
bspc node -r 0.{1-9,10}
2016-01-07 02:16:53 -06:00
# move a floating window very slowly
super + shift + {Left,Down,Up,Right}
2016-10-01 01:26:31 -05:00
xdo move {-x -1,-y +1,-y -1,-x +1}
2016-01-07 02:16:53 -06:00
# move a floating window
super + {Left,Down,Up,Right}
2016-10-01 01:26:31 -05:00
xdo move {-x -20,-y +20,-y -20,-x +20}
2016-01-07 02:16:53 -06:00
2016-01-06 11:55:04 -06:00
# focus/move node to the selected desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} ^{1-9,10}
# focus clicked node
~button1
bspc node -f pointed
2016-01-06 11:55:04 -06:00
# mouse controls for node movement and resizing
super + button{1-3}
bspc pointer -g {move,resize_side,resize_corner}
# simulate mouse2
shift + super + button1
2016-10-01 01:26:31 -05:00
bspc pointer -g resize_corner
2016-01-06 11:55:04 -06:00
# ???
super + !button{1-3}
bspc pointer -t %i %i
# ???
super + @button{1-3}
bspc pointer -u
# change node gap and desktop padding
super + plus
2016-07-27 08:57:56 -05:00
bspc config -d focused window_gap $((`bspc config -d focused window_gap` + 5 ))
2016-01-06 11:55:04 -06:00
super + equal
2016-07-27 08:57:56 -05:00
bspc config -m $(bspc query -M | head -n 1) top_padding $TOP_BAR_PADDING; bspc config -m $(bspc query -M | head -n 1) bottom_padding $BOTTOM_BAR_PADDING; bspc config -d focused window_gap $WINDOW_GAP
2016-01-06 11:55:04 -06:00
super + minus
2016-07-27 08:57:56 -05:00
bspc config -d focused window_gap $((`bspc config -d focused window_gap` - 5 ))
2016-01-06 11:55:04 -06:00
super + alt + r
2016-07-27 08:57:56 -05:00
bspc config -m $(bspc query -M | head -n 1) bottom_padding $BOTTOM_BAR_PADDING; bspc config -m $(bspc query -M | head -n 1) top_padding $TOP_BAR_PADDING; bspc config -d focused window_gap $WINDOW_GAP
super + alt + equal
bspc config -d focused bottom_padding 0; bspc config -d focused top_padding 0; bspc config -d focused left_padding 0; bspc config -d focused right_padding 0
super + alt + plus
bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) + 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) + 5); bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) + 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) + 5)
super + ctrl + alt + k
bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) - 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) - 5)
super + ctrl + alt + j
bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) + 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) + 5)
super + ctrl + alt + h
bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) - 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) - 5)
super + ctrl + alt + l
bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) + 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) + 5)
2016-01-06 11:55:04 -06:00
super + alt + plus
2016-07-27 08:57:56 -05:00
bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) + 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) + 5); bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) + 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) + 5)
2016-01-06 11:55:04 -06:00
2016-07-29 14:07:58 -05:00
super + ctrl + alt + space
bspc config -d focused bottom_padding 200; bspc config -d focused top_padding 200; bspc config -d focused left_padding 400; bspc config -d focused right_padding 400
2016-01-06 11:55:04 -06:00
super + alt + minus
2016-07-27 08:57:56 -05:00
bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) - 5)
2016-01-06 11:55:04 -06:00
# wm-independant shortcuts
# spawn a transparent node
super + alt + t
2016-10-01 01:26:31 -05:00
urxvtc && compton-trans -c -o 0
2016-01-06 11:55:04 -06:00
2016-01-07 02:16:53 -06:00
# rotate the current node
super + r
2016-10-01 01:26:31 -05:00
bspc node -R 90
2016-01-07 02:16:53 -06:00
# balance the current node
super + shift + b
2016-10-01 01:26:31 -05:00
bspc node -B
2016-01-07 02:16:53 -06:00
2016-01-06 11:55:04 -06:00
# make current node transparent
super + t
2016-10-01 01:26:31 -05:00
compton-trans -c -o 0
2016-01-06 11:55:04 -06:00
# make current node fully opaque
super + shift + t
2016-10-01 01:26:31 -05:00
compton-trans -c -o 100
2016-01-06 11:55:04 -06:00
# swap sxhkx config with an alternate file and reload the new one
super + shift + alt + ctrl + r
2016-10-01 01:26:31 -05:00
if [ -e ~/.config/sxhkd/altsxhkdrc ]; then mv ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/origsxhkdrc && mv ~/.config/sxhkd/altsxhkdrc ~/.config/sxhkd/sxhkdrc && pkill -USR1 -x sxhkd; fi
2016-01-06 11:55:04 -06:00
# spawn a terminal
super + Return
urxvtc
2016-11-30 13:57:45 -06:00
super + shift + Return
urxvtc -geometry 80x24; \
bspc node -t floating
2016-01-06 11:55:04 -06:00
# spawn the app launcher
super + space
2016-11-12 14:18:20 -06:00
rofi -show run -font "$PRIMARY_FONT_FAMILY $PRIMARY_FONT_SIZE" -lines 16 -width 10 -padding 8 -fuzzy -bw "$BORDER_WIDTH" -color-enabled -color-window "#$(get_color 00)","#$(get_color 0D)","#$(get_color 0D)","#$(get_color 00)" -color-normal "#$(get_color 00)","#$(get_color 06)","#$(get_color 00)","#$(get_color 0D)","#$(get_color 00)" -separator-style none -hide-scrollbar
2016-01-06 11:55:04 -06:00
# lock the desktop
super + ctrl + shift + l
2016-10-01 01:26:31 -05:00
slock
2016-01-06 11:55:04 -06:00
# spawn gui file explorer
super + e
2016-10-01 01:26:31 -05:00
thunar
2016-01-06 11:55:04 -06:00
# volumes controls and media navigation for media keys
{_,shift + }XF86AudioLowerVolume
2016-10-01 01:26:31 -05:00
amixer -D pulse sset Master 5%-
# pulseaudio-ctl lower
# ADJ={10,1} && amixer -c 1 sset Speaker $ADJ%- && amixer -c 1 sset Headphone $ADJ%- && amixer -c 1 sset Master $ADJ%- && update_bar_MasterVolume
2016-01-06 11:55:04 -06:00
{_,shift + }XF86AudioRaiseVolume
2016-10-01 01:26:31 -05:00
amixer -D pulse sset Master 5%+
# pulseaudio-ctl raise
# ADJ={10,1} && amixer -c 1 sset Speaker $ADJ%+ && amixer -c 1 sset Headphone $ADJ%+ && amixer -c 1 sset Master $ADJ%+ && update_bar_MasterVolume
2016-01-06 11:55:04 -06:00
XF86AudioMute
2016-10-01 01:26:31 -05:00
amixer -D pulse sset Master toggle
# pulseaudio-ctl mute
# amixer -c 1 sset Master toggle && update_bar_MasterVolume
2016-01-06 11:55:04 -06:00
XF86AudioPlay
2016-10-01 01:26:31 -05:00
mpc toggle
2016-01-06 11:55:04 -06:00
XF86AudioNext
2016-10-01 01:26:31 -05:00
mpc next
2016-01-06 11:55:04 -06:00
XF86AudioPrev
2016-10-01 01:26:31 -05:00
mpc prev
2016-01-06 11:55:04 -06:00
# monitor brightness controls for monitor birghtness keys
{_,shift + }XF86MonBrightnessUp
2016-10-01 01:26:31 -05:00
add_percent_brightness {0.1,0.01} && update_bar_DisplayBrightness
2016-01-06 11:55:04 -06:00
{_,shift + }XF86MonBrightnessDown
2016-10-01 01:26:31 -05:00
sub_percent_brightness {0.1,0.01} && update_bar_DisplayBrightness
2016-01-06 11:55:04 -06:00
2016-11-29 14:29:35 -06:00
# close the current application
super + c
bspc node -c
# kill the current application
super + shift + c
bspc node -k
# kill the wm
super + ctrl + {alt +,_} Escape
{bspc wm -d > "$BSPWM_STATE_FILE" && bspc quit, \
bspc quit 1}
2016-10-01 01:26:31 -05:00
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd