sxhkd-rc

[fork] simple X hotkey daemon (but for the rc shell)
Log | Files | Refs | README | LICENSE

commit 9b17187c158badb2ea2ff9e73783036fae6d94da
parent d4b3680fb04d1a78c69a814f1942fcb1b9f226bc
Author: Bastien Dejean <nihilhill@gmail.com>
Date:   Sun, 23 Jun 2013 21:47:33 +0200

Generate documentation via `pandoc`

Diffstat:
MMakefile | 22++++++++++++++--------
DREADME.md | 122-------------------------------------------------------------------------------
AREADME.rst | 150+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adoc/README.md | 124+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adoc/capitalize_headers.hs | 13+++++++++++++
Adoc/man.template | 15+++++++++++++++
Adoc/missed_emph.patch | 24++++++++++++++++++++++++
Msxhkd.1 | 197++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
8 files changed, 464 insertions(+), 203 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,4 +1,5 @@ VERSION = 0.3 +NAME = sxhkd CC = gcc LIBS = -lm -lxcb -lxcb-keysyms @@ -15,10 +16,10 @@ OBJ = $(SRC:.c=.o) all: CFLAGS += -Os all: LDFLAGS += -s -all: sxhkd +all: $(NAME) debug: CFLAGS += -O0 -g -DDEBUG -debug: sxhkd +debug: $(NAME) include Sourcedeps @@ -27,20 +28,25 @@ $(OBJ): Makefile .c.o: $(CC) $(CFLAGS) -c -o $@ $< -sxhkd: $(OBJ) +$(NAME): $(OBJ) $(CC) -o $@ $(OBJ) $(LDFLAGS) $(LIBS) install: mkdir -p "$(DESTDIR)$(BINPREFIX)" - cp -p sxhkd "$(DESTDIR)$(BINPREFIX)" + cp -p $(NAME) "$(DESTDIR)$(BINPREFIX)" mkdir -p "$(DESTDIR)$(MANPREFIX)/man1" - cp -p sxhkd.1 "$(DESTDIR)$(MANPREFIX)/man1" + cp -p $(NAME).1 "$(DESTDIR)$(MANPREFIX)/man1" uninstall: - rm -f $(DESTDIR)$(BINPREFIX)/sxhkd - rm -f $(DESTDIR)$(MANPREFIX)/man1/sxhkd.1 + rm -f $(DESTDIR)$(BINPREFIX)/$(NAME) + rm -f $(DESTDIR)$(MANPREFIX)/man1/$(NAME).1 + +doc: + pandoc -t json doc/README.md | runhaskell doc/capitalize_headers.hs | pandoc -f json -t man --template doc/man.template -V name=$(NAME) -o $(NAME).1 + pandoc -f markdown -t rst doc/README.md -o README.rst + patch -p 1 -i doc/missed_emph.patch clean: rm -f $(OBJ) sxhkd -.PHONY: all debug clean install uninstall +.PHONY: all debug install uninstall doc clean diff --git a/README.md b/README.md @@ -1,122 +0,0 @@ -## Description - -sxhkd is a simple X hotkey daemon. - -## Usage - -### Synopsis - - sxhkd [OPTIONS] [EXTRA_CONFIG …] - -### Options - -* `-h`: Print the synopsis to standard output and exit. -* `-v`: Print the version information to standard output and exit. -* `-t TIMEOUT`: Timeout in seconds for the recording of chord chains. -* `-c CONFIG_FILE`: Read the main configuration from the given file. -* `-r REDIR_FILE`: Redirect the commands output to the given file. - -## Configuration - -Each line of the configuration file is interpreted as so: -- If it is empty or starts with `#`, it is ignored. -- If it starts with a space, it is read as a command. -- Otherwise, it is read as a hotkey. - -General syntax: - - HOTKEY - COMMAND - - HOTKEY := CHORD_1 ; CHORD_2 ; … ; CHORD_n - CHORD_i := [MODIFIER_i][@|!|:]KEYSYM_i - MODIFIER_i := MODIFIER_i1 + MODIFIER_i2 + … + MODIFIER_ik - -The valid modifier names are: `super`, `hyper`, `meta`, `alt`, `control`, `ctrl`, `shift`, `mode_switch`, `lock`, `mod1`, `mod2`, `mod3`, `mod4` and `mod5`. - -The keysym names are given by the output of `xev`. - -Hotkeys and commands can be spread across multiple lines by ending each partial line with a backslash character. - -When multiple chords are separated by semicolons, the hotkey is a chord chain: the command will only be executed after receiving each chord of the chain in consecutive order. - -If `@` is added at the beginning of the keysym, the command will be run on key release events, otherwise on key press events. - -If `!` is added at the beginning of the keysym, the command will be run on motion notify events and must contain two integer conversion specifications which will be replaced by the *x* and *y* coordinates of the pointer relative to the root window referential (the only valid button keysyms for this type of hotkeys are: `button1`, …, `button5`). - -If `:` is added at the beginning of the keysym, the captured event will be replayed for the other clients. - -Mouse hotkeys can be defined by using one of the following special keysym names: `button1`, `button2`, `button3`, …, `button24`. - -The hotkey and the command may contain sequences of the form `{STRING_1,…,STRING_N}`. - -In addition, the sequences can contain ranges of the form `A-Z` where *A* and *Z* are alphanumeric characters. - -The underscore character represents an empty sequence element. - -What is actually executed is `SHELL -c COMMAND`, which means you can use environment variables in `COMMAND`. - -`SHELL` will be the content of the first defined environment variable in the following list: `SXHKD_SHELL`, `SHELL`. - -If *sxhkd* receives a `SIGUSR1` signal, it will reload its configuration file. - -If no configuration file is specified via the `-c` option, the following is used: `$XDG_CONFIG_HOME/sxhkd/sxhkdrc`. - -## Example Configuration - - XF86Audio{Prev,Next} - mpc -q {prev,next} - - @XF86LaunchA - scrot -s -e 'image_viewer $f' - - super + shift + equal - sxiv -rt "$HOME/image" - - XF86LaunchB - xdotool selectwindow | xsel -bi - - super + {h,j,k,l} - bspc focus {left,down,up,right} - - super + alt + {0-9} - mpc -q seek {0-9}0% - - super + {alt,ctrl,alt + ctrl} + XF86Eject - sudo systemctl {suspend,reboot,poweroff} - - :button1 - bspc grab_pointer focus - - super + button{1-3} - bspc grab_pointer {move,resize_side,resize_corner} - - super + !button{1-3} - bspc track_pointer %i %i - - super + @button{1-3} - bspc ungrab_pointer - - super + {_,shift + }{h,j,k,l} - bspc {focus,shift} {left,down,up,right} - - {_,shift + ,super + }XF86MonBrightness{Down,Up} - bright {-1,-10,min,+1,+10,max} - - super + o ; {e,w,m} - {gvim,firefox,thunderbird} - - super + alt + control + {h,j,k,l} ; {0-9} - bspc fence_ratio {left,down,up,right} 0.{0-9} - - - -## Installation - - make - make install - -## Dependencies - -- libxcb -- xcb-util-keysyms diff --git a/README.rst b/README.rst @@ -0,0 +1,150 @@ +Synopsis +======== + +**sxhkd** [*OPTIONS*] [*EXTRA\_CONFIG* …] + +Description +=========== + +sxhkd is a simple X hotkey daemon with a powerful and compact +configuration syntax. + +Options +======= + +``-h`` + Print the synopsis to standard output and exit. + +``-v`` + Print the version information to standard output and exit. + +``-t`` *TIMEOUT* + Timeout in seconds for the recording of chord chains. + +``-c`` *CONFIG\_FILE* + Read the main configuration from the given file. + +``-r`` *REDIR\_FILE* + Redirect the commands output to the given file. + +Configuration +============= + +Each line of the configuration file is interpreted as so: + +- If it is empty or starts with ``#``, it is ignored. + +- If it starts with a space, it is read as a command. + +- Otherwise, it is read as a hotkey. + +General syntax: + +:: + + HOTKEY + COMMAND + + HOTKEY := CHORD_1 ; CHORD_2 ; … ; CHORD_n + CHORD_i := [MODIFIER_i][@|!|:]KEYSYM_i + MODIFIER_i := MODIFIER_i1 + MODIFIER_i2 + … + MODIFIER_ik + +The valid modifier names are: ``super``, ``hyper``, ``meta``, ``alt``, +``control``, ``ctrl``, ``shift``, ``mode_switch``, ``lock``, ``mod1``, +``mod2``, ``mod3``, ``mod4`` and ``mod5``. + +The keysym names are given by the output of ``xev``. + +Hotkeys and commands can be spread across multiple lines by ending each +partial line with a backslash character. + +When multiple chords are separated by semicolons, the hotkey is a chord +chain: the command will only be executed after receiving each chord of +the chain in consecutive order. + +If ``@`` is added at the beginning of the keysym, the command will be +run on key release events, otherwise on key press events. + +If ``!`` is added at the beginning of the keysym, the command will be +run on motion notify events and must contain two integer conversion +specifications which will be replaced by the *x* and *y* coordinates of +the pointer relative to the root window referential (the only valid +button keysyms for this type of hotkeys are: ``button1``, …, +``button5``). + +If ``:`` is added at the beginning of the keysym, the captured event +will be replayed for the other clients. + +Mouse hotkeys can be defined by using one of the following special +keysym names: ``button1``, ``button2``, ``button3``, …, ``button24``. + +The hotkey and the command may contain sequences of the form +``{STRING_1,…,STRING_N}``. + +In addition, the sequences can contain ranges of the form ``A-Z`` where +*A* and *Z* are alphanumeric characters. + +The underscore character represents an empty sequence element. + +What is actually executed is ``SHELL -c COMMAND``, which means you can +use environment variables in ``COMMAND``. + +``SHELL`` will be the content of the first defined environment variable +in the following list: ``SXHKD_SHELL``, ``SHELL``. + +If *sxhkd* receives a ``SIGUSR1`` signal, it will reload its +configuration file. + +If no configuration file is specified via the ``-c`` option, the +following is used: ``$XDG_CONFIG_HOME/sxhkd/sxhkdrc``. + +Example Configuration +===================== + +:: + + XF86Audio{Prev,Next} + mpc -q {prev,next} + + @XF86LaunchA + scrot -s -e 'image_viewer $f' + + super + shift + equal + sxiv -rt "$HOME/image" + + XF86LaunchB + xdotool selectwindow | xsel -bi + + super + {h,j,k,l} + bspc focus {left,down,up,right} + + super + alt + {0-9} + mpc -q seek {0-9}0% + + super + {alt,ctrl,alt + ctrl} + XF86Eject + sudo systemctl {suspend,reboot,poweroff} + + :button1 + bspc grab_pointer focus + + super + button{1-3} + bspc grab_pointer {move,resize_side,resize_corner} + + super + !button{1-3} + bspc track_pointer %i %i + + super + @button{1-3} + bspc ungrab_pointer + + super + {_,shift + }{h,j,k,l} + bspc {focus,shift} {left,down,up,right} + + {_,shift + ,super + }XF86MonBrightness{Down,Up} + bright {-1,-10,min,+1,+10,max} + + super + o ; {e,w,m} + {gvim,firefox,thunderbird} + + super + alt + control + {h,j,k,l} ; {0-9} + bspc fence_ratio {left,down,up,right} 0.{0-9} + diff --git a/doc/README.md b/doc/README.md @@ -0,0 +1,124 @@ +% Sxhkd User's Guide +% Bastien Dejean +% June 23, 2013 + +# Synopsis + +**sxhkd** [*OPTIONS*] [*EXTRA_CONFIG* …] + +# Description + +sxhkd is a simple X hotkey daemon with a powerful and compact configuration syntax. + +# Options + +`-h` +: Print the synopsis to standard output and exit. + +`-v` +: Print the version information to standard output and exit. + +`-t` *TIMEOUT* +: Timeout in seconds for the recording of chord chains. + +`-c` *CONFIG_FILE* +: Read the main configuration from the given file. + +`-r` *REDIR_FILE* +: Redirect the commands output to the given file. + +# Configuration + +Each line of the configuration file is interpreted as so: + +- If it is empty or starts with `#`, it is ignored. + +- If it starts with a space, it is read as a command. + +- Otherwise, it is read as a hotkey. + +General syntax: + + HOTKEY + COMMAND + + HOTKEY := CHORD_1 ; CHORD_2 ; … ; CHORD_n + CHORD_i := [MODIFIER_i][@|!|:]KEYSYM_i + MODIFIER_i := MODIFIER_i1 + MODIFIER_i2 + … + MODIFIER_ik + +The valid modifier names are: `super`, `hyper`, `meta`, `alt`, `control`, `ctrl`, `shift`, `mode_switch`, `lock`, `mod1`, `mod2`, `mod3`, `mod4` and `mod5`. + +The keysym names are given by the output of `xev`. + +Hotkeys and commands can be spread across multiple lines by ending each partial line with a backslash character. + +When multiple chords are separated by semicolons, the hotkey is a chord chain: the command will only be executed after receiving each chord of the chain in consecutive order. + +If `@` is added at the beginning of the keysym, the command will be run on key release events, otherwise on key press events. + +If `!` is added at the beginning of the keysym, the command will be run on motion notify events and must contain two integer conversion specifications which will be replaced by the *x* and *y* coordinates of the pointer relative to the root window referential (the only valid button keysyms for this type of hotkeys are: `button1`, …, `button5`). + +If `:` is added at the beginning of the keysym, the captured event will be replayed for the other clients. + +Mouse hotkeys can be defined by using one of the following special keysym names: `button1`, `button2`, `button3`, …, `button24`. + +The hotkey and the command may contain sequences of the form `{STRING_1,…,STRING_N}`. + +In addition, the sequences can contain ranges of the form `A-Z` where *A* and *Z* are alphanumeric characters. + +The underscore character represents an empty sequence element. + +What is actually executed is `SHELL -c COMMAND`, which means you can use environment variables in `COMMAND`. + +`SHELL` will be the content of the first defined environment variable in the following list: `SXHKD_SHELL`, `SHELL`. + +If *sxhkd* receives a `SIGUSR1` signal, it will reload its configuration file. + +If no configuration file is specified via the `-c` option, the following is used: `$XDG_CONFIG_HOME/sxhkd/sxhkdrc`. + +# Example Configuration + + XF86Audio{Prev,Next} + mpc -q {prev,next} + + @XF86LaunchA + scrot -s -e 'image_viewer $f' + + super + shift + equal + sxiv -rt "$HOME/image" + + XF86LaunchB + xdotool selectwindow | xsel -bi + + super + {h,j,k,l} + bspc focus {left,down,up,right} + + super + alt + {0-9} + mpc -q seek {0-9}0% + + super + {alt,ctrl,alt + ctrl} + XF86Eject + sudo systemctl {suspend,reboot,poweroff} + + :button1 + bspc grab_pointer focus + + super + button{1-3} + bspc grab_pointer {move,resize_side,resize_corner} + + super + !button{1-3} + bspc track_pointer %i %i + + super + @button{1-3} + bspc ungrab_pointer + + super + {_,shift + }{h,j,k,l} + bspc {focus,shift} {left,down,up,right} + + {_,shift + ,super + }XF86MonBrightness{Down,Up} + bright {-1,-10,min,+1,+10,max} + + super + o ; {e,w,m} + {gvim,firefox,thunderbird} + + super + alt + control + {h,j,k,l} ; {0-9} + bspc fence_ratio {left,down,up,right} 0.{0-9} diff --git a/doc/capitalize_headers.hs b/doc/capitalize_headers.hs @@ -0,0 +1,13 @@ +import Text.Pandoc +import Data.Char (toUpper) + +main :: IO () +main = toJsonFilter capitalizeHeaders + +capitalizeHeaders :: Block -> Block +capitalizeHeaders (Header 1 attr xs) = Header 1 attr $ bottomUp capitalize xs +capitalizeHeaders x = x + +capitalize :: Inline -> Inline +capitalize (Str xs) = Str $ map toUpper xs +capitalize x = x diff --git a/doc/man.template b/doc/man.template @@ -0,0 +1,15 @@ +$if(has-tables)$ +.\"t +$endif$ +.TH "$name$" 1 "$date$" "$title$" +.SH NAME +$name$ - Simple X HotKey Daemon +$body$ +.SH AUTHOR +.MT baskerville@lavabit.com +$author$ +.ME +.SH LINKS +.UR https://github.com/baskerville/$name$ +Homepage +.UE diff --git a/doc/missed_emph.patch b/doc/missed_emph.patch @@ -0,0 +1,24 @@ +diff -ru a/README.rst b/README.rst +--- a/README.rst 2013-06-23 21:43:16.071832185 +0200 ++++ b/README.rst 2013-06-23 21:42:35.011992319 +0200 +@@ -1,7 +1,7 @@ + Synopsis + ======== + +-**sxhkd** [*OPTIONS*\ ][\*EXTRA\_CONFIG\* …] ++**sxhkd** [*OPTIONS*] [*EXTRA\_CONFIG* …] + + Description + =========== +diff -ru a/sxhkd.1 b/sxhkd.1 +--- a/sxhkd.1 2013-06-23 21:43:16.051832263 +0200 ++++ b/sxhkd.1 2013-06-23 21:42:35.011992319 +0200 +@@ -3,7 +3,7 @@ + sxhkd - Simple X HotKey Daemon + .SH SYNOPSIS + .PP +-\f[B]sxhkd\f[] [\f[I]OPTIONS\f[]][*EXTRA_CONFIG* \&...] ++\f[B]sxhkd\f[] [\f[I]OPTIONS\f[]] [\f[I]EXTRA_CONFIG\f[] ...] + .SH DESCRIPTION + .PP + sxhkd is a simple X hotkey daemon with a powerful and compact diff --git a/sxhkd.1 b/sxhkd.1 @@ -1,111 +1,162 @@ -.TH sxhkd 1 sxhkd +.TH "sxhkd" 1 "June 23, 2013" "Sxhkd" .SH NAME -Simple X HotKey Daemon. +sxhkd - Simple X HotKey Daemon .SH SYNOPSIS -.SY sxhkd -.RI [ OPTIONS "] [" EXTRA_CONFIG " ...]" -.YS +.PP +\f[B]sxhkd\f[] [\f[I]OPTIONS\f[]] [\f[I]EXTRA_CONFIG\f[] ...] .SH DESCRIPTION .PP -sxhkd is a simple X hotkey daemon. +sxhkd is a simple X hotkey daemon with a powerful and compact +configuration syntax. .SH OPTIONS .TP -.BI -h +.B \f[C]\-h\f[] Print the synopsis to standard output and exit. +.RS +.RE .TP -.BI -v +.B \f[C]\-v\f[] Print the version information to standard output and exit. +.RS +.RE .TP -.BI -t " TIMEOUT" +.B \f[C]\-t\f[] \f[I]TIMEOUT\f[] Timeout in seconds for the recording of chord chains. +.RS +.RE .TP -.BI -c " CONFIG_FILE" -Read the configuration from the given file. +.B \f[C]\-c\f[] \f[I]CONFIG_FILE\f[] +Read the main configuration from the given file. +.RS +.RE .TP -.BI -r " REDIR_FILE" +.B \f[C]\-r\f[] \f[I]REDIR_FILE\f[] Redirect the commands output to the given file. +.RS +.RE .SH CONFIGURATION .PP Each line of the configuration file is interpreted as so: -.IP \(bu 2 -If it is empty or starts with -.IR # , -it is ignored. -.IP \(bu 2 +.IP \[bu] 2 +If it is empty or starts with \f[C]#\f[], it is ignored. +.IP \[bu] 2 If it starts with a space, it is read as a command. -.IP \(bu 2 +.IP \[bu] 2 Otherwise, it is read as a hotkey. .PP -General Syntax: -.EX - - HOTKEY - COMMAND +General syntax: +.IP +.nf +\f[C] +HOTKEY +\ \ \ \ COMMAND - HOTKEY := CHORD_1 ; CHORD_2 ; ... ; CHORD_n - CHORD_i := [MODIFIER_i][@|!|:]KEYSYM_i - MODIFIER_i := MODIFIER_i1 + MODIFIER_i2 + ... + MODIFIER_ik -.EE +HOTKEY\ :=\ CHORD_1\ ;\ CHORD_2\ ;\ \&...\ ;\ CHORD_n +CHORD_i\ :=\ [MODIFIER_i][\@|!|:]KEYSYM_i +MODIFIER_i\ :=\ MODIFIER_i1\ +\ MODIFIER_i2\ +\ \&...\ +\ MODIFIER_ik +\f[] +.fi .PP -The valid modifier names are: -.BR super , " hyper", " meta", " alt", " control", " ctrl", " shift", " mode_switch", " lock", " mod1", " mod2", " mod3", " mod4" ", and" " mod5" . +The valid modifier names are: \f[C]super\f[], \f[C]hyper\f[], +\f[C]meta\f[], \f[C]alt\f[], \f[C]control\f[], \f[C]ctrl\f[], +\f[C]shift\f[], \f[C]mode_switch\f[], \f[C]lock\f[], \f[C]mod1\f[], +\f[C]mod2\f[], \f[C]mod3\f[], \f[C]mod4\f[] and \f[C]mod5\f[]. .PP -The keysym names are given by the output of -.BR xev (1). +The keysym names are given by the output of \f[C]xev\f[]. .PP -Hotkeys and commands can be spread across multiple lines by ending each partial line with a backslash character. +Hotkeys and commands can be spread across multiple lines by ending each +partial line with a backslash character. .PP -When multiple chords are separated by semicolons, the hotkey is a chord chain: the command will only be executed after receiving each chord of the chain in consecutive order. +When multiple chords are separated by semicolons, the hotkey is a chord +chain: the command will only be executed after receiving each chord of +the chain in consecutive order. .PP -If -.I @ -is added at the beginning of the keysym, the command will be run on key release events, otherwise on key press events. +If \f[C]\@\f[] is added at the beginning of the keysym, the command will +be run on key release events, otherwise on key press events. .PP -If -.I ! -is added at the beginning of the keysym, the command will be run on motion notify events and must contain two integer conversion specifications which will be replaced by the -.BR x " and " y -coordinates of the pointer relative to the root window referential (the only valid button keysyms for this type of hotkeys are: -.BR button1 ",..., " button5 ). +If \f[C]!\f[] is added at the beginning of the keysym, the command will +be run on motion notify events and must contain two integer conversion +specifications which will be replaced by the \f[I]x\f[] and \f[I]y\f[] +coordinates of the pointer relative to the root window referential (the +only valid button keysyms for this type of hotkeys are: +\f[C]button1\f[], \&..., \f[C]button5\f[]). .PP -If -.I : -is added at the beginning of the keysym, the captured event will be replayed for the other clients. +If \f[C]:\f[] is added at the beginning of the keysym, the captured +event will be replayed for the other clients. .PP -Mouse hotkeys can be defined by using one of the following special keysym names: -.BR button1 ", " button2 ", " button3 ", ..., " button24 . +Mouse hotkeys can be defined by using one of the following special +keysym names: \f[C]button1\f[], \f[C]button2\f[], \f[C]button3\f[], +\&..., \f[C]button24\f[]. .PP The hotkey and the command may contain sequences of the form -.IR {STRING_1,...,STRING_N} . +\f[C]{STRING_1,\&...,STRING_N}\f[]. .PP -In addition, the sequences can contain ranges of the form -.IB A - Z -where -.IR A " and " Z -are alphanumeric characters. +In addition, the sequences can contain ranges of the form \f[C]A\-Z\f[] +where \f[I]A\f[] and \f[I]Z\f[] are alphanumeric characters. .PP The underscore character represents an empty sequence element. .PP -What is actually executed is -.IB SHELL " -c " -.IR COMMAND , -which means you can use environment variables in -.IR COMMAND . -.PP -.I SHELL -will be the content of the first defined environment variable in the following list: -.BR SXHKD_SHELL ", " SHELL . -.PP -If -.B sxhkd -receives a -.I SIGUSR1 -signal, it will reload its configuration file. -.PP -If no configuration file is specified through the -.B -c -option, the following is used: -.IR $XDG_CONFIG_HOME/sxhkd/sxhkdrc . +What is actually executed is \f[C]SHELL\ \-c\ COMMAND\f[], which means +you can use environment variables in \f[C]COMMAND\f[]. +.PP +\f[C]SHELL\f[] will be the content of the first defined environment +variable in the following list: \f[C]SXHKD_SHELL\f[], \f[C]SHELL\f[]. +.PP +If \f[I]sxhkd\f[] receives a \f[C]SIGUSR1\f[] signal, it will reload its +configuration file. +.PP +If no configuration file is specified via the \f[C]\-c\f[] option, the +following is used: \f[C]$XDG_CONFIG_HOME/sxhkd/sxhkdrc\f[]. +.SH EXAMPLE CONFIGURATION +.IP +.nf +\f[C] +XF86Audio{Prev,Next} +\ \ \ \ mpc\ \-q\ {prev,next} + +\@XF86LaunchA +\ \ \ \ scrot\ \-s\ \-e\ \[aq]image_viewer\ $f\[aq] + +super\ +\ shift\ +\ equal +\ \ \ \ sxiv\ \-rt\ "$HOME/image" + +XF86LaunchB +\ \ \ \ xdotool\ selectwindow\ |\ xsel\ \-bi + +super\ +\ {h,j,k,l} +\ \ \ \ bspc\ focus\ {left,down,up,right} + +super\ +\ alt\ +\ {0\-9} +\ \ \ \ mpc\ \-q\ seek\ {0\-9}0% + +super\ +\ {alt,ctrl,alt\ +\ ctrl}\ +\ XF86Eject +\ \ \ \ sudo\ systemctl\ {suspend,reboot,poweroff} + +:button1 +\ \ \ \ bspc\ grab_pointer\ focus + +super\ +\ button{1\-3} +\ \ \ \ bspc\ grab_pointer\ {move,resize_side,resize_corner} + +super\ +\ !button{1\-3} +\ \ \ \ bspc\ track_pointer\ %i\ %i + +super\ +\ \@button{1\-3} +\ \ \ \ bspc\ ungrab_pointer + +super\ +\ {_,shift\ +\ }{h,j,k,l} +\ \ \ \ bspc\ {focus,shift}\ {left,down,up,right} + +{_,shift\ +\ ,super\ +\ }XF86MonBrightness{Down,Up} +\ \ \ \ bright\ {\-1,\-10,min,+1,+10,max} + +super\ +\ o\ ;\ {e,w,m} +\ \ \ \ {gvim,firefox,thunderbird} + +super\ +\ alt\ +\ control\ +\ {h,j,k,l}\ ;\ {0\-9} +\ \ \ \ bspc\ fence_ratio\ {left,down,up,right}\ 0.{0\-9} +\f[] +.fi .SH AUTHOR .MT baskerville@lavabit.com Bastien Dejean