PDA

View Full Version : [xubuntu] XFCE4 - minimize and make windows sticky



darioshanghai
April 14th, 2012, 05:18 PM
Hi guys,

I wrote a small script that launches a local web server and then opens the main page of the service I want to use into a browser.

I'd like the browser window to be sticky and minimized. How do I do this in a bash script? I hoped I could use wmctrl, but I just wasted one hour trying because minimize (called "hidden") does not work.

How can I do this?

Thank you.

darioshanghai
April 14th, 2012, 05:27 PM
the browser is chromium which, as the manual says, responds to gtk+ commands.

Does gtk+ have a command to do these things that I can stick on a command line?

Jose Catre-Vandis
April 14th, 2012, 06:23 PM
To minimize/maximise try xdotool:

xdotool search --name "Google - Chromium" windowminimize
xdotool search --name "Google - Chromium" windowraise

darioshanghai
April 14th, 2012, 10:45 PM
Hi,

I got to the same conclusion, thanks.

To emulate the stickiness I used
xdotool key alt+F8

But since you can only use keystrokes if the window is not minimized I ended up with


xdotool search --name 'WINDOW-TITLE-HERE' windowactivate
xdotool key alt+F8
xdotool key alt+F9

Thank you