How to get number and/or name (or tag/id... etc) of currently used virtual desktop ?
Command line, scripting, C/C++ solutions allowed (, while portable to C/C++ are preferred). ;)
I'm mostly interested in
GNOME, as well as
awesome - solutions for other desktop environments are welcome (I would love to support as much as I can, in order to provide as universal solution as possible).
Btw. For those interested, To be more specific about usecase: I'm interested in timetracking oriented around desktop + windows focus + xevents + multiplescreen. Currently there exist separate solutions for this (
ktimetracker tracks tasks depending on desktops, while it's app tracking is very poor - no regular expressions support, just exact window titles -> not very usefull. On the other hand,
workrave tracks keyboard and mouse activity, but is unaware of desktop->task I work on.), I'd like to do something, that merges those information in order to achieve more precise picture (maybe incorporating Association rule learning or other Data mining technique) of activities I have (in order to achieve more precise information related with my habits, in order with "ant-RSI fight" ;) ).
So if your desktop follows in different paradigm, than "Virtual Desktop + Windows (with Names and Titles)" please, show code/cli snippet, that shows information about currently used window/frame/app + currently selected desktop/task/tags (eventually screen).