summaryrefslogtreecommitdiff
path: root/.config/sxhkd
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <55825613+luevano@users.noreply.github.com>2020-12-19 17:59:51 -0700
committerDavid Luevano Alvarado <55825613+luevano@users.noreply.github.com>2020-12-19 17:59:51 -0700
commit1a2357773586ee8421379de4070f71da40d1c679 (patch)
tree0d56955ebb4d28120b9d04942dc59d2a7315bd80 /.config/sxhkd
parentffb920179648bd4fdde1eb8b2e8b8e068fb4eb4b (diff)
Almost fully using bspwm
Diffstat (limited to '.config/sxhkd')
-rw-r--r--.config/sxhkd/sxhkdrc104
1 files changed, 61 insertions, 43 deletions
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc
index 46fa323..d4595ac 100644
--- a/.config/sxhkd/sxhkdrc
+++ b/.config/sxhkd/sxhkdrc
@@ -1,125 +1,143 @@
#
-# General keybinds.
+# General keybindings.
#
-# Terminal emulator.
+# Basic.
super + Return
- alacritty
-
-# Program launcher.
+ $TERMINAL
super + d
i3-dmenu-desktop
-
-# Reload sxhkd config.
super + Escape
pkill -USR1 -x sxhkd
+# Run programs.
+super + shift + w
+ $BROWSER
+super + shift + f
+ $TERMINAL -e $FILE
+super + Delete
+ $TERMINAL -e htop
+
+# Screenshots.
+{_,super, super + shift} + Print
+ $SSMGR {gui,full -c,full -p $SSPATH}
+
#
-# bspwm hotkeys
+# bspwm keybindings.
#
# Quit/restart bspwm.
-super + shift + r
- bspc wm -r
-# super + shift + {q,r}
-# bspc {quit,wm -r}
+super + shift + {e,r}
+ bspc {quit,wm -r}
# Close and kill.
-super + shift + q
- bspc node -k
-# super + {_,shift + }w
-# bspc node -{c,k}
+super + {_,shift + }q
+ bspc node -{c,k}
-# alternate between the tiled and monocle layout
+# Alternate between the tiled and monocle layout.
super + m
bspc desktop -l next
-# send the newest marked node to the newest preselected node
+# Send the newest marked node to the newest preselected node.
super + y
bspc node newest.marked.local -n newest.!automatic.local
-# swap the current node and the biggest window
+# Swap the current node and the biggest window.
super + g
bspc node -s biggest.window
#
-# state/flags
+# State/flags.
#
-# set the window state
+# Set the window state.
super + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
-# set the node flags
+# Set the node flags.
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}
#
-# focus/swap
+# Focus/swap.
#
-# focus the node in the given direction
+# Socus the node in the given direction.
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
-# focus the node for the given path jump
+# Focus the node for the given path jump.
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
-# focus the next/previous window in the current desktop
+# Focus the next/previous window in the current desktop.
super + {_,shift + }c
bspc node -f {next,prev}.local.!hidden.window
-# focus the next/previous desktop in the current monitor
-super + bracket{left,right}
+# Focus the next/previous desktop in the current monitor.
+super + brace{left,right}
bspc desktop -f {prev,next}.local
-# focus the last node/desktop
-super + {grave,Tab}
+# Focus the last node/desktop.
+super + {Tab,dead_acute}
bspc {node,desktop} -f last
-# focus the older or newer node in the focus history
+# Focus the older or newer node in the focus history.
super + {o,i}
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
-# focus or send to the given desktop
+# Focus or send to the given desktop.
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
#
-# preselect
+# Preselect.
#
-# preselect the direction
+# Preselect the direction.
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
-# preselect the ratio
+# Preselect the ratio.
super + ctrl + {1-9}
bspc node -o 0.{1-9}
-# cancel the preselection for the focused node
+# Cancel the preselection for the focused node.
super + ctrl + space
bspc node -p cancel
-# cancel the preselection for the focused desktop
+# Cancel the preselection for the focused desktop.
super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
-# move/resize
+# Move/resize.
#
-# expand a window by moving one of its side outward
+# Expand a window by moving one of its side outward.
super + alt + {h,j,k,l}
- bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
+ n=20; \
+ bspc node -z {left -$n 0,bottom 0 $n,top 0 -$n,right $n 0}
-# contract a window by moving one of its side inward
+# Contract a window by moving one of its side inward.
super + alt + shift + {h,j,k,l}
- bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
+ n=20; \
+ bspc node -z {right -$n 0,top 0 $n,bottom 0 -$n,left $n 0}
-# move a floating window
+# Move a floating window.
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
+
+
+# Smart resize, will grow or shrink depending on location.
+# Will always grow for floating nodes.
+super + alt + ctrl + {Left,Down,Up,Right}
+ n=10; \
+ { d1=left; d2=right; dx=-$n; dy=0; \
+ , d1=bottom; d2=top; dx=0; dy=$n; \
+ , d1=top; d2=bottom; dx=0; dy=-$n; \
+ , d1=right; d2=left; dx=$n; dy=0; \
+ } \
+ bspc node --resize $d1 $dx $dy || bspc node --resize $d2 $dx $dy