I'm trying to create an array of simple hotkeys on my desktop, running OpenSuse with dwm. Things like:

Ctrl+E    /opt/eclipse/eclipse

Can this be configured from within dwm? If not is there an external application which I can run (in the background) to listen for these hotkeys.

Also, is it possible for the hotkeys to only work when I an not hovering over a window (so that the windows doesn't grab my input by accident)?


You can configure hotkeys in your config.h. To use your eclipse example (with a rule to have it open in a specific tag1 when you hit Ctrle:

static const Rule rules[] = {
{ "Eclipse",     NULL,       NULL,       1 << 0,       False,       -1 }, 

/* commands */
static const char  *eclipsecmd[] = { "/opt/eclipse/eclipse",  NULL };

static Key keys[] = {
{ ControlMask,         XK_e,      spawn,          {.v = eclipsecmd } },

The window will not grab the input, irrespective of where the focus is.

1. Ignore the rule if you don't want to assign eclipse to the first tag...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.