Registered Member
|
Is there a way to get a list of programs in the taskbar from the command line?
e.g. firefox_bin:Google - Mozilla Firefox kate:Default Session konsole:dmonty@vs1 If I just use `ps` I don't get the window title text. --- |
Mentor
|
Are you familiar with C++? Then take a look at /usr/include/taskmanager/taskmanager.h.
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size] |
KDE Developer
|
If you do not have access to Xlib directly and want to use shell commands you will need to do the following:
xprop -root | grep _NET_CLIENT_LIST(WINDOW) Then parse that and query every window ID with: xprop -id | grep WM_NAME(STRING) And parse that result as well. =) Chances there is a script around that already does this. Google.
Last edited by Zarin on Sat Feb 07, 2009 2:33 am, edited 1 time in total.
|
Mentor
|
This prints each window of the taskbar in one line.
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size] |
KDE Developer
|
Hmm, that also displays windows that do not want to be displayed on the taskbar. You will need to have a condition that checks _NET_WM_STATE to see if it contains _NET_WM_STATE_SKIP_TASKBAR.
... And another one to check if WM_TRANSIENT_FOR is set as well (Transient windows are not displayed in the taskbar).
Last edited by Zarin on Sat Feb 07, 2009 11:00 am, edited 1 time in total.
|
Registered Member
|
Perfect! This does the trick!
I love Linux support! |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]