Created
January 12, 2017 08:59
-
-
Save Doaxan/d9af3d8011b7df2057776c1a0d137fc1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bspwm hotkeys | |
# | |
# Cleanly quit bspwm | |
#super + shift + q | |
# bspc quit 1 && pkill lemonpanel && pkill lemonbar | |
#super + space | |
# synapse | |
# Toggle panels | |
super + shift + space | |
{pkill lemonpanel; pkill lemonbar; pkill cat; pkill stalonetray; bspc config top_padding $((-$gap)) ,\ | |
bspc config top_padding $(($PANEL_HEIGHT-$gap)); lemonpanel & } | |
# Show keybindings | |
super + F1 | |
$TERMINAL -e keybindings.sh | |
# | |
# Window manipulation | |
# ______________ | |
# Close window | |
super + shift + q | |
bspc node -c | |
# Kill window | |
super + shift + r | |
bspc node -k | |
# Toggle tiling mode of window | |
super + shift + t | |
bspc node -t {pseudo_tiled,tiled} | |
super + t | |
{bspc node -t floating && window-placer $(bspc query -T -d | grep -o '"state":"floating"' | wc -l),bspc node -t tiled} | |
# Force all windows of the desktop to tile | |
super + ctrl + t | |
bspcp tile | |
# Force all windows of the desktop to float and arrange them | |
super + ctrl + shift + t | |
bspcp float | |
# Toggle fullscreen | |
super + shift + f | |
bspc node -t {fullscreen,tiled} | |
# Try to keep size and position of the selected window | |
super + o | |
bspc node -g private | |
# Make window sticky | |
super + i | |
bspc node -g sticky | |
# Lock a window from closing | |
super + Escape | |
bspc node -g locked | |
### Map or unmap windows (functional equivalent of "minimize") | |
super + c | |
whid dmenu | |
super + shift + c | |
whid hide | |
super + ctrl + c | |
whid last | |
# | |
# Window moving and splitting | |
# ______________ | |
# Autopresel (split window in its largest dimension) | |
super + ctrl + Return | |
auto-presel | |
#ctrl + space | |
# auto-presel | |
# Presel window for splitting in certain direction | |
#alt + ctrl + {a,s,w,d} | |
# bspc node -p \~{west,south,north,east} -i | |
#alt + ctrl + {h,j,k,l} | |
# bspc node -p \~{west,south,north,east} | |
#alt + ctrl + {Left,Down,Up,Right} | |
# bspc node -p \~{west,south,north,east} | |
# Presel the desktop for splitting in certain direction | |
#alt + shift + {a,s,w,d} | |
# bspc node @/ -p \~{west,south,north,east} | |
#alt + shift + {h,j,k,l} | |
# bspc node @/ -p \~{west,south,north,east} | |
#alt + shift + {Left,Down,Up,Right} | |
# bspc node @/ -p \~{west,south,north,east} | |
# Set splitting ratio of windows | |
alt + ctrl + {1-9} | |
bspc node -o 0.{1-9} | |
# Move current window to largest space or preselected area if there is one. | |
super + Return | |
windowpromoter | |
# Create a new "master area", splitting the whole desktop instead of just windows. | |
#alt + Return | |
# bspc node -n @/ | |
# go (Shift=move) to desktop (and focus the monitor that the desktop is located on. Bspwm style) | |
super + {_,shift + }{1-9,0} | |
bspc {desktop -f,node -d} ^{1-9,10} | |
## Alternative: i3 style behavior (focus nth, desktop of the focused monitor) | |
#super + {1-9,0} | |
# focusdesktopofthismonitor {1-9} | |
#super + shift + {1-9,0} | |
# movetodesktopofthismonitor {1-9,10} | |
## Another alternative: xmonad style desktops. You have 10 desktops shared between all monitors, | |
## and focusing a desktop focuses it on the currently focused monitor | |
#super + {1-9,0} | |
# summondesktop.sh {1-9,10} | |
#super + shift + {1-9,0} | |
# bspc node -d ^{1-9,10} | |
# Select previous / next desktop | |
super + {m,n} | |
bspc desktop -f {prev.occupied,next.occupied} | |
# cycle windows | |
alt + {_,shift + }Tab | |
bspc node -f {next,prev} | |
# Go to specific window | |
super + Tab | |
WindowSelector | |
#Focus windows by direction, works with multihead | |
super + {a,s,w,d} | |
focusmover {west,south,north,east} | |
super + {h,j,k,l} | |
focusmover {west,south,north,east} | |
super + {Left,Down,Up,Right} | |
focusmover {west,south,north,east} | |
# Move tiled windows. Moving a tiled window to | |
# preselected one moves into preselection instead. | |
# Moving out of the screen should move the window to next monitor if possible | |
super + shift + {a,s,w,d} | |
windowgrabber {west,south,north,east} | |
super + shift + {h,j,k,l} | |
windowgrabber {west,south,north,east} | |
# Different style of movement: transplant into window in chosen direction | |
super + shift + {Left,Down,Up,Right} | |
euclid_mover {west,south,north,east} | |
#resize windows | |
super + ctrl + {a,s,w,d} | |
bspwm_resize.sh {west,south,north,east} | |
#super + ctrl + {h,j,k,l} | |
# bspwm_resize.sh {west,south,north,east} | |
super + ctrl + {Left,Down,Up,Right} | |
bspwm_resize.sh {west,south,north,east} | |
# | |
# Layout manipulation/desktop level controls | |
# ______________ | |
# Toggle monocle mode | |
super + f | |
bspc desktop -l next | |
# Balance tree | |
super + b | |
bspc node @/ -B | |
# Balance brother node. If you do this on biggest window of the desktop, it usually means balancing all windows with except the biggest. | |
super + alt + b | |
bspc node @brother -B | |
# Undo balancing (equalize windows) | |
super + ctrl + b | |
bspc node @/ -E | |
# Toggle automatic balancing of windows | |
alt + b | |
euclid_balancer | |
# Mirror and flip leaves of tree | |
super + {comma,period} | |
bspc node @/ -F {horizontal,vertical} | |
# Rotate leaves of tree | |
super + shift + {comma,period} | |
bspc node @/ -R {90,270} | |
# Change window gap | |
super + g | |
bspc config -d focused window_gap {$gap,$(($gap+$gap)),$(($gap+$gap+$gap))} | |
super + button{4,5} | |
bspc config -d focused window_gap $((`bspc config -d focused window_gap` {+,-} 2 )) | |
# | |
# mouse bindings | |
# __________________ | |
### Legacy mousebindings used with older versions of bspwm | |
## Move or resize window | |
#super + button{1-3} | |
# bspc pointer -g {move,resize_side,resize_corner} | |
# | |
## Needed for ^^^^ | |
#super + button{1-3} | |
# ; bspc pointer -g {move,resize_side,resize_corner} | |
# | |
##super + @button{1-3} | |
## bspc pointer -u | |
## Needed to focus windows by clicking, if you wish to disable | |
## focus_follows_mouse behavior (required to use menu of xfdesktop, whiskermenu or click java apps) | |
#~button1 | |
# bspc pointer -g focus && xdo raise $(pfw) | |
## Alternative that allows clicking otherwise problematic stuff | |
#button1 | |
bspc pointer -g focus &&clickpasser 1 | |
#@button1 | |
# clickpasser 1 | |
### Add or remove desktops by scrolling | |
super + ctrl + button5 | |
bspcp dsktp rm | |
super + ctrl + button4 | |
bspcp dsktp add | |
# Spawn applications popup menu and manually tile selected | |
# app where your mouse was when you opened the menu. Smartsplit only chooses | |
# biggest dimension of the window, MouseLaunch only cares which edge is closer. | |
# mod5 is alt_gr (first key right from space) on most keyboards. | |
mod5 + @button1 | |
MouseLaunch ; mygtkmenui -- .config/GTKmenu/LaunchMenu | |
# smartsplit ; dboxmenu | |
# Spawn window manipulation menu | |
# Mod1 is alt | |
#mod1 + @button1 | |
# BspwmWindowMenu | |
# mygtkmenui -- .config/GTKmenu/BspwmWindowMenui | |
# These two are needed if you want to use xfdesktops menus while | |
# focus_follows_pointer is on | |
#@button3 | |
# clickpasser 3 | |
#@button2 | |
# clickpasser 2 | |
# | |
# Touchpad "gestures" (depend on your touchpad driver, very likely to be unavailable) | |
#_____________________ | |
### Three finger swipe (left or right) to change desktop | |
#@button{10,11} | |
# bspc desktop -f {prev,next} | |
### Three finger swipe (up) to launch dswitcher | |
#@button8 | |
# dswitcher & xdotool mousemove 640 400 | |
# | |
# spawn programs | |
# | |
# run applications | |
#super + space | |
# dmouse | |
#super + p | |
# dmenu_recent -h $PANEL_HEIGHT | |
#super + Return | |
# $TERMINAL | |
super + z | |
xfce4-terminal | |
# gnome-terminal | |
super + r | |
finder | |
super + shift + b | |
$BROWSER | |
super + e | |
spacefm | |
super + shift + e | |
$TERMINAL -e ranger | |
scrot -q 100 | |
# | |
# Media keys | |
# | |
#XF86AudioRaiseVolume | |
# amixer set Master 2%+ | |
#XF86AudioLowerVolume | |
# amixer set Master 2%- | |
XF86AudioMute | |
# amixer set Master toggle | |
pactl set-sink-mute 0 toggle | |
#XF86MonBrightnessDown | |
# xbacklight -dec 10 | |
#XF86MonBrightnessUp | |
# xbacklight -inc 10 | |
#XF86Sleep | |
# systemctl suspend | |
# make sxhkd reload its configuration files: | |
super + shift + Escape | |
pkill -USR1 -x sxhkd | |
# In case bspwmrc fails to execute/you wish have plugged in a new monitor | |
super + shift + r | |
bspwmrc | |
#edit this file | |
alt + ctrl + space | |
$GUI_EDITOR ~/.config/sxhkd/sxhkdrc | |
# Toggle compositing | |
super + ctrl + space | |
{pkill compton ,\ | |
compton -b } | |
# Remove receptacles | |
super + BackSpace | |
for i in $(bspc query -N -n .leaf.!window.local); do bspc node $i -k; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment