| Author |
Message |
Argolance

Joined: 06 Jan 2008 Posts: 1376 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Sun 20 Jan 2013, 13:57 Post subject:
Minimize all or single opened application window(s) [SOLVED] Subject description: Window manager: JWM |
|
Hello,
Is it possible and if yes, how to minimize all opened application windows to the task bar using a command line?
Thank you.
Cordialement.
_________________

Last edited by Argolance on Mon 21 Jan 2013, 10:56; edited 1 time in total
|
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 1759
|
Posted: Sun 20 Jan 2013, 15:07 Post subject:
|
|
wmctrl is the tool -can't remember the options right now.
|
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 571
|
Posted: Sun 20 Jan 2013, 15:20 Post subject:
|
|
Here you go.
Minimize all windows:
| Code: | | for i in `wmctrl -l | cut -f1 -d ' '`; do wmctrl -i -r $i -b add,hidden; done |
Unminimize:
| Code: | | for i in `wmctrl -l | cut -f1 -d ' '`; do wmctrl -i -r $i -b remove,hidden; done |
More:
I've seen some packages in PET'n'Stuff section.
Too bad it's not OOTB in Puppies - it's small yet very powerful...
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 834
|
Posted: Sun 20 Jan 2013, 20:02 Post subject:
|
|
You can also use xdotool-
| Code: | | for i in $(xdotool search ".*");do xdotool windowminimize $i;done |
Available here- http://www.murga-linux.com/puppy/viewtopic.php?t=79573
Cheers,
s
|
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 1759
|
Posted: Mon 21 Jan 2013, 03:42 Post subject:
|
|
sfr, I am quite sure there is a wmctrl option which minimizes all windows at once, without the need for running it multiple times.
|
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 571
|
Posted: Mon 21 Jan 2013, 07:39 Post subject:
|
|
Amigo, yes - I checked it out again and most likely it's:
wmctrl -k on
however it doesn't work in JWM, though eg. Openbox is fine...
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1376 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Mon 21 Jan 2013, 07:49 Post subject:
|
|
Hello,
Thank you for answering.
This is exactly what I was expecting for, though I had to install wmctrl using PPM because it is not present on Puppy Precise 5.4.3.
May I ask a supplementary question, so this will be quite perfect and duly [SOLVED] :
How to minimize a single window? I noticed this command line running wmctrl --help, to close the window "gracefully": I presume <WIN> is something like the window ID? I would like to know how to get it?
Cordialement.
_________________

|
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 571
|
Posted: Mon 21 Jan 2013, 08:25 Post subject:
|
|
| Argolance wrote: | | How to minimize a single window? I noticed this command line running wmctrl --help, to close the window "gracefully": I presume <WIN> is something like the window ID? I would like to know how to get it? |
That one simply closes a window, not minimizes it.
To get names and IDs of opened windows:
Minimize a window by its name:
| Code: | | wmctrl -r window_name -b add,hidden |
Same thing, but by its ID:
| Code: | | wmctrl -i -r window_ID -b add,hidden |
IMHO it's better to use IDs, since if there's more than one window with the same name, only the first match will be considered.
Also, if you're planning more complex actions (eg. to simulate keystrokes, mouse) it's worth to follow Seaside's advice and play with xdotool too, since they (xdotool+wmctrl) complement each other in some extent.
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
|
Back to top
|
|
 |
Argolance

Joined: 06 Jan 2008 Posts: 1376 Location: PORT-BRILLET (Mayenne - France)
|
Posted: Mon 21 Jan 2013, 10:58 Post subject:
|
|
Hello,
Great!
Thank you a lot.
Cordialement.
_________________

|
|
Back to top
|
|
 |
|