8 comments on “wmctrl user documentation (examples)

  1. How did you manage to make a window management tool that does NOT do minimize? Wouldn't that be one of the most obvious features?

    [admin edit: I assume the author of this comment meant to ask "How did _they_ manage", since I'm obviously not the wmctrl author.]

  2. [admin edit: adding an old email]

    [name removed for privacy]
    Subject: Re: wmctrl examples
    Date: Wed, 03 Feb 2010 09:38:52 -0500

    > sweet! i'll stop messing around with wmctrl and wait for your
    > documentation. thanks!

    i lied. i couldn't stop. figured out i could use this to move my
    pidgin window:

    wmctrl -ir `wmctrl -lx | grep Pidgin.Pidgin | cut -d" " -f1` -e 0,1200,0,-1,-1

    hope that's useful or interesting. i subscribed to your feed and still
    look forward to your post.

  3. 2015-10-21

    I need to
    open VLC at specific coordinates with a specific size but the issue is I
    have to add some arguments to VLC so opening the app alone is not enough.
    The VLC command would be:

    vlc dvbt://frequency=474000000:bandwidth=0


    It sounds like what you want to do is:

    1) start vlc
    2) move vlc
    3) resize vlc

    At a glance, it looks like wmctrl can't use a pid, which is stupid. If
    it could, then you could do everything really easily.

    What if, instead, you assume that since vlc was just launched, it will
    be the currently-selected / topmost applicaiton. So this means that
    instead of reference to the window title , you can use the special
    string ":ACTIVE:" (without the quotes)

    So you would:

    1) Launch vlc
    2) Wait, to make sure vlc is done launching (using xtoolwait)
    3) use wmctrl, but instead of the title, use :ACTIVE:

    I think the code would be:

    xtoolwait vlc dvbt://frequency=474000000:bandwidth=0 & wmpid=$!
    wait $wmpid
    wmctrl -r ":ACTIVE:" -e 1,0,0,800,600

    See also my notes for -e



    If wmctrl can't do what you want, maybe an alternative can use the pid

    Devil's Pie:

    others are listed at the top of this page.

  4. Option -i has an example which doesn't work:

    wmctrl -i 0x00e00011 -b toggle,shaded

    Correct version is:

    wmctrl -r 0x00e00011 -r -b toggle,shaded

  5. I'm late to the vlc party; but with 'grep i' a case insensitive search is possible. In combination with awk you can retrieve the id

    The following works for me :

    wid=$(wmctrl -lx |grep -i vlc |awk '{print $1}');wmctrl -ia $wid -e 1,0,0,800,600; wmctrl -ia $wid

    Is this is what someone is looking for?

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Use <code> to display raw HTML codes.
  • WordPress is configured to not store your IP.
  • Comments here apply only to this post, you may want to contact me directly.