Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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)?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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...

share|improve this answer
    
Very useful, thanks –  MaxMackie Nov 19 '11 at 20:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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