You are not logged in.

#1 2013-03-18 15:59:18

Kooothor
Member
From: Paname
Registered: 2008-08-02
Posts: 228

Awesome WM :: keyboard shortcuts only work if another client is open

Dear all,

I'm facing a bug, but maybe it's my lua...
Problem : if no client is open, I can't use my keyboard shortcuts to open something (Mod4 + n for pcmanfm, or Mod4 + Shift + F for firefox).
Only Mod4 + Shift + t can spawn a terminal.
As soon as the term is here (or any other window), I can use my keyboard shortcuts !

Here is the lua part, I use awful.util.spawn, but maybe I souldn't, should I ?

# this works always
awful.key({ modkey, "Shift"   }, "t", function () awful.util.spawn(terminal) end),
# this works only if there is another client on the tag
awful.key({ modkey, "Shift"   }, "f", function () awful.util.spawn("firefox") end),
awful.key({ modkey,           }, "n", function () awful.util.spawn("dbus-launch pcmanfm") end),
etc…

Please tell me if you think something is wrong, either in my lua, or in awesome.

~k

PS: it's a pain to look for other rc.lua files on the web, as the syntax change every month or so...


ktr

Offline

#2 2013-03-18 16:09:34

gridcol
Guest

Re: Awesome WM :: keyboard shortcuts only work if another client is open

Syntax seems to be ok.

Did you add them to globalkeys in rc.lua?

Last edited by gridcol (2013-03-18 16:10:23)

#3 2013-03-18 16:42:58

Kooothor
Member
From: Paname
Registered: 2008-08-02
Posts: 228

Re: Awesome WM :: keyboard shortcuts only work if another client is open

gridcol wrote:

Syntax seems to be ok.

Did you add them to globalkeys in rc.lua?

Yes, they are in the right place (as they work fine when there is another client!)

No one is able to reproduce this ?


ktr

Offline

#4 2013-03-18 17:46:01

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: Awesome WM :: keyboard shortcuts only work if another client is open

Check stderr to see if anything shows up when it fails to launch firefox/pcmanfm. You can use `ls -l /proc/$(pidof awesome)/fd/2' if you're not sure where stderr is.
 

Kooothor wrote:

the syntax change every month or so...

Just FYI, v3.5 is the first API in years that has required config adjustments..

Offline

#5 2013-03-18 22:53:17

Kooothor
Member
From: Paname
Registered: 2008-08-02
Posts: 228

Re: Awesome WM :: keyboard shortcuts only work if another client is open

Thanks, but I don't have any errors.
Can you reproduce this on your setup tdy ?


ktr

Offline

#6 2013-03-18 23:07:21

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: Awesome WM :: keyboard shortcuts only work if another client is open

I haven't seen this behavior in general.

For the specific apps, I haven't had any issues with firefox. I don't use pcmanfm, but I use thunar and haven't even had this issue with thunar either.

Offline

#7 2013-03-21 21:03:50

Kooothor
Member
From: Paname
Registered: 2008-08-02
Posts: 228

Re: Awesome WM :: keyboard shortcuts only work if another client is open

It's really not about apps, for instance, I use slock to lock the screen, and it will only work if there is another client on the tag.
I can reproduce this on two different setups...
weird...
Thanks for the help anyway smile


ktr

Offline

#8 2013-05-31 16:02:07

Apple
Member
Registered: 2013-03-30
Posts: 25

Re: Awesome WM :: keyboard shortcuts only work if another client is open

Apologies for replying to an old thread, but I had this problem and just found out it was because I put the relevant commands in the clientkeys table instead of the globalkeys table. Hence the command was only valid when there was a client focussed.

Whether this is the same for the OP or not, I think it could be useful for someone in my situation (and doubt the awesome syntax will change too soon to make this reply dated).

Offline

Board footer

Powered by FluxBB