You are not logged in.

#1 2009-07-23 15:20:15

thomaz
Member
From: St. Charles, MO
Registered: 2009-07-23
Posts: 8

dwm: using F-keys to toggle tags

I know I can use Ctrl-Meta-1 to toggle my first tag in dwm, but how can I use the F1 key (without modifiers) to do the same thing?

PS: First post here, hope I will have a good time in the forum. smile

Last edited by thomaz (2009-07-23 15:45:01)


"To know recursion, you must first know recursion."

Offline

#2 2009-07-23 15:54:47

kTT
Member
From: Poland - Poznan/Zagan
Registered: 2008-09-16
Posts: 17
Website

Re: dwm: using F-keys to toggle tags

try this (for 1st tag) in keys table:

    { MODKEY|ControlMask,           XK_F1,      toggleview,     {.ui = 1 << 0} }

edit: ofc I forgot to change "MODKEY|ControlMask (ehh copy & paste;) ) solution is below

Last edited by kTT (2009-07-24 08:00:38)


kTT

Offline

#3 2009-07-23 16:10:18

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: dwm: using F-keys to toggle tags

Use NULL instead of MODKEY|ControlMask.

Offline

#4 2009-07-23 18:27:47

thomaz
Member
From: St. Charles, MO
Registered: 2009-07-23
Posts: 8

Re: dwm: using F-keys to toggle tags

I just figured out it wasn't working because I was editing a wrong version of my config.h.
Thanks anyways.


"To know recursion, you must first know recursion."

Offline

#5 2009-07-23 22:18:19

thomaz
Member
From: St. Charles, MO
Registered: 2009-07-23
Posts: 8

Re: dwm: using F-keys to toggle tags

Procyon wrote:

Use NULL instead of MODKEY|ControlMask.

Using NULL instead of a Modifier seems not to be the best way to do it. It gave me compiling warnings.

"False gets converted to 0 if you stuff it in an unsigned
long (which is what the modifier mask is). Same goes for NULL (except
you get a warning there). NULL and False will both work, there just
conceptually wrong. The modifier mask is an unsigned long, and
therefore you should put a valid unsigned long value in it, not a
pointer or a Bool. Just because something works does not mean it's
right :-)"

http://osdir.com/ml/window-managers.dwm … 00048.html


"To know recursion, you must first know recursion."

Offline

Board footer

Powered by FluxBB