Skip to content

Instantly share code, notes, and snippets.

@alsgu3rra
Created May 14, 2024 20:07
Show Gist options
  • Save alsgu3rra/40e64afa5f20f83c58af775954c67028 to your computer and use it in GitHub Desktop.
Save alsgu3rra/40e64afa5f20f83c58af775954c67028 to your computer and use it in GitHub Desktop.
Configuração do Sxhkd
#################################################################
# KEYBOARD BINDINGS FOR ANY TWM
#################################################################
#################################################################
# SUPER + FUNCTION KEYS
#################################################################
# Navegador Web
super + F1
google-chrome-stable
# Visual Studio Code
super + F2
code
# Vlc
super + F3
vlc --video-on-top
# Rofi
super + d
rofi -show drun
#################################################################
# SUPER + ... KEYS
#################################################################
# Htop
super + h
urxvt 'htop task manager' -e htop
# Archlinux Logout
super + x
archlinux-logout
# Rofi theme selector
super + r
rofi-theme-selector
# Pavucontrol
super + v
pavucontrol
# Alacritty
super + Return
alacritty
#################################################################
# SUPER + SHIFT KEYS
#################################################################
# File-Manager
super + shift + Return
ranger
# Dmenu
super + shift + d
dmenu_run -i -nb '#191919' -nf '#fea63c' -sb '#fea63c' -sf '#191919' -fn 'NotoMonoRegular:bold:pixelsize=14'
# Rofi
super + d
~/.config/bspwm/launcher/launcher.sh
# Reload Sxhkd:
super + shift + s
pkill -USR1 -x sxhkd
#################################################################
# CONTROL + ALT KEYS
#################################################################
#################################################################
# ALT + ... KEYS
#################################################################
#################################################################
# CONTROL + SHIFT KEYS
#################################################################
#################################################################
# SCREENSHOTS
#################################################################
# Scrot
Print
scrot 'ArcoLinux-%Y-%m-%d-%s_screenshot_$wx$h.jpg' -e 'mv $f $$(xdg-user-dir PICTURES)'
# Screeenshooter
ctrl + Print
xfce4-screenshooter
#################################################################
# FUNCTION KEYS
#################################################################
#################################################################
# MULTIMEDIA KEYS
#################################################################
#Raises volume
XF86AudioRaiseVolume
amixer -D pulse set Master 10%+
#Lowers volume
XF86AudioLowerVolume
amixer -D pulse set Master 10%-
#Mute
XF86AudioMute
amixer -D pulse set Master 1+ toggle
#PLAY
XF86AudioPlay
playerctl play-pause
#Next
XF86AudioNext
playerctl next
#previous
XF86AudioPrev
playerctl previous
#Stop
XF86AudioStop
playerctl stop
#Brightness up
XF86MonBrightnessUp
xbacklight -inc 10
#Brightness down
XF86MonBrightnessDown
xbacklight -dec 10
#########################
# POLYBAR #
#########################
# Hide polybar
super + y
polybar-msg cmd toggle
#################################################################
# SUPER + KEYS
#################################################################
#Toggle fullscreen of window
super + f
bspc node --state \~fullscreen
# Toggle pseudo tiling of window
super + p
bspc node --state \~pseudo_tiled
#kill
super + q
bspc node -c
#################################################################
# SUPER KEYS
#################################################################
#Focus selected desktop
super + Tab
bspc desktop -f '^{1-9,10}'
# Increase/decrease window gap on focused desktop
super + bracket{left,right}
bspc config -d focused window_gap $((`bspc config -d focused window_gap` {-,+} 5 ))
# set the window state
super + space
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
# Move focus to other monitor
super + BackSpace
bspc monitor -f next
#################################################################
# SUPER + ALT KEYS
#################################################################
# Move floating window
super + alt + {_,shift + }{Left,Down,Up,Right}
~/.config/bspwm/scripts/move-window {_,edge-}{west,south,north,east}
#################################################################
# SUPER + CONTROL KEYS
#################################################################
# Cancel preselection
super + ctrl + space
bspc node --presel-dir cancel
#################################################################
# SUPER + SHIFT KEYS
#################################################################
#Reload bspwm
super + shift + r
~/.config/bspwm/bspwmrc
#kill
super + shift + q
bspc node -c
#Logout
#super + shift + x
# bspc quit
# Focus/swap windows by direction
super + {_,shift + }{h,j,k,l}
bspc node --{focus,swap} {west,south,north,east}
# Flip layout vertically/horizontally
super + {_,shift + }a
bspc node @/ --flip {vertical,horizontal}
# Move focused window to other monitor
super + shift + Left
bspc node -m next --follow
# Move focused window to other monitor
super + shift + Right
bspc node -m next --follow
# Move focused window to other monitor
super + shift + Up
bspc node -m next --follow
# Move focused window to other monitor
super + shift + Down
bspc node -m next --follow
#################################################################
# SUPER + CONTROL KEYS
#################################################################
# Focus/swap windows by direction
super + ctrl + {Left,Down,Up,Right}
bspc node --{focus} {west,south,north,east}
# Contract tiled space
super + ctrl + {h,j,k,l}
bspc node {@east -r -10,@north -r +10,@south -r -10,@west -r +10}
# Focus parent/brother/first/second for preselection
super + ctrl + {e,r,t,y}
bspc node --focus @{parent,brother,first,second}
# Preselect the splitting area for next window on leaf/parent
super + ctrl + {u,i,o,p}
bspc node --presel-dir \~{west,south,north,east}
# Define splitting ratio for next window on leaf/parent
super + ctrl + {_,shift +}{1-9}
bspc node {_,@/} --presel-ratio 0.{1-9}
#################################################################
# ALT KEYS
#################################################################
#Focus selected desktop
alt + Tab
bspc desktop -f '^{1-9,10}'
#Focus selected desktop
alt + shift + Tab
bspc desktop -f '^{1-9,10}'
#Rotate desktop
alt + space
bspc node @/ --rotate {90,-90}
#################################################################
# ALT + SHIFT KEYS
#################################################################
# Expand tiled space
alt + shift + {h,j,k,l}
bspc node {@west -r -10,@south -r +10,@north -r -10,@east -r +10}
#################################################################
# CTRL + ALT KEYS
#################################################################
# Focus next/previous window
ctrl + alt + Left
bspc node --focus west
# Focus next/previous window
ctrl + alt + Right
bspc node --focus east
# Focus Up window
ctrl +alt + Up
bspc node --focus north
# Focus Down window
ctrl + alt + Down
bspc node --focus south
#################################################################
#################################################################
################## AZERTY/QWERTY/ ... KEYBOARD#################
#################################################################
#################################################################
#Switch here between qwerty and azerty or make new one
#Focus selected desktop FOR QWERTY KEYBOARDS
super + {1-9,0}
bspc desktop -f '^{1-9,10}'
#Focus selected desktop FOR BELGIAN AZERTY KEYBOARDS
#super + {ampersand,eacute,quotedbl,apostrophe,parenleft,section,egrave,exclam,ccedilla,agrave}
# bspc desktop -f '^{1-9,10}'
#Focus selected desktop FOR FRENCH AZERTY KEYBOARDS
#super + {ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave}
# bspc desktop -f '^{1-9,10}'
#################################################################
#Switch here between qwerty and azerty or make new one
#Move window to selected desktop FOR QWERTY KEYBOARDS
super + shift + {1-9,0}
id=$(bspc query -N -n); bspc node -d ^{1-9,10}; bspc node -f ${id}}
#Move window to selected desktop FOR AZERTY KEYBOARDS
#super + shift + {ampersand,eacute,quotedbl,apostrophe,parenleft,section,egrave,exclam,ccedilla,agrave}
# id=$(bspc query -N -n); bspc node -d ^{1-9,10}; bspc node -f ${id}}
#################################################################
## super & mouse scroll
# Focused desktop window gap
super + button{4,5}
bspc config -d focused window_gap $((`bspc config -d focused window_gap` {-,+} 2 ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment