Results 1 to 7 of 7

Thread: specify window size & location when opening ap from command line, possible?

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Beans
    3,509

    Re: specify window size & location when opening ap from command line, possible?

    Hi again
    If you just want to resize an active window after it has been loaded
    you can use something like this.
    Code:
    wmctrl -r :ACTIVE: -e 0,100,300,890,560
    100,300= window position x,y
    890,560= window size x,y
    change to whatever.

    Rather than set to a keyboard shortcut I like to use easystroke mouse
    gestures to set a gesture to run the command.
    The wmctrl command works on the focused window so by performing the gesture in the window you want to resize it gives it focus then runs the command.
    Attached Images Attached Images

  2. #2
    Join Date
    May 2009
    Location
    Courtenay, BC, Canada
    Beans
    1,661

    Re: specify window size & location when opening ap from command line, possible?

    I'd use wmctrl, making sure to add a sleep between it (to give the window time to actually open) i.e.
    Code:
    program && sleep 5 && wmctrl -r :ACTIVE: -e 0,x_pos,y_pos,x_size,y_size

  3. #3
    Join Date
    Sep 2011
    Beans
    615

    Re: specify window size & location when opening ap from command line, possible?

    Thanks, Stinkeye; HiImTye,

    Yep, wmctrl seems to be just the ticket. I'm going to find lot of uses for this. I'm marking this solved.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •