diff options
| author | tslil clingman <tslil@posteo.de> | 2022-10-09 18:25:23 +0200 |
|---|---|---|
| committer | tslil clingman <tslil@posteo.de> | 2022-10-09 18:56:58 +0200 |
| commit | 32ccd7d35d8ec246b9081028a928d0934b28ee1d (patch) | |
| tree | c0cfccca9a60cd13e52df279c41cd5a467ae8c82 /config.h | |
| parent | c565c09250f3b1cec255bc1f36a0b373a92467cd (diff) | |
multimedia keys and fix now playing for mpd, supress stdout on running commands, tweak status
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -43,8 +43,19 @@ static const AppRule rules[] = { \ * custom commands * must always end with ', NULL };' */ -static const char *termcmd[] = { "alacritty", NULL }; -static const char *menucmd[] = { "run", NULL }; +static const char *termcmd[] = { "alacritty", NULL }; +static const char *menucmd[] = { "run", NULL }; +static const char *now_playing[] = { "now_playing", NULL }; +static const char *albumbler[] = { "albumbler.py", NULL }; +static const char* mpc_toggle[] = { "mpc", "toggle", NULL }; +static const char* lock[] = { "lock", NULL }; + +#define XF86AudioLowerVolume 0x1008ff11 +#define XF86AudioRaiseVolume 0x1008ff13 +#define XF86AudioMute 0x1008ff12 +static const char *vol_dn[] = { "pactl", "set-sink-volume", "0", "-5%", NULL }; +static const char *vol_up[] = { "pactl", "set-sink-volume", "0", "+5%", NULL }; +static const char *vol_mt[] = { "pactl", "set-sink-mute", "0", "toggle", NULL }; #define DESKTOPCHANGE(K,N) \ { MOD4, K, change_desktop, {.i = N} }, \ @@ -59,12 +70,17 @@ static Key keys[] = { // Commands { MOD4, XK_t, spawn, {.com = termcmd} }, { MOD4, XK_d, spawn, {.com = menucmd} }, - { MOD4, XK_space, spawn, SHCMD("mpc toggle") }, - { MOD4|SHIFT, XK_space, spawn, SHCMD("albumbler.py") }, - { MOD4, XK_h, spawn, SHCMD("lock") }, - { MOD4|SHIFT|CONTROL, XK_space, spawn, SHCMD("notify-send --app-name=Playing $(mpc current)")}, + { MOD4, XK_space, spawn, {.com = mpc_toggle } }, + { MOD4|SHIFT, XK_space, spawn, {.com = albumbler } }, + { MOD4|SHIFT|CONTROL, XK_space, spawn, {.com = now_playing } }, + { MOD4, XK_h, spawn, {.com = lock } }, { MOD4|SHIFT|CONTROL, XK_q, quit, {.i = 0} }, /* quit with exit value 0 */ + // Multimedia + { 0, XF86AudioLowerVolume, spawn, {.com = vol_dn } }, + { 0, XF86AudioRaiseVolume, spawn, {.com = vol_up } }, + { 0, XF86AudioMute, spawn, {.com = vol_mt } }, + // Windows { MOD4, XK_n, next_win, {NULL} }, { MOD4, XK_o, prev_win, {NULL} }, |
