Quote:
Originally Posted by pottag
I want to make DWM execute a shell script when I press a series of keys. Like this would do in I3 "bindsym $mod+p exec ~/Tests/shell/mpc-play.sh" Thank you!
|
As sevendogsbsd said, you need to add a keybinding in config.h and recompile dwm.
In config.h, define an array of character pointers (strings) to hold the script name, and any arguments it may take, and it must end with NULL.
Code:
static const char *mpcplay[] = { "/absolute/path/to/mpc-play.sh", "ARGUMENTS", NULL };
In the "keys" structure, also in config.h, you can add something like the following.
Code:
{ MODKEY, p, spawn, {.v = mpcplay} },