mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-12-16 03:40:57 +01:00
sxhkd: Combine similar keybindings
There is a shorthand syntax offered by sxhkd that helps us make our config files more compact. I avoided this syntax at first since I was new to the software, but now that I've used bspc, sxhkd, and the shell enough, the shorthand syntax is more concise and easier to read.
This commit is contained in:
parent
09e8c16489
commit
dfe0e61daf
@ -1,61 +1,37 @@
|
|||||||
# 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
|
||||||
|
|
||||||
# ========================
|
# Reload sxhkd
|
||||||
# ======= terminal =======
|
|
||||||
# ========================
|
|
||||||
|
|
||||||
# Open a new terminal window
|
|
||||||
super + Return
|
|
||||||
urxvtcd
|
|
||||||
|
|
||||||
# Open a new terminal window with tmux
|
|
||||||
super + shift + Return
|
|
||||||
urxvtcd -e "tmux"
|
|
||||||
|
|
||||||
# Open a new transparent terminal with tmux without the status bar
|
|
||||||
super + backslash
|
|
||||||
termite -e "tmux new-session; set status"
|
|
||||||
|
|
||||||
# Open a new transparent terminal with tmux
|
|
||||||
super + shift + backslash
|
|
||||||
termite -e "tmux"
|
|
||||||
|
|
||||||
# =====================
|
|
||||||
# ======= sxhkd =======
|
|
||||||
# =====================
|
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
# Take a screenshot
|
||||||
|
super + p
|
||||||
|
~/.config/sxhkd/screenshot.sh
|
||||||
|
|
||||||
|
# Open a new terminal window
|
||||||
|
super + {_,shift} + Return
|
||||||
|
urxvtcd {_,-e "tmux"}
|
||||||
|
|
||||||
|
# Open a new transparent terminal
|
||||||
|
super + {_,shift} + backslash
|
||||||
|
termite -e {"tmux new-session; set status", "tmux"}
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# ======= Node =======
|
# ======= Node =======
|
||||||
# ====================
|
# ====================
|
||||||
|
|
||||||
# Close the focused window
|
# Close the focused window
|
||||||
super + q
|
super + {_,shift} + q
|
||||||
bspc node -c
|
bspc node -{c,k}
|
||||||
|
|
||||||
# Force close the focused window
|
# Switch to / Swap with the node in the specified direction
|
||||||
super + shift + q
|
super + {_,shift} + {h,j,k,l}
|
||||||
bspc node -k
|
bspc node -{f,s} {west,south,north,east}
|
||||||
|
|
||||||
# Switch to the window in a certain direction
|
|
||||||
super + {h,j,k,l}
|
|
||||||
bspc node -f {west,south,north,east}
|
|
||||||
|
|
||||||
# Swap a window with another in a certain direction
|
|
||||||
super + shift + {h,j,k,l}
|
|
||||||
bspc node -s {west,south,north,east}
|
|
||||||
|
|
||||||
# Switch to the next / previous node (includes monocle layout)
|
# Switch to the next / previous node (includes monocle layout)
|
||||||
super + {n,m}
|
super + {n,m}
|
||||||
@ -69,33 +45,21 @@ super + c
|
|||||||
super + shift + {1-9,0}
|
super + shift + {1-9,0}
|
||||||
bspc node -d '^{1-9,10}'
|
bspc node -d '^{1-9,10}'
|
||||||
|
|
||||||
# =====================
|
# FLAGS: Toggle between node flags
|
||||||
# ======= Flags =======
|
super + {x,y,l}
|
||||||
# =====================
|
bspc node -g {sticky,private,locked}
|
||||||
|
|
||||||
# Toggle the sticky flag
|
# STATES: Toggle between node states
|
||||||
super + x
|
super + {t,r,f,space}
|
||||||
bspc node -g sticky
|
bspc node focused -t ~{tiled,pseudo_tiled,fullscreen,floating}
|
||||||
|
|
||||||
# Toggle the private flag
|
|
||||||
super + y
|
|
||||||
bspc node -g private
|
|
||||||
|
|
||||||
# Toggle the locked flag
|
|
||||||
super + b
|
|
||||||
bspc node -g locked
|
|
||||||
|
|
||||||
# =======================
|
# =======================
|
||||||
# ======= Desktop =======
|
# ======= Desktop =======
|
||||||
# =======================
|
# =======================
|
||||||
|
|
||||||
# Move to the next desktop on the current monitor
|
# Move to the next desktop on the current monitor
|
||||||
alt + Tab
|
alt + {_, shift} + Tab
|
||||||
bspc desktop -f next.local
|
bspc desktop -f {next,prev}.local
|
||||||
|
|
||||||
# Move to the previous desktop on the current monitor
|
|
||||||
alt + shift + Tab
|
|
||||||
bspc desktop -f prev.local
|
|
||||||
|
|
||||||
# Easily go back and forth between the last desktop used
|
# Easily go back and forth between the last desktop used
|
||||||
alt + a
|
alt + a
|
||||||
@ -109,33 +73,6 @@ super + {1-9,0}
|
|||||||
super + f
|
super + f
|
||||||
bspc desktop -l next
|
bspc desktop -l next
|
||||||
|
|
||||||
# ======================
|
|
||||||
# ======= States =======
|
|
||||||
# ======================
|
|
||||||
|
|
||||||
# Toggle pseudo_tiled state (centered float)
|
|
||||||
super + r
|
|
||||||
bspc node focused -t ~pseudo_tiled
|
|
||||||
|
|
||||||
# Toggle fullscreen state
|
|
||||||
super + t
|
|
||||||
bspc node focused -t ~fullscreen
|
|
||||||
|
|
||||||
# Toggle floating state
|
|
||||||
super + v
|
|
||||||
bspc node focused -t ~floating
|
|
||||||
|
|
||||||
# Same as above
|
|
||||||
super + space
|
|
||||||
bspc node focused -t ~floating
|
|
||||||
|
|
||||||
# ==========================
|
|
||||||
# ======= screenshot =======
|
|
||||||
# ==========================
|
|
||||||
|
|
||||||
super + p
|
|
||||||
~/.config/sxhkd/screenshot.sh
|
|
||||||
|
|
||||||
# =======================
|
# =======================
|
||||||
# ======= polybar =======
|
# ======= polybar =======
|
||||||
# =======================
|
# =======================
|
||||||
@ -184,21 +121,13 @@ super + {Left,Down,Up,Right}
|
|||||||
# ====================
|
# ====================
|
||||||
|
|
||||||
# Show the application launcher
|
# Show the application launcher
|
||||||
alt + z
|
alt + {z,space,backslash}
|
||||||
env XDG_CURRENT_DESKTOP="KDE" QT_FONT_DPI="192" rofi -show drun
|
env XDG_CURRENT_DESKTOP="KDE" QT_FONT_DPI="192" rofi -show {drun,window,calc -modi calc -no-show-match -no-sort}
|
||||||
|
|
||||||
# Show open windows
|
|
||||||
alt + space
|
|
||||||
rofi -show window
|
|
||||||
|
|
||||||
# Show pass
|
# Show pass
|
||||||
alt + slash
|
alt + slash
|
||||||
rofi-pass
|
rofi-pass
|
||||||
|
|
||||||
# Show calculator with natural language support
|
|
||||||
alt + backslash
|
|
||||||
rofi -show calc -modi calc -no-show-match -no-sort
|
|
||||||
|
|
||||||
# ===================
|
# ===================
|
||||||
# ======= wal =======
|
# ======= wal =======
|
||||||
# ===================
|
# ===================
|
||||||
|
Loading…
Reference in New Issue
Block a user