sxhkd-rc

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

commit 3a248564cfa785ae4ef85c8b693983658a300344
parent 321cc7c7d9c5aa2a830ed42789cc4bdbf61797d0
Author: Bastien Dejean <nihilhill@gmail.com>
Date:   Thu,  3 Jan 2013 20:16:45 +0100

Add manual page

Diffstat:
MMakefile | 5+++++
MREADME.md | 8+++++---
Asxhkd.1 | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 85 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -7,6 +7,7 @@ LDFLAGS = $(LIBS) PREFIX ?= /usr/local BINPREFIX = $(PREFIX)/bin +MANPREFIX = $(PREFIX)/share/man SRC = sxhkd.c keys.c helpers.c OBJ = $(SRC:.c=.o) @@ -40,9 +41,13 @@ clean: install: @echo "installing executable files to $(DESTDIR)$(BINPREFIX)" @install -D -m 755 sxhkd $(DESTDIR)$(BINPREFIX)/sxhkd + @echo "installing manual page to $(DESTDIR)$(MANPREFIX)/man1" + @install -D -m 644 sxhkd.1 $(DESTDIR)$(MANPREFIX)/man1/sxhkd.1 uninstall: @echo "removing executable files from $(DESTDIR)$(BINPREFIX)" @rm -f $(DESTDIR)$(BINPREFIX)/sxhkd + @echo "removing manual page from $(DESTDIR)$(MANPREFIX)/man1" + @rm -f $(DESTDIR)$(MANPREFIX)/man1/sxhkd.1 .PHONY: all debug options clean install uninstall diff --git a/README.md b/README.md @@ -12,13 +12,13 @@ sxhkd is a simple X hotkey daemon. * `-h`: Print the synopsis to standard output and exit. * `-v`: Print the version information to standard output and exit. -* `-c CONFIG_FILE`: Use the given configuration file instead of the default (`$XDG_CONFIG_HOME/sxhkd/sxhkdrc`). +* `-c CONFIG_FILE`: Read the configuration from the given file. ## Configuration Each line of the configuration file is interpreted as so: - If it starts with `#`, it is ignored. -- If it starts with a white space character, it is read as a command. +- If it starts with one or more white space characters, it is read as a command. - Otherwise, it is parsed as a hotkey: each key name is separated by spaces and/or `+` characters. General syntax: @@ -26,7 +26,7 @@ General syntax: [MODIFIER + ]*[@]KEYSYM COMMAND -Where `MODIFIER` is `super|hyper|meta|alt|control|ctrl|shift|mode_switch|lock|mod1|mod2|mod3|mod4|mod5`. +Where `MODIFIER` is one of the following names: `super`, `hyper`, `meta`, `alt`, `control`, `ctrl`, `shift`, `mode_switch`, `lock`, `mod1`, `mod2`, `mod3`, `mod4`, `mod5`. If `@` is added at the beginning of the keysym, the command will be run on key release events, otherwise on key press events. @@ -36,6 +36,8 @@ What is actually executed is `/bin/sh -c COMMAND`, which means you can use envir If *sxhkd* receives a `SIGUSR1` signal, it will reload its configuration file. +If no configuration file is specified through the `-c` option, the following is used: `$XDG_CONFIG_HOME/sxhkd/sxhkdrc`. + ## Installation make diff --git a/sxhkd.1 b/sxhkd.1 @@ -0,0 +1,75 @@ +.TH sxhkd 1 sxhkd +.SH NAME +Simple X HotKey Daemon. +.SH SYNOPSIS +.SY sxhkd +.RI [ OPTIONS ] +.YS +.SH DESCRIPTION +.PP +sxhkd is a simple X hotkey daemon. +.SH OPTIONS +.TP +.BI -h +Print the synopsis to standard output and exit. +.TP +.BI -v +Print the version information to standard output and exit. +.TP +.BI -c " CONFIG_FILE" +Read the configuration from the given file. +.SH CONFIGURATION +.PP +Each line of the configuration file is interpreted as so: +.IP \(bu 2 +If it starts with +.IR # , +it is ignored. +.IP \(bu 2 +If it starts with one or more white space characters, it is read as a command. +.IP \(bu 2 +Otherwise, it is parsed as a hotkey: each key name is separated by spaces and/or +.IR + +characters. +.SS General Syntax: +.EX + [MODIFIER + ]*[@]KEYSYM + COMMAND +.EE +.PP +Where +.I MODIFIER +is one of the following names: +.IR super , " hyper", " meta", " alt", " control", " ctrl", " shift", " mode_switch", " lock", " mod1", " mod2", " mod3", " mod4", " mod5" . +.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. +.PP +The keysym names are those your will get from +.BR xev (1) +(minus the prefix if any). +.PP +What is actually executed is +.IR "/bin/sh -c COMMAND" , +which means you can use environment variables in +.IR COMMAND . +.PP +If +.B sxhkd +receives a +.I SIGUSR1 +signal, it will reload its configuration file. +.PP +If no configuration file is specified through the +.I -c +option, the following is used: +.IR $XDG_CONFIG_HOME/sxhkd/sxhkdrc . +.SH AUTHOR +.MT baskerville@lavabit.com +Bastien Dejean +.ME +.SH LINKS +.UR https://github.com/baskerville/sxhkd +Homepage +.UE