2

Using the default keyboard layout in dwm, I can send a window to tag 9 using Alt+Shift+9, for example.

Can I do the same thing programatically?

(I want to achieve a toggle feature for certain windows - showing them on one key press and hiding them on the next. I also tried working with things like wmctrl -xR WINDOW_NAME, but in dwm the window in question is not being pulled as it would be expected according the wmctrl man page.)

skink
  • 5,133
  • 6
  • 37
  • 58
user569825
  • 2,369
  • 1
  • 25
  • 45

1 Answers1

2

I've just found a patch written by ericpruitt that allows to use wmctrl to send windows. The reason why it doesn't work by default is also explained:

Because of how dwm tags work, there is not a one-to-one mapping of tag numbers and desktop numbers. For example, if a window is on tags 1 and 3 (indexed from 1) in dwm, wmctrl will report the window as being on desktop 5: 2^(1 - 1) + 2^(3 - 1).

RatonWasher
  • 250
  • 3
  • 9