Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.1 KiB

4 years ago
  1. /**
  2. * dwmconfig.h
  3. * Hardware multimedia keys
  4. */
  5. /* Somewhere at the beginning of config.h include:
  6. #include <X11/XF86keysym.h>
  7. /* Add somewhere in your constants definition section */
  8. static const char *upvol[] = { "/usr/bin/pactl", "set-sink-volume", "0", "+5%", NULL };
  9. static const char *downvol[] = { "/usr/bin/pactl", "set-sink-volume", "0", "-5%", NULL };
  10. static const char *mutevol[] = { "/usr/bin/pactl", "set-sink-mute", "0", "toggle", NULL };
  11. /* Add to keys[] array. With 0 as modifier, you are able to use the keys directly. */
  12. static Key keys[] = {
  13. { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } },
  14. { 0, XF86XK_AudioMute, spawn, {.v = mutevol } },
  15. { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } },
  16. };
  17. /* If you have a small laptop keyboard or don't want to spring your fingers too far away. */
  18. static Key keys[] = {
  19. { MODKEY, XK_F11, spawn, {.v = downvol } },
  20. { MODKEY, XK_F9, spawn, {.v = mutevol } },
  21. { MODKEY, XK_F12, spawn, {.v = upvol } },
  22. };