Eu hackeei um pequeno script python que faz isso, depois de não encontrar mais nada. Requer o xpybutil como dependência, testado no Arch Linux atual (2014-03-27).
#!/usr/bin/python2
"Helper for setting current desktop's name"
import sys
from xpybutil import conn, root
import xpybutil.ewmh as ewmh
if len(sys.argv) == 2 and sys.argv[1] == '--help':
print "Usage: "
print " set_desktop_name NAME_OF_NEW_DESKTOP - sets current desktop name"
print " set_desktop_name NR NAME_OF_NEW_DESKTOP - sets name of NRth desktop"
if len(sys.argv) > 2:
desktop_offset = int(sys.argv[1])
new_name = sys.argv[2]
else:
desktop_offset = ewmh.get_current_desktop().reply()
new_name = sys.argv[1]
current_names = ewmh.get_desktop_names().reply()
current_names[desktop_offset] = new_name
# Not sure why I have to do it twice - somehow
# doesn't work if I only call it once
c = ewmh.set_desktop_names(current_names)
c = ewmh.set_desktop_names(current_names)
O uso é bastante simples:
dv@ankh-morpork ~ % wmctrl -d
0 * DG: 3840x1200 VP: 0,0 WA: 0,24 3840x1176 MAIL
1 - DG: 3840x1200 VP: 0,0 WA: 0,24 3840x1176 Project A
2 - DG: 3840x1200 VP: 0,0 WA: 0,24 3840x1176 Project B
3 - DG: 3840x1200 VP: 0,0 WA: 0,24 3840x1176 Random Stuff
4 - DG: 3840x1200 VP: 0,0 WA: 0,24 3840x1176 Music
dv@ankh-morpork ~ % set_desktop_name 3 "Yet another project"
dv@ankh-morpork ~ % wmctrl -d
0 * DG: 3840x1200 VP: 0,0 WA: 0,24 3840x1176 MAIL
1 - DG: 3840x1200 VP: 0,0 WA: 0,24 3840x1176 Project A
2 - DG: 3840x1200 VP: 0,0 WA: 0,24 3840x1176 Project B
3 - DG: 3840x1200 VP: 0,0 WA: 0,24 3840x1176 Yet another project
4 - DG: 3840x1200 VP: 0,0 WA: 0,24 3840x1176 Music