Is it possible to set the name of the current virtual desktop via commandline?

Posted by Dave Vogt on Super User See other posts from Super User or by Dave Vogt
Published on 2012-11-20T12:13:21Z Indexed on 2012/11/20 23:07 UTC
Read the original article Hit count: 313

Filed under:
|

The utility wmctrl has the possiblity to list the names of all virtual desktops:

%  wmctrl -d
0  - DG: 3360x1200  VP: 0,0  WA: 0,0 3360x1199  Mail / Comm
1  * DG: 3360x1200  VP: 0,0  WA: 0,0 3360x1199  Web / Docs
2  - DG: 3360x1200  VP: 0,0  WA: 0,0 3360x1199  A
3  - DG: 3360x1200  VP: 0,0  WA: 0,0 3360x1199  B

I would like to be able to change, from the commandline, the name of the current desktop to something else. This is possible by using some pagers, for example, but I couldn't find out how to do it from the command line.

Update: the xprop utility seems to be able to set the desktop names, but I could not figure out the exact format to do so, yet:

% xprop -root -f _NET_DESKTOP_NAMES 8s -set _NET_DESKTOP_NAMES asdf
% xprop -root _NET_DESKTOP_NAMES
_NET_DESKTOP_NAMES(UTF8_STRING) = "asdf", "Web / Docs", "A"

© Super User or respective owner

Related posts about command-line

Related posts about xorg