Volume hotkeys - dwm - dynamic window manager
 (HTM) git clone https://git.parazyd.org/dwm
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit a7c5e3e53ca98b3d5e3b36d6ad77e60e9bdd4fba
 (DIR) parent 7987560dc7390df306774fa5ff593c23e683df6a
 (HTM) Author: parazyd <parazyd@dyne.org>
       Date:   Thu,  2 Nov 2023 12:15:27 +0100
       
       Volume hotkeys
       
       Diffstat:
         M config.h                            |      25 +++++++++++++++----------
       
       1 file changed, 15 insertions(+), 10 deletions(-)
       ---
 (DIR) diff --git a/config.h b/config.h
       @@ -1,5 +1,7 @@
        /* See LICENSE file for copyright and license details. */
        
       +#include <X11/XF86keysym.h>
       +
        /* appearance */
        static const unsigned int borderpx  = 1;        /* border pixel of windows */
        static const unsigned int snap      = 32;       /* snap pixel */
       @@ -10,10 +12,7 @@ static const int systraypinningfailfirst = 1;
        static const int showsystray = 1;
        static const int showbar            = 1;        /* 0 means no bar */
        static const int topbar             = 1;        /* 0 means bottom bar */
       -static const char *fonts[] = {
       -        "Terminus:size=10",
       -        "Noto Color Emoji:pixelsize=10:antialias=true:autohint=true",
       -};
       +static const char *fonts[] = { "Iosevka Term:size=8" };
        static const char dmenufont[]       = "Iosevka Term:size=12";
        static const char col_gray1[]       = "#222222";
        static const char col_gray2[]       = "#444444";
       @@ -79,21 +78,22 @@ static const char *rskeycmd[] = { "setxkbmap", "-layout", "rs", NULL };
        static const char *hrkeycmd[] = { "setxkbmap", "-layout", "hr", NULL };
        
        static const char *dmenupasscmd[] = { "dmenupass", NULL };
       -static const char *glyphcmd[] = { "splatmoji", "copy", NULL };
       +static const char *glyphcmd[] = { "rofi", "-modi", "emoji", "-show", "emoji", "-dpi", "300", "-emoji-mode", "copy", NULL };
        static const char *mathglyphcmd[] = { "mathglyph", NULL };
        static const char *texglyphcmd[] = { "texglyph", NULL };
        static const char *dunstclosecmd[] = { "dunstctl", "close", NULL };
        
       -static const char *rickcmd[] = { "mpv", "--no-video", "mu/never_gonna_give_you_up.mp3", NULL };
       -static const char *thinglaunch[] = { "thinglaunch", NULL };
       +static const char *wpvolup[] = { "alsavol", "+", NULL };
       +static const char *wpvoldn[] = { "alsavol", "-", NULL };
       +static const char *wpspkmt[] = { "alsavol", "spk-toggle", NULL };
       +static const char *wpmicmt[] = { "alsavol", "mic-toggle", NULL };
        
        #include "focusurgent.c"
        #include "movestack.c"
        
        static const Key keys[] = {
                /* modifier                     key        function        argument */
       -        { MODKEY,                       XK_p,      spawn,          {.v = thinglaunch } },
       -        { MODKEY|ShiftMask,             XK_p,      spawn,          {.v = dmenucmd } },
       +        { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
                { MODKEY,                       XK_Return, spawn,          {.v = termcmd } },
                { MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmdbig } },
                { MODKEY,                       XK_F1,     spawn,          {.v = uskeycmd } },
       @@ -103,9 +103,14 @@ static const Key keys[] = {
                { MODKEY,                       XK_F9,     spawn,          {.v = mathglyphcmd } },
                { MODKEY|ShiftMask,             XK_F9,     spawn,          {.v = texglyphcmd } },
                { MODKEY,                       XK_F10,    spawn,          {.v = dmenupasscmd } },
       -        { MODKEY|ShiftMask,             XK_F12,    spawn,          {.v = rickcmd } },
                { MODKEY,                       XK_grave,  togglescratch,  {.v = scratchpadcmd } },
                { MODKEY,                       XK_space,  spawn,          {.v = dunstclosecmd } },
       +
       +        { 0,                            XF86XK_AudioLowerVolume, spawn, {.v = wpvoldn } },
       +        { 0,                            XF86XK_AudioRaiseVolume, spawn, {.v = wpvolup } },
       +        { 0,                            XF86XK_AudioMute,        spawn, {.v = wpspkmt } },
       +        { 0,                            XF86XK_AudioMicMute,     spawn, {.v = wpmicmt } },
       +
                { MODKEY,                       XK_b,      togglebar,      {0} },
                { MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
                { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },