Skip to content

Instantly share code, notes, and snippets.

@neuro-sys
Last active September 27, 2023 18:20
Show Gist options
  • Star 22 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save neuro-sys/2570361 to your computer and use it in GitHub Desktop.
Save neuro-sys/2570361 to your computer and use it in GitHub Desktop.
dwm volume control
/**
* config.h
* ALT + F11 | F12
*/
static const char *upvol[] = { "amixer", "set", "Master", "3+", NULL };
static const char *downvol[] = { "amixer", "set", "Master", "3-", NULL };
static const char *mutevol[] = { "amixer", "set", "Master", "toggle", NULL };
static Key keys[] = {
{ MODKEY, XK_F12, spawn, {.v = upvol } },
{ MODKEY, XK_F11, spawn, {.v = downvol } },
{ MODKEY, XK_F9, spawn, {.v = mutevol } },
};
@kurth4cker
Copy link

Great

@gssasank
Copy link

gssasank commented Jan 1, 2022

If anyone's wondering why the vol up and down aren't working for them, just use sudo amixer in place of amixer

@jumps-are-op
Copy link

for people that use pamixer instead of amixer

 static const char *upvol[]   = { "pamixer", "--increase", "3", NULL };
 static const char *downvol[] = { "pamixer", "--decrease", "3", NULL };
 static const char *mutevol[] = { "pamixer", "-t",              NULL };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment