linput

Listen to input events
git clone git://git.akobets.xyz/linput
Log | Files | Refs | README | LICENSE

commit 1f995b632f0969d09cf44d67859a7c207f587204
parent f500f6ccbdb98af73e8625e477e887cb93f07218
Author: Artem Kobets <artem@akobets.xyz>
Date:   Sun, 26 Jul 2020 15:10:47 +0300

better examples

Diffstat:
Mconfig.def.h | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -1,6 +1,5 @@ static char *cmd_sleep[] = { "sudo", "zzz", NULL }; static char *cmd_openterminal[] = { "st", NULL }; -static char *cmd_openbrowser[] = { "chromium", NULL }; static char *cmd_volumeup[] = { "amixer", "-qM", "sset", "Master", "2%+", NULL }; static char *cmd_volumedown[] = { "amixer", "-qM", "sset", "Master", "2%-", NULL }; @@ -13,6 +12,7 @@ static struct EventRule { int code; int value; } events[] = { + /* suspend system when lid is closed */ { cmd_sleep, EV_SW, SW_LID, 1 @@ -53,24 +53,28 @@ static struct HotkeyRule { int keys[HOTKEY_MAX_KEYS + 1]; int event_mask; } hotkeys[] = { + /* open terminal on Super + C */ { cmd_openterminal, MOD_SUPER, { KEY_C, 0 }, ON_PRESS, }, + /* open terminal on Super + E + 1 */ { - cmd_openbrowser, + cmd_openterminal, MOD_SUPER, { KEY_E, KEY_1, 0 }, - ON_PRESS + ON_PRESS, }, + /* increase volume on Volume Up */ { cmd_volumeup, 0, { KEY_VOLUMEUP, 0 }, ON_PRESS | ON_HOLD }, + /* decrease volume on Volume Down */ { cmd_volumedown, 0,