mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-02-06 12:59:30 +01:00
Fix bspwm terminology in sxhkdrc
I once tried to simplify bspwm terminology back when I started using the WM. Although it helped me use bspwm in the short term, there were some things I was still confused about (for example, I did not know the difference between a node with the fullscreen state and desktop with the monocle layout). This commit fixes that.
This commit is contained in:
parent
d42738f4b9
commit
09e8c16489
@ -1,6 +1,10 @@
|
|||||||
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
||||||
# Copyright (C) 2017-2018 Donovan Glover
|
# Copyright (C) 2017-2018 Donovan Glover
|
||||||
|
|
||||||
|
# ========================
|
||||||
|
# ======= terminal =======
|
||||||
|
# ========================
|
||||||
|
|
||||||
# Open a new terminal window
|
# Open a new terminal window
|
||||||
super + Return
|
super + Return
|
||||||
urxvtcd
|
urxvtcd
|
||||||
@ -17,14 +21,26 @@ super + backslash
|
|||||||
super + shift + backslash
|
super + shift + backslash
|
||||||
termite -e "tmux"
|
termite -e "tmux"
|
||||||
|
|
||||||
|
# =====================
|
||||||
|
# ======= sxhkd =======
|
||||||
|
# =====================
|
||||||
|
|
||||||
# Reload sxhkd (applies new keybindings, etc.)
|
# Reload sxhkd (applies new keybindings, etc.)
|
||||||
super + Escape
|
super + Escape
|
||||||
pkill -USR1 -x sxhkd
|
pkill -USR1 -x sxhkd
|
||||||
|
|
||||||
|
# =====================
|
||||||
|
# ======= bspwm =======
|
||||||
|
# =====================
|
||||||
|
|
||||||
# Quit the bspwm session
|
# Quit the bspwm session
|
||||||
super + alt + Escape
|
super + alt + Escape
|
||||||
bspc quit
|
bspc quit
|
||||||
|
|
||||||
|
# ====================
|
||||||
|
# ======= Node =======
|
||||||
|
# ====================
|
||||||
|
|
||||||
# Close the focused window
|
# Close the focused window
|
||||||
super + q
|
super + q
|
||||||
bspc node -c
|
bspc node -c
|
||||||
@ -41,17 +57,38 @@ super + {h,j,k,l}
|
|||||||
super + shift + {h,j,k,l}
|
super + shift + {h,j,k,l}
|
||||||
bspc node -s {west,south,north,east}
|
bspc node -s {west,south,north,east}
|
||||||
|
|
||||||
# Switch between windows in fullscreen (monocle mode)
|
# Switch to the next / previous node (includes monocle layout)
|
||||||
super + {n,m}
|
super + {n,m}
|
||||||
bspc node -f {next,prev}
|
bspc node -f {next,prev}
|
||||||
|
|
||||||
# Toggle the "sticky" state of a window
|
# Swap between the last window used
|
||||||
# (i.e. the window follows you no matter
|
super + c
|
||||||
# which workspace you choose)
|
bspc node -f last
|
||||||
# Useful for videos, etc.
|
|
||||||
|
# Send a node to a certain desktop
|
||||||
|
super + shift + {1-9,0}
|
||||||
|
bspc node -d '^{1-9,10}'
|
||||||
|
|
||||||
|
# =====================
|
||||||
|
# ======= Flags =======
|
||||||
|
# =====================
|
||||||
|
|
||||||
|
# Toggle the sticky flag
|
||||||
super + x
|
super + x
|
||||||
bspc node -g sticky
|
bspc node -g sticky
|
||||||
|
|
||||||
|
# Toggle the private flag
|
||||||
|
super + y
|
||||||
|
bspc node -g private
|
||||||
|
|
||||||
|
# Toggle the locked flag
|
||||||
|
super + b
|
||||||
|
bspc node -g locked
|
||||||
|
|
||||||
|
# =======================
|
||||||
|
# ======= Desktop =======
|
||||||
|
# =======================
|
||||||
|
|
||||||
# Move to the next desktop on the current monitor
|
# Move to the next desktop on the current monitor
|
||||||
alt + Tab
|
alt + Tab
|
||||||
bspc desktop -f next.local
|
bspc desktop -f next.local
|
||||||
@ -60,15 +97,7 @@ alt + Tab
|
|||||||
alt + shift + Tab
|
alt + shift + Tab
|
||||||
bspc desktop -f prev.local
|
bspc desktop -f prev.local
|
||||||
|
|
||||||
# Focus the last window you used
|
# Easily go back and forth between the last desktop used
|
||||||
# Useful to easily go back and forth
|
|
||||||
# between windows
|
|
||||||
super + c
|
|
||||||
bspc node -f last
|
|
||||||
|
|
||||||
# Focus the last desktop you used
|
|
||||||
# Useful to easily go back and forth
|
|
||||||
# between desktops
|
|
||||||
alt + a
|
alt + a
|
||||||
bspc desktop -f last
|
bspc desktop -f last
|
||||||
|
|
||||||
@ -76,20 +105,23 @@ alt + a
|
|||||||
super + {1-9,0}
|
super + {1-9,0}
|
||||||
bspc desktop -f '^{1-9,10}'
|
bspc desktop -f '^{1-9,10}'
|
||||||
|
|
||||||
# Send a window to a certain desktop
|
# Switch between tiled and monocle desktop layouts
|
||||||
super + shift + {1-9,0}
|
super + f
|
||||||
bspc node -d '^{1-9,10}'
|
bspc desktop -l next
|
||||||
|
|
||||||
# Toggle pseudo_tiled mode. This floats the node
|
# ======================
|
||||||
# in the area it occupies and automatically centers it
|
# ======= States =======
|
||||||
|
# ======================
|
||||||
|
|
||||||
|
# Toggle pseudo_tiled state (centered float)
|
||||||
super + r
|
super + r
|
||||||
bspc node focused -t ~pseudo_tiled
|
bspc node focused -t ~pseudo_tiled
|
||||||
|
|
||||||
# Toggle fullscreen mode
|
# Toggle fullscreen state
|
||||||
super + t
|
super + t
|
||||||
bspc node focused -t ~fullscreen
|
bspc node focused -t ~fullscreen
|
||||||
|
|
||||||
# Toggle floating mode
|
# Toggle floating state
|
||||||
super + v
|
super + v
|
||||||
bspc node focused -t ~floating
|
bspc node focused -t ~floating
|
||||||
|
|
||||||
@ -97,22 +129,23 @@ super + v
|
|||||||
super + space
|
super + space
|
||||||
bspc node focused -t ~floating
|
bspc node focused -t ~floating
|
||||||
|
|
||||||
# Toggle between "tiled" and "fullscreen" monocle mode
|
# ==========================
|
||||||
super + f
|
# ======= screenshot =======
|
||||||
bspc desktop -l next
|
# ==========================
|
||||||
|
|
||||||
super + p
|
super + p
|
||||||
~/.config/sxhkd/screenshot.sh
|
~/.config/sxhkd/screenshot.sh
|
||||||
|
|
||||||
|
# =======================
|
||||||
|
# ======= polybar =======
|
||||||
|
# =======================
|
||||||
|
|
||||||
super + o
|
super + o
|
||||||
xdo hide -N "Polybar" && bspc config top_padding 0
|
xdo hide -N "Polybar" && bspc config top_padding 0
|
||||||
|
|
||||||
# Note that polybar automatically handles top_padding *but*
|
|
||||||
# this does not apply to all desktops, so we have to specify it manually here
|
|
||||||
# top_padding depends on the height you set in polybar/config
|
# top_padding depends on the height you set in polybar/config
|
||||||
super + O
|
super + O
|
||||||
xdo show -N "Polybar" && bspc config top_padding 80
|
xdo show -N "Polybar" && bspc config top_padding 80
|
||||||
# xdo show -N "Polybar" && bspc config top_padding 128
|
|
||||||
|
|
||||||
# =====================
|
# =====================
|
||||||
# ===== Preselect =====
|
# ===== Preselect =====
|
||||||
@ -146,11 +179,6 @@ super + alt + shift + {h,j,k,l}
|
|||||||
super + {Left,Down,Up,Right}
|
super + {Left,Down,Up,Right}
|
||||||
bspc node -v {-20 0,0 20,0 -20,20 0}
|
bspc node -v {-20 0,0 20,0 -20,20 0}
|
||||||
|
|
||||||
# Prevent a node from being changed (resized, moved, etc.)
|
|
||||||
# when you create new ones
|
|
||||||
super + y
|
|
||||||
bspc node focused -g private
|
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# ======= Rofi =======
|
# ======= Rofi =======
|
||||||
# ====================
|
# ====================
|
||||||
@ -182,9 +210,9 @@ alt + m
|
|||||||
# ======= dunst =======
|
# ======= dunst =======
|
||||||
# =====================
|
# =====================
|
||||||
|
|
||||||
# Get the current node's mode
|
# Get the current node's state
|
||||||
alt + n
|
alt + n
|
||||||
SXHKD_NODE=$(bspc query -T -n) && \
|
SXHKD_NODE=$(bspc query -T -n) && \
|
||||||
notify-send "Current window $(echo $SXHKD_NODE | jq '.client.className') is in mode" "$(echo $SXHKD_NODE | jq '.client.state')"
|
notify-send "Current window $(echo $SXHKD_NODE | jq '.client.className') is in a node with state" "$(echo $SXHKD_NODE | jq '.client.state')"
|
||||||
|
|
||||||
# vim:ft=sxhkdrc
|
# vim:ft=sxhkdrc
|
||||||
|
Loading…
Reference in New Issue
Block a user