diff options
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/xkbdbind.config.h.gpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xorg-server/xkbdbind.config.h.gpp b/xorg-server/xkbdbind.config.h.gpp index 716d49a..a832b4c 100644 --- a/xorg-server/xkbdbind.config.h.gpp +++ b/xorg-server/xkbdbind.config.h.gpp @@ -6,14 +6,16 @@ #define A MOD_ALT #define H MOD_HYPER +#define AMIXER_DEFAULT_CARD "$(cat ~/.asoundrc 2>/dev/null | sed -n '/^defaults\\..*\\.card /s/^.* \\([0-9]\\{1,\\}\\)$/-c \\1/p' | head -n1)" + static struct hotkey hotkeys[] = { {XK_F1, MOD | S, 0, CMD("c")}, {XK_F2, MOD | S, 0, CMD("brave")}, {XK_F4, MOD | S, 0, CMD("xkill")}, - {XK_F9, MOD | S, 0, CMD("sh", "-c", "amixer -- set \"${MAIN_ALSA_MIXER}\" 0%")}, - {XK_F10, MOD | S, 1, CMD("sh", "-c", "amixer -- set \"${MAIN_ALSA_MIXER}\" 5%-")}, - {XK_F11, MOD | S, 1, CMD("sh", "-c", "amixer -- set \"${MAIN_ALSA_MIXER}\" 5%+")}, - {XK_F12, MOD | S, 0, CMD("sh", "-c", "amixer -- set \"${MAIN_ALSA_MIXER}\" 100%")}, + {XK_F9, MOD | S, 0, CMD("sh", "-c", "amixer "AMIXER_DEFAULT_CARD" -- set \"${MAIN_ALSA_MIXER}\" 0%")}, + {XK_F10, MOD | S, 1, CMD("sh", "-c", "amixer "AMIXER_DEFAULT_CARD" -- set \"${MAIN_ALSA_MIXER}\" 5%-")}, + {XK_F11, MOD | S, 1, CMD("sh", "-c", "amixer "AMIXER_DEFAULT_CARD" -- set \"${MAIN_ALSA_MIXER}\" 5%+")}, + {XK_F12, MOD | S, 0, CMD("sh", "-c", "amixer "AMIXER_DEFAULT_CARD" -- set \"${MAIN_ALSA_MIXER}\" 100%")}, {XK_u, MOD, 0, CMD("unicode")}, {XK_i, MOD, 0, CMD("ipa")}, {XK_p, MOD, 0, CMD("dmenu_run")}, |