How to close all windows of a given program at once
- Puppus Dogfellow
- Posts: 1667
- Joined: Tue 08 Jan 2013, 01:39
- Location: nyc
not sure about your machine, amigo, but on mine the right click gives Parent, not Previous.amigo wrote:The filer does keep a per-window history which can be accessed by right-clicking on the filer window and choosing:
Window -> Previous (in a new or same window)
I long ago adapted the old patch mentioned earlier which adds a button to the toolbar to provide the 'Back' feature -but to the gtk-1.2 version of rox.
As I remember, the patch is not too hard to wrangle into the sources, but there is no way to 'patch' the already-compiled binary.
- Puppus Dogfellow
- Posts: 1667
- Joined: Tue 08 Jan 2013, 01:39
- Location: nyc
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
I tinkered with the code lately and came up with a slightly improved version. See original post.
- Attachments
-
- Screenshot.png
- (9.39 KiB) Downloaded 469 times
- TwoPuppies
- Posts: 77
- Joined: Wed 29 Dec 2010, 05:13
- Location: Melbourne, Australia
Thanks for a really useful thread.
Getting right back to the original post, is there a variant of this that will close ALL the windows on the current desktop, or ALL windows on ALL desktops? That is to say, not just ROX-Filer windows OR the windows of a specified application, but both at the same time.
Getting right back to the original post, is there a variant of this that will close ALL the windows on the current desktop, or ALL windows on ALL desktops? That is to say, not just ROX-Filer windows OR the windows of a specified application, but both at the same time.
[color=#006699]What you really need is two puppies:
Puppy Linux, and the sort with four legs and a tail.[/color]
Puppy Linux, and the sort with four legs and a tail.[/color]
To close all programs and windows, and make your desktop clean just restart X.TwoPuppies wrote:Thanks for a really useful thread.
Getting right back to the original post, is there a variant of this that will close ALL the windows on the current desktop, or ALL windows on ALL desktops? That is to say, not just ROX-Filer windows OR the windows of a specified application, but both at the same time.
- TwoPuppies
- Posts: 77
- Joined: Wed 29 Dec 2010, 05:13
- Location: Melbourne, Australia
Yep. Knew that. I was just wondering if there was another form of the scripts / commands under discussion that did the same thing.drunkjedi wrote:To close all programs and windows, and make your desktop clean just restart X.
[color=#006699]What you really need is two puppies:
Puppy Linux, and the sort with four legs and a tail.[/color]
Puppy Linux, and the sort with four legs and a tail.[/color]
Hi MochiMoppel.
I really don't have enough knowledge to comment code, so I may be totally wrong here, but isn't XKillClient something you could use?
http://linux.die.net/man/3/xkillclient
Here is an interesting question related to the problem:
http://stackoverflow.com/questions/3073 ... ents-child
tallboy
I really don't have enough knowledge to comment code, so I may be totally wrong here, but isn't XKillClient something you could use?
http://linux.die.net/man/3/xkillclient
Here is an interesting question related to the problem:
http://stackoverflow.com/questions/3073 ... ents-child
tallboy
True freedom is a live Puppy on a multisession CD/DVD.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
I take this as a jokedrunkjedi wrote:To close all programs and windows, and make your desktop clean just restart X.
Thanks for trying to help, but I don't see what this does and most of all: I don't have any problem .tallboy wrote:I may be totally wrong here, but isn't XKillClient something you could use?
Well, yes, I once made several variants, some of them using Xdialog and some do what you are asking for, but I only published the "mild" version that you find here in this thread. Closing all windows is pretty radical and since I don't like cascading "Are you really sure?" dialogs I keep the potentially harmful stuff in my closet.TwoPuppies wrote:is there a variant of this that will close ALL the windows on the current desktop, or ALL windows on ALL desktops?
Nevertheless closing all windows can be very useful right before shutdown and I remember this thread where I - unsuccessfully - tried to convince other forum members that Puppy's usual shutdown process kills all windows instead of closing them and that this method can lead to data loss. For closing all windows on all desktops you can use something like this:
Code: Select all
WIN_ID=$(wmctrl -l | awk '{print $1}')
for i in $WIN_ID; do
wmctrl -ic $i
done
- TwoPuppies
- Posts: 77
- Joined: Wed 29 Dec 2010, 05:13
- Location: Melbourne, Australia
Excellent. Thank you.MochiMoppel wrote:For closing all windows on all desktops you can use something like this:Code: Select all
WIN_ID=$(wmctrl -l | awk '{print $1}') for i in $WIN_ID; do wmctrl -ic $i done
[color=#006699]What you really need is two puppies:
Puppy Linux, and the sort with four legs and a tail.[/color]
Puppy Linux, and the sort with four legs and a tail.[/color]
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
User gychang requested here to close all minimized windows at once.
One way to do this:
One way to do this:
Code: Select all
WIN_ID=$(wmctrl -l | awk '{print $1}')
for i in $WIN_ID; do
[[ $(xprop -id $i WM_STATE) = *Iconic* ]] && wmctrl -ic $i
done
this script works well!MochiMoppel wrote:User gychang requested here to close all minimized windows at once.
One way to do this:Code: Select all
WIN_ID=$(wmctrl -l | awk '{print $1}') for i in $WIN_ID; do [[ $(xprop -id $i WM_STATE) = *Iconic* ]] && wmctrl -ic $i done
---
trying to learn puppylinux... :D
---
trying to learn puppylinux... :D
---