Detect current virtual desktop

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Maciej Bliziñski

    #1

    Detect current virtual desktop

    Hello Pythonists,

    I'd like to write for myself a tiny program that counts time spent on each
    virtual desktop (in GNOME). In order to do that, I need my program to
    detect the current virtual desktop. I've googled for it for about one hour
    and couldn't find any solution. The closest thing I found is set of
    tutorials: http://www.pygtk.org/articles.html Unfortunately, none of them
    answers my questions:

    How to detect current virtual desktop in GNOME? How to detect a virtual
    desktop change?

    --
    You won't believe what a skeptic I am.

  • Harald Karner

    #2
    Re: Detect current virtual desktop

    Maciej Bliziñski wrote:
    How to detect current virtual desktop in GNOME? How to detect a virtual
    desktop change?
    >
    Take a look at http://wallpapoz.sourceforge.net/


    Harald

    Comment

    • Maciej Bliziñski

      #3
      Re: Detect current virtual desktop

      On Mon, 21 Aug 2006 12:52:59 +0200, Harald Karner wrote:
      Maciej Bliziñski wrote:
      >How to detect current virtual desktop in GNOME? How to detect a virtual
      >desktop change?
      >>
      Take a look at http://wallpapoz.sourceforge.net/
      Harald, many thanks.

      By the way, I have found the line of code I was interested in. It is
      stunningly simple, just calls the xprop command:

      os.popen('xprop -root _NET_CURRENT_DE SKTOP').read()

      --
      You won't believe what a skeptic I am.


      Comment

      Working...