Page 1 of 1

JWM. How to set a key combo for a certain virtual desktop?

Posted: Fri Jul 29, 2022 11:37 pm
by monketype

Hi puppyans!

I want to use ten virtual desktops in JWM:

Code: Select all

<Desktops width="10" height="1">

Fine, I got'em.

Now I want to switch or send to desktop number 10 directly, without using rdesktop and sendr.
Tried these, but obviously, without luck:

Code: Select all

<Key mask="4" key="0">desktop#10</Key>
<Key mask="4" key="0">desktop:10</Key>
<Key mask="4" key="0">desktop10</Key>

$ jwm -p says those are invalid key actions.

So how do I jump to desktop No.10 with Super+0 or to desktop, say, No.25 with Super+K?


Re: JWM. How to set a key combo for a certain virtual desktop?

Posted: Sat Jul 30, 2022 3:00 am
by MochiMoppel
moketype wrote: Fri Jul 29, 2022 11:37 pm

Now I want to switch or send to desktop number 10 directly, without using rdesktop and sendr.

May be impossible.
It works only for WinKey + 1~9.
9 used to be the max number of desktops, maybe just because there are only number keys 1~9 on a keyboard which would the desktop# action make work (0 wouldn't do anything as JWM desktops count from 1).

Code: Select all

<Key mask="4" key="#">desktop#</Key>

The '#' in above code must not be replaced by a number. It's the code that covers actions for all 9 keys. The manual is a bit misleading.


Re: JWM. How to set a key combo for a certain virtual desktop?

Posted: Sat Jul 30, 2022 3:34 am
by monketype
MochiMoppel wrote: Sat Jul 30, 2022 3:00 am

The '#' in above code must not be replaced by a number.

Oh, I do have and make use of <Key mask="4" key="#">desktop#</Key> entry. I Just hope there is a way to use keys other than 1-9.


Re: JWM. How to set a key combo for a certain virtual desktop?

Posted: Sat Jul 30, 2022 6:43 am
by MochiMoppel
moketype wrote: Fri Jul 29, 2022 11:37 pm

So how do I jump to desktop No.10 with Super+0

Code: Select all

<Key mask="4" key="0">exec:wmctrl -s 9</Key>

Re: JWM. How to set a key combo for a certain virtual desktop?

Posted: Sat Jul 30, 2022 7:29 pm
by monketype

That's a good one! Thanks, MochiMoppel :)
Will use it for now. Still gonna bump this thread a couple of times and then contact Joe, probably a quick fix for him.