You are not logged in.
Pages: 1
Hello Boys and Girls..
I'm still in progress theming my system. At the time, I'm using a pypanel, cause of its simplicity.
But it is far too much information for me. I only want a little text at the bottom-rigth of the desktop (the windows in fullscreen gaps this area, so it is definitly seen) which displays the current desktopname.
This is the only information I wan't and need to have on the screen.
I searched for aDesklets wich shows this information, but didnt find any. I also searched for a way to get the current desk via some bash-hacks. I'm using openboxWM.
The fastest thing would be a little C-App which pastes the name to stdout. This can then be used by conky or a similiar application.
Is it heavy to get this information via C or bash? Or is there even a proper solution made allready?
Hope someone knows.
Sincerely, arma
Offline
You'd need xlib and read the value of
_NET_WM_CURRENT_DESKTOP and _NET_WM_DESKTOP_NAMES from the root window
http://standards.freedesktop.org/wm-spe … #id2506278
blog - github - facebook - google profile
Offline
Hmm, thank you.
Is the usage of the given lib simple, did you ever use it?
I've currently no time to test the code, perhaps in the evening (I'm @ work).
Thank you for reply, arma..
Offline
2 thoughts.
1) Conky may be able to do that. Might want to look it up in Conky's list of variables.
2) I may be getting my config files confused, but doesn't pypanel let you order the appearance of the clock, taskbar, etc, by having a section where you put a 1 by what you want at the leftmost, and a 5 at the rightmost? If so, have you tried putting a 0 for every element you don't want, leaving just the desktop name?
That's all I got.
Offline
I have used the python bindings for xlib - it's not too tricky but just may take a little getting used to.. I'll see if I can bodge up a script now quickly.
blog - github - facebook - google profile
Offline
Visibility is an app that you might want to take a look at.
Offline
Script made - just prints current desktop name to stdout.
#!/usr/bin/env python
from Xlib import display, Xatom
dsp = display.Display()
rootwin = dsp.screen().root
DESKTOP_NAMES = dsp.intern_atom("_NET_DESKTOP_NAMES")
CURRENT_DESKTOP = dsp.intern_atom("_NET_CURRENT_DESKTOP")
def get_names():
names = rootwin.get_full_property(DESKTOP_NAMES, 0)
names = names.value.split("\x00")
return names
def current_desktop():
return rootwin.get_full_property(CURRENT_DESKTOP,
Xatom.CARDINAL
).value[0]
try:
print get_names()[current_desktop()]
except:
print "error getting name"
blog - github - facebook - google profile
Offline
Pages: 1