diff options
| author | Akshay Nair <phenax5@gmail.com> | 2020-06-22 15:43:03 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2020-06-22 15:43:03 +0530 |
| commit | ae9fd159b9c2f03dee0be7660bf8039cc57d346c (patch) | |
| tree | be6d5776a778b62b3cb86a655183c303cd25b783 /config.h | |
| parent | 7a78baba1bd4a952a3d46215f100dfc7cadd4483 (diff) | |
| download | shotkey-ae9fd159b9c2f03dee0be7660bf8039cc57d346c.tar.gz shotkey-ae9fd159b9c2f03dee0be7660bf8039cc57d346c.zip | |
Improves example config
Diffstat (limited to '')
| -rw-r--r-- | config.h | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -1,3 +1,5 @@ +#include <X11/XF86keysym.h> + // Shell char shell[] = "/bin/sh"; @@ -5,7 +7,7 @@ char shell[] = "/bin/sh"; enum { Music, - Bright, + Power, // Declare modes above this MODE_SIZE, @@ -15,26 +17,28 @@ enum { // NOTE: "10" here is the maximum number of key bindings for each mode Key modes[MODE_SIZE][10] = { [Music] = { - { 0, XK_m, cmd("notify-send inside_music") }, + { 0, XK_h, cmd("playerctl previous") }, + { 0, XK_l, cmd("playerctl next") }, + { 0, XK_space, cmd("playerctl play-pause") }, }, - [Bright] = { - { 0, XK_m, cmd("notify-send inside_bright") }, - { 0, XK_n, cmd("notify-send inside_bright_1") }, + [Power] = { + { 0, XK_s, cmd("notify-send shutting_down") }, + { 0, XK_r, cmd("notify-send restarting") }, }, }; // Define normal mode key bindings here Key keys[] = { - { Super|ShiftMask, XK_y, cmd("notify-send hello") }, - { Super|ShiftMask, XK_z, mode(Music, False) }, - { Super|ShiftMask, XK_x, mode(Bright, True) }, + { Mod1Mask, XK_y, cmd("notify-send hello") }, + { Mod1Mask, XK_z, mode(Music, True) }, + { Mod1Mask, XF86XK_PowerOff, mode(Power, False) }, }; ModeProperties mode_properties[MODE_SIZE] = { [Music] = { "Music player" }, - [Bright] = { "Brightness" }, + [Power] = { "Power menu" }, }; // Call this script on mode change -char* on_mode_change = "notify-send \"kadj [$SHOTKEY_MODE_ID] $SHOTKEY_MODE_LABEL\""; +char* on_mode_change = "echo \"kadj [$SHOTKEY_MODE_ID] $SHOTKEY_MODE_LABEL\""; |
