nix-config/.config/sxhkd/sxhkdrc

219 lines
4.6 KiB
Plaintext
Raw Normal View History

2018-02-28 05:04:08 +01:00
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017-2018 Donovan Glover
# ========================
# ======= terminal =======
# ========================
2018-02-28 05:04:08 +01:00
# Open a new terminal window
super + Return
urxvtcd
2018-02-28 05:04:08 +01:00
# 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 =======
# =====================
2018-02-28 05:04:08 +01:00
# Reload sxhkd (applies new keybindings, etc.)
super + Escape
pkill -USR1 -x sxhkd
# =====================
# ======= bspwm =======
# =====================
# Quit the bspwm session
super + alt + Escape
bspc quit
# ====================
# ======= Node =======
# ====================
2018-02-28 05:04:08 +01:00
# Close the focused window
super + q
bspc node -c
# Force close the focused window
super + shift + q
bspc node -k
# 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)
2018-02-28 05:04:08 +01:00
super + {n,m}
bspc node -f {next,prev}
# Swap between the last window used
super + c
bspc node -f last
# Send a node to a certain desktop
super + shift + {1-9,0}
bspc node -d '^{1-9,10}'
# =====================
# ======= Flags =======
# =====================
# Toggle the sticky flag
2018-02-28 05:04:08 +01:00
super + x
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 =======
# =======================
2018-02-28 05:04:08 +01:00
# Move to the next desktop on the current monitor
alt + Tab
bspc desktop -f next.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
2018-02-28 05:04:08 +01:00
alt + a
bspc desktop -f last
# Focus a certain desktop
super + {1-9,0}
bspc desktop -f '^{1-9,10}'
# Switch between tiled and monocle desktop layouts
super + f
bspc desktop -l next
2018-02-28 05:04:08 +01:00
# ======================
# ======= States =======
# ======================
# Toggle pseudo_tiled state (centered float)
2018-02-28 05:04:08 +01:00
super + r
bspc node focused -t ~pseudo_tiled
2018-02-28 05:04:08 +01:00
# Toggle fullscreen state
2018-02-28 05:04:08 +01:00
super + t
bspc node focused -t ~fullscreen
# Toggle floating state
2018-02-28 05:04:08 +01:00
super + v
bspc node focused -t ~floating
2018-02-28 05:04:08 +01:00
# Same as above
super + space
bspc node focused -t ~floating
2018-02-28 05:04:08 +01:00
# ==========================
# ======= screenshot =======
# ==========================
2018-02-28 05:04:08 +01:00
super + p
~/.config/sxhkd/screenshot.sh
# =======================
# ======= polybar =======
# =======================
2018-02-28 05:04:08 +01:00
super + o
xdo hide -N "Polybar" && bspc config top_padding 0
# top_padding depends on the height you set in polybar/config
super + O
xdo show -N "Polybar" && bspc config top_padding 80
2018-02-28 05:04:08 +01:00
# =====================
# ===== Preselect =====
# =====================
# Preselect where windows go
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# Preselect the ratio of windows
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# Cancel the preselection for the focused node
super + ctrl + space
bspc node -p cancel
# ======================
# ======= Resize =======
# ======================
# Expand a window (move its side outward)
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# Contract a window (move 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}
# Move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
# ====================
# ======= Rofi =======
# ====================
# Show the application launcher
alt + z
env XDG_CURRENT_DESKTOP="KDE" QT_FONT_DPI="192" rofi -show drun
# Show open windows
alt + space
rofi -show window
# Show pass
alt + slash
rofi-pass
# Show calculator with natural language support
alt + backslash
rofi -show calc -modi calc -no-show-match -no-sort
# ===================
# ======= wal =======
# ===================
alt + m
wal -o ~/.config/wal/done.sh -i ~/Pictures/Wallpapers
# =====================
# ======= dunst =======
# =====================
# Get the current node's state
alt + n
SXHKD_NODE=$(bspc query -T -n) && \
notify-send "Current window $(echo $SXHKD_NODE | jq '.client.className') is in a node with state" "$(echo $SXHKD_NODE | jq '.client.state')"
2018-02-28 05:04:08 +01:00
# vim:ft=sxhkdrc