Browser open in virtual desktop 4, how to move focus too?.
My old 15" Dell monitor gave up a few days ago, and I was fortunate to pick up for free an HP 22" wide-screen monitor. I am not used to wide-screen, and I don't like the browser window to fill the entire screen. So, I try to make it open in a spesific screen, position and size, thus keeping my desktop icons visible.
My script palemon-4 opens the browser: (wmctrl counts from 0)
Code: Select all
#!/bin/bash
wmctrl -s 3; exec /usr/bin/palemoon "$@"
Code: Select all
# wmctrl -r Pale Moon -e 8,270,88,1200,910
1) I would like the browser window to open in v.d.4, resize/reposition and take focus, but I am not capable of including the command in the script, and make it work!
2) If I open a new regular or private window from the browser menu, the command will not resize the new window, not even from a new terminal. Is that because it is a child window?
BTW, the main and child window share the PID, but using wmctrl -i -r plus the PID, doesn't work for either window.
Can someone please suggest a solution?
Edit: There is one solution for a command using the :SELECT: option, where there is a pause which let you click on the window that is to be resized, it works on child windows, but only as a separate command.
Code: Select all
# wmctrl -r :SELECT: -e 0,270,88,1200,910
Code: Select all
#!/bin/bash
wmctrl -s 3; exec /usr/bin/palemoon "$@" | paleselect