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
|
|
|
|
|
2018-10-19 23:14:09 +02:00
|
|
|
# Reload sxhkd
|
2018-02-28 05:04:08 +01:00
|
|
|
super + Escape
|
|
|
|
pkill -USR1 -x sxhkd
|
|
|
|
|
2018-10-08 00:31:01 +02:00
|
|
|
# Quit the bspwm session
|
|
|
|
super + alt + Escape
|
|
|
|
bspc quit
|
|
|
|
|
2018-10-19 23:14:09 +02:00
|
|
|
# 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"}
|
|
|
|
|
2018-10-19 21:05:06 +02:00
|
|
|
# ====================
|
|
|
|
# ======= Node =======
|
|
|
|
# ====================
|
|
|
|
|
2018-02-28 05:04:08 +01:00
|
|
|
# Close the focused window
|
2018-10-19 23:14:09 +02:00
|
|
|
super + {_,shift} + q
|
|
|
|
bspc node -{c,k}
|
2018-02-28 05:04:08 +01:00
|
|
|
|
2018-10-19 23:14:09 +02:00
|
|
|
# Switch to / Swap with the node in the specified direction
|
|
|
|
super + {_,shift} + {h,j,k,l}
|
|
|
|
bspc node -{f,s} {west,south,north,east}
|
2018-02-28 05:04:08 +01:00
|
|
|
|
2018-10-19 21:05:06 +02:00
|
|
|
# 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}
|
|
|
|
|
2018-10-19 21:05:06 +02:00
|
|
|
# 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}'
|
|
|
|
|
2018-10-19 23:14:09 +02:00
|
|
|
# FLAGS: Toggle between node flags
|
|
|
|
super + {x,y,l}
|
|
|
|
bspc node -g {sticky,private,locked}
|
2018-10-19 21:05:06 +02:00
|
|
|
|
2018-10-19 23:14:09 +02:00
|
|
|
# STATES: Toggle between node states
|
|
|
|
super + {t,r,f,space}
|
|
|
|
bspc node focused -t ~{tiled,pseudo_tiled,fullscreen,floating}
|
2018-10-19 21:05:06 +02:00
|
|
|
|
|
|
|
# =======================
|
|
|
|
# ======= Desktop =======
|
|
|
|
# =======================
|
|
|
|
|
2018-02-28 05:04:08 +01:00
|
|
|
# Move to the next desktop on the current monitor
|
2018-10-19 23:14:09 +02:00
|
|
|
alt + {_, shift} + Tab
|
|
|
|
bspc desktop -f {next,prev}.local
|
2018-02-28 05:04:08 +01:00
|
|
|
|
2018-10-19 21:05:06 +02:00
|
|
|
# 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}'
|
|
|
|
|
2018-10-19 21:05:06 +02:00
|
|
|
# Switch between tiled and monocle desktop layouts
|
|
|
|
super + f
|
|
|
|
bspc desktop -l next
|
2018-02-28 05:04:08 +01:00
|
|
|
|
2018-10-19 21:05:06 +02:00
|
|
|
# =======================
|
|
|
|
# ======= polybar =======
|
|
|
|
# =======================
|
|
|
|
|
2018-02-28 05:04:08 +01:00
|
|
|
# top_padding depends on the height you set in polybar/config
|
2018-10-19 23:28:27 +02:00
|
|
|
super + o
|
|
|
|
(xdotool search --class --onlyvisible "Polybar" && \
|
|
|
|
(xdo hide -N "Polybar" && bspc config top_padding 0)) || \
|
|
|
|
(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}
|
|
|
|
|
2018-10-13 06:18:25 +02:00
|
|
|
# ====================
|
|
|
|
# ======= Rofi =======
|
|
|
|
# ====================
|
|
|
|
|
|
|
|
# Show the application launcher
|
2018-10-19 23:14:09 +02:00
|
|
|
alt + {z,space,backslash}
|
|
|
|
env XDG_CURRENT_DESKTOP="KDE" QT_FONT_DPI="192" rofi -show {drun,window,calc -modi calc -no-show-match -no-sort}
|
2018-10-13 06:18:25 +02:00
|
|
|
|
|
|
|
# Show pass
|
|
|
|
alt + slash
|
|
|
|
rofi-pass
|
|
|
|
|
2018-10-15 04:47:40 +02:00
|
|
|
# ===================
|
|
|
|
# ======= wal =======
|
|
|
|
# ===================
|
|
|
|
|
|
|
|
alt + m
|
2018-10-17 07:20:42 +02:00
|
|
|
wal -o ~/.config/wal/done.sh -i ~/Pictures/Wallpapers
|
2018-10-15 04:47:40 +02:00
|
|
|
|
2018-10-19 17:19:50 +02:00
|
|
|
# =====================
|
|
|
|
# ======= dunst =======
|
|
|
|
# =====================
|
|
|
|
|
2018-10-19 21:05:06 +02:00
|
|
|
# Get the current node's state
|
2018-10-19 17:19:50 +02:00
|
|
|
alt + n
|
|
|
|
SXHKD_NODE=$(bspc query -T -n) && \
|
2018-10-19 21:05:06 +02:00
|
|
|
notify-send "Current window $(echo $SXHKD_NODE | jq '.client.className') is in a node with state" "$(echo $SXHKD_NODE | jq '.client.state')"
|
2018-10-19 17:19:50 +02:00
|
|
|
|
2018-02-28 05:04:08 +01:00
|
|
|
# vim:ft=sxhkdrc
|