.\" Generated by scdoc 1.11.2 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "swhkd" "5" "2022-08-14" "github.com/waycrate/swhkd" "File Formats Manual" .P .SH NAME .P swhkd - Hotkey daemon inspired by sxhkd written in rust .P .SH CONFIG FILE .P .RS 4 .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} A global config can be defined in \fB/etc/swhkd/swhkdrc\fR.\& Swhkd attempts to look in your \fB$XDG_CONFIG_HOME\fR, failing which it defaults to \fB~/.\&config\fR.\& .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} A local config overrides the global one.\& Local configs should be placed in the root of the project.\& .RE .P .RE .SH SYNTAX .P Each line of the configuration file is interpreted as so: .RS 4 .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} If it is empty or starts with #, it is ignored.\& .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} If it starts with a space, it is read as a command.\& .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} Otherwise, it is read as a hotkey.\& .RE .P .RE For valid keys and modifiers, check \fBswhkd-keys(5)\fR .P .SH EXAMPLE .P .nf .RS 4 # Import another configuration file\&. # NOTE: the path provided must be absolute and not relative such as `~`\&. include /home/YourUserName/\&.config/swhkd/swhkdrc ignore alt + print # globally ignore a key binding # terminal super + ReTuRn # case insensitive alacritty super + shift + enter # enter = return kitty # file manager super + shift + f pcmanfm # web-browser super + w firefox # bspwm super + {_,shift + }{h,j,k,l} bspc node -{f,s} {west,south,north,east} super + ctrl + alt + {Left ,Down ,Up ,Right} n=10; { d1=left; d2=right; dx=-$n; dy=0; , d1=bottom; d2=top; dx=0; dy=$n; , d1=top; d2=bottom; dx=0; dy=-$n; , d1=right; d2=left; dx=$n; dy=0; } bspc node --resize $d1 $dx $dy || bspc node --resize $d2 $dx $dy super + {,, \&.} bspc node -f {next\&.local,prev\&.local} # screenshot print scrot any + print # any represent at least one of the valid modifiers scrot -s # Append with @ to run on key-release\&. @super + shift + f pcmanfm # Append with ~ to emit the hotkey after the command is triggered\&. Aka, don\&'t swallow the hotkey\&. ~super + shift + f pcmanfm super + m # commands starting with @ are internal commands\&. # internal commands can be combined with normal commands with \&'&&\&'\&. # \&'@enter\&' pushes a mode into the mode stack and starts listening only the # key bindings defined in that mode @enter music && echo "music" > ~/\&.config/waybar/swhkd-mode mode music # use the mode statement to define a mode q # \&'@escape\&' pops the current mode out of the mode stack # the default mode is \&'normal mode\&', which is always on the bottom of the mode # stack and can never be escaped @escape && echo "normal" > ~/\&.config/waybar/swhkd-mode {n, p, space, r, z, y} mpc {next, prev, toggle, repeat, random, single} endmode # use endmode if you want to set more key bindings for normal mode .fi .RE .SH AUTHORS .P Maintained by Shinyzenith , EdenQwQ , and Angelo Fallaria .\& For more information about development, see .\& .P .SH SEE ALSO .P .RS 4 .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fBswhkd(1)\fR .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fBswhkd-keys(5)\fR .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fBswhks(1)\fR .RE