dotfiles/sxhkd/sxhkdrc
Gabriel Arazas 0681d1fd7c Structure the project with NixOS-styled distros
It's been a while but I've been using NixOS (or anything styled like it
like GuixSD, for example) and distro-hopped from Arch Linux.
I think it's high noon for making the structure of this setup to be
truer to one of the big objectives which is how easy to transfer this
between different setups.
Which means I removed some things such as the package lists, systemd
config files, and package manager-specific configs.
While the solution is easy (which is to simply ignore the
system-specific files) but I'm not going with the pragmatic solution not
because I'm a dumbass but because I'm so smart that I want to create a
challenge for myself to solve a puzzle on figuring out a way on how to
structure my dotfiles. :)

Such a productive use of my time, that's for sure.
2020-09-11 03:12:26 +08:00

108 lines
3.1 KiB
Plaintext
Executable File

# Basic binds (inspired from the previous i3 config).
super + Return
$TERMINAL
# A dropdown terminal.
# Requires tmux and tdrop for this to work.
super + shift + Return
tdrop -ma -w -4 -y "$PANEL_HEIGHT" -s dropterm $TERMINAL
super + t
toggle-process screenkey
# Application launcher.
super + d
rofi -show drun -sidebar-mode -theme themes/fds-mini-sidebar
# User action shortcuts.
super + F10
user-prompt "Proceed to shutdown?" "sudo -A shutdown 0"
super + F11
user-prompt "Proceed to reboot?" "sudo -A reboot"
super + F12
user-prompt "Exit from X session?" "pkill bspwm"
# Screenshot and screencast launcher.
super + {_, shift + } Print
rofi-screenshot-menu {_, --stop && notify-send "All recording has stopped" || notify-send "There's no active recording process"}
# A bunch of miscellaneous scripts.
super + x ; {a, s, d}
set -o pipefail && \
{ocr | xclip -in -selection clipboard && notify-send "Image content has been copied on the clipboard.", \
parse-barcodes | xclip -selection clipboard && notify-send "Bar code content has been copied.", \
colorpicker | xclip -selection clipboard && notify-send "Color copied to clipboard."}
# Miscellaneous shortcuts.
super + shift + m
choose-manual-menu
super + shift + e
choose-emoji-menu
super + shift + c
$HOME/.config/emacs/bin/org-capture
shift + super + r
pkill -USR1 sxhkd && notify-send "SXHKD config has successfully reloaded."
# The usual application suite shortcuts.
# I'm separating them according to the keyboard row (in the QWERTY layout anyway).
super + a ; {z, x, c, v, b, n, m}
{ $TERMINAL -e nvim, code, inkscape, gimp, blender, kdenlive, lmms }
super + a ; {f, a, d}
{ firefox, $TERMINAL -e lf, krita }
super + a ; {t, r}
{ thunderbird, thunar }
# bspwm exclusive shortcuts.
# Feel free to replace these if you're working with another WM/DE.
# Over time, I may replace one of the usual shortcut
# with something more generally applied (with `xdotool` for example).
# Close/Kill the focused window.
# Difference between closing a window and killing a window is how the process is killed.
# Closing a window only terminates the process for that window while killing a window terminates all of the related process of that window.
# For example, try opening two Firefox instance and test how it differs.
super + {_, shift +} + q
bspc node --{close,kill}
# Move desktop/node view to the specified desktop.
super + {_,shift + }{1-9,0}
bspc {desktop --focus,node --to-desktop} '^{1-9,10}'
# Desktop and node movements.
super + {_, shift + } Tab
bspc desktop {next, prev} --focus
# less is <, greater is >
super + {less, greater}
bspc node --to-desktop {prev,next}
# Window state 'mode'
super + z ; {z,x,c,v}
bspc node --state {floating,fullscreen,tiled,pseudo_tiled}
# Window resize 'mode'
super + r : {h,j,k,l}
bspc node --resize {left -10 0,bottom 0 10,top 0 -10,right 10 0}
# grave is `
super + grave
bspc desktop --focus last.occupied
super + {Up,Down,Left,Right}
bspc node {north,south,west,east} --focus
super + shift {Up,Down,Left,Right}
bspc node {north,south,west,east} --swap focused --follow