I’m developing an icon manager app for openbox, and need to know the specific virtual desktop where an icon is created to restore it to same on restart.
Is there some standard way in which the current virtual desktop’s info can be determined?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If your window manager is EWMH compliant, you can use the properties listed here:
http://standards.freedesktop.org/wm-spec/1.4/ar01s03.html
in particular,
_NET_NUMBER_OF_DESKTOPSand_NET_DESKTOP_NAMES.Modified code from this site will list all available virtual desktops. It opens a pipe to
wmctrl -dwhich returns the list with the current virt.desktop indicated with an *:The captured output will look something like this: (man wmctrl for explanation)