dwm.config.h.snippet 879 B

1234567891011121314151617181920
  1. // This is an extract from my config.h for dwm
  2. // I have set up some custom key-binds to work with the media keys on my laptop keyboard
  3. // These are the commands:
  4. static const char *cmPlayCmd[] = {"cmus-remote", "-u", NULL};
  5. static const char *cmStopCmd[] = {"cmus-remote", "-s", NULL};
  6. static const char *cmPrevCmd[] = {"cmus-remote", "-r", NULL};
  7. static const char *cmNextCmd[] = {"cmus-remote", "-n", NULL};
  8. // And these are the key-bindings
  9. static Key keys[] = {
  10. // irrelevant keybinds snipped here.......
  11. { 0, XF86XK_AudioPlay, spawn, {.v = cmPlayCmd } },
  12. { 0, XF86XK_AudioStop, spawn, {.v = cmStopCmd } },
  13. { 0, XF86XK_AudioPrev, spawn, {.v = cmPrevCmd } },
  14. { 0, XF86XK_AudioNext, spawn, {.v = cmNextCmd } },
  15. // more irrelevant keybinds snipped...
  16. };