Hi there,
Nooooooob for gtk development.
I recently need to write a plugin for plank, this plugin is used for mmanage virtual desktops on each monitor.
I found that, the environments of these 3 below are related to virtual desktops:
$ >> xprop -root
_NET_CURRENT_DESKTOP(CARDINAL) = 1
_NET_NUMBER_OF_DESKTOPS(CARDINAL) = 3
_NET_DESKTOP_NAMES(UTF8_STRING) = "Work", "Work", "2"
I have 2 monitors, and one monitor contains 2 virtual desktops: “Work” & “2”, the other monitor contains only 1 virtual desktop: “Work”.
What do I need to know is:
- How many desktops on current monitor
- What is the name of each desktop
- Which desktop I am currently be with: this seems can be achieve by accessing
_NET_DESKTOP_NAMES[]
string array by index_NET_CURRENT_DESKTOP
Variable _NET_NUMBER_OF_DESKTOPS
only tells total number of desktops on all monitor, this is NOT what I needed.
Any example codes or library functions ?