From 67a36f71e38871d30355d5755dd6d3fd8b61ffa2 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Sun, 19 Jul 2020 16:35:21 +0200 Subject: [PATCH] finally decided the config style read the template.conf file for examples and the spec. --- template.conf | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/template.conf b/template.conf index 39d431c..3defdcf 100644 --- a/template.conf +++ b/template.conf @@ -1,11 +1,32 @@ # This is a comment -# these are valid entries -KEY_ALT + KEY_S = "xset s on" -KEY_LEFTMETA = 'rofi -show drun' -KEY_LEFTMETA + KEY_L = '/home/ale/scripts/lock.sh' - -I dont care about whitespaces = true -# will be translated to Idontcareaboutwhitespaces=true -or tabs = true -# is: ortabs=true +# Every new hotkey starts with one of these markers: +# - -> normal matching +# * -> fuzzy matching +# Normal matching means that the keys need to be pressed in the same order as +# they are declared, whereas fuzzy matching means that they can be pressed in +# any order. + +# Leading or trailing whitespaces are ignored, whitespaces between the marker +# And the ':' are also ignored, the general syntax for a hotkey is: +# marker keys: command +# Whitespaces after the ':' count as that counts as the executed command for +# the hotkey. +# Commads are expanded using wordexp(3) so "|&;<>(){}" as well as unescaped +# newlines are forbidden and will result in error, read the manpage for +# wordexp(3) for more info about the possible word expansion capabilities. + +# Possible keys are taken directly from linux's input.h header file, those +# include normal keys, multimedia keys and special keys, for the full list +# of available keys either refer to the header file or this project's hkd.c +# source file. Keys as specified by the kernel are named "KEY_", in this +# configuration file only the is required. +# Key names are always capitalized and do not differenciate between upper or +# lower case, as such hotkeys that require a capitalized letter need to include +# RIGHTSHIFT or LEFTSHIFT in the keys section. +# Keys are intended as a list of comma separated strings. + +# Examples: +# - LEFALT,LEFTSHIFT,S: ~/screenshot.sh -c +# * LEFTMETA,1,D: $SCRIPTDIR/wonkyscript +# - LEFTMETA,LEFTALT,LEFTSHIFT,S: shutdown now