How to close all windows of a given program at once

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#21 Post by tallboy »

Restart X

tallboy
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#22 Post by Puppus Dogfellow »

tallboy wrote:Restart X

tallboy
:?:

(if you mean to solve the xdotool weirdness, i tried that before rebooting.)

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#23 Post by MochiMoppel »

Puppus Dogfellow wrote:Are there other hidden away rox commands like the close all windows on all desktops one?
It's not hidden away, it's in the command list

Code: Select all

  -D, --close=DIR	close DIR and its subdirectories
One thing odd I found only recently: Ctrl+Rightclick opens the basic menu + context menu. Odd because the basic menu is quite important, but difficult to pull out when there is no free space in the list. Ctrl+Rightclick is pretty unusual.
is there one for simply cycling back through the directories you just visited?
Well, if that would be possible I wouldn't have started this thread. :lol: I wouldn't have to open so many windows.
(feel like i ruined your eyesight/screenshot joke. how did you do that?
How did I do what ?

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#24 Post by Puppus Dogfellow »

MochiMoppel wrote:
Puppus Dogfellow wrote:Are there other hidden away rox commands like the close all windows on all desktops one?
It's not hidden away, it's in the command list

Code: Select all

  -D, --close=DIR	close DIR and its subdirectories
One thing odd I found only recently: Ctrl+Rightclick opens the basic menu + context menu. Odd because the basic menu is quite important, but difficult to pull out when there is no free space in the list. Ctrl+Rightclick is pretty unusual.
is there one for simply cycling back through the directories you just visited?
Well, if that would be possible I wouldn't have started this thread. :lol: I wouldn't have to open so many windows.
(feel like i ruined your eyesight/screenshot joke. how did you do that?
How did I do what ?

)

***

regarding cycling back through what you've just visited:
Window History

This adds a per-window history of directories visited. Click on the up button while the control key is pressed to activate. Useful when navigating symbolic links.

Also added are two menu entries for opening the previous directory (so you can bind keys to them).

Patch 8K patch file.
from here. is that the same thing we're hoping to be able to do?

some1
Posts: 117
Joined: Thu 17 Jan 2013, 11:07

On the recycling patch

#25 Post by some1 »

Skimming a patch referenced by a fellow dog
Patch lives here:
http://www.kerofin.demon.co.uk/rox/patc ... .2.0.patch
As before holding down the control key when clicking the up button in the
toolbar opens the previous directory, or beeps if there isn't one.
Edit: A brainfart have been lingering here.
Decontamination has been applied.

:roll:

Cheers
Last edited by some1 on Tue 24 Jun 2014, 18:05, edited 1 time in total.

some1
Posts: 117
Joined: Thu 17 Jan 2013, 11:07

Apropos the bookmarking

#26 Post by some1 »

A response to some earlier mentioning elsewhere of the
rox-bookmarking as clumsy.
':!:'Do a right-click on the bookmark-icon':!:'

Rox is drag and drop.
Populate your bookmark-list by dragging dirs to the window.

Going for bulk:
Select items
Right-click on the bookmark icon
Do the drag and drop
Close the window
Hit escape
Only one source-window at a time - I guess.


Anyway - we have seen some nice coding,ideas lately- thats sweet.

Cheers

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

Re: On the recycling patch

#27 Post by Puppus Dogfellow »

some1 wrote:Skimming the patch

[...]

But - as is - holding CTL_L plus left-clicking the UP-icon -
works very well as your back-cycling utility -
As is - I think we are facing the remaider of a FULLER feature.-but -do-dig in.
I have to leave.


No stone left unturned -eh? :)

Cheers
"CTL_L plus left-clicking the UP-icon" doesn't appear to be supported out of the box in precise 5.5-5.7.1.

:?

some1
Posts: 117
Joined: Thu 17 Jan 2013, 11:07

#28 Post by some1 »

@Puppus_Dogfellow
"CTL_L plus left-clicking the UP-icon" doesn't appear to be supported out of the box in precise 5.5-5.7.1.
:shock:

Mmmh- what to say:....

1. Thanks for sharing.
2. Sad to hear that.
3. Hope - you can fix it.
4. Dont bother - you dont need it.
5. Read the source
6. Move on - less might be more.
7. Go back into history - read the old patch you referenced. Some back-cycling in that -I think..
8. Per my dayform about the UP-icon:
- 1) CTL_L or not -> ROX goes UP the TREE, displaying the parent-dir of the actual displayed dir .
- 2) Left-Mouse-Click displays the parent in this window
- Right-Mouse-Click displays the parent in a new window.
9. CTL_L - CONTROLMASK in patch-/code-lingo - does NOT have a specialeffect on the UP-icon - nowadays.
10.When time permits I will edit my post about the old patch.


Hope that helps
- and that you edit your choice of cut and paste

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

Re: On the recycling patch

#29 Post by Puppus Dogfellow »

Puppus Dogfellow wrote:
some1 wrote:Skimming the patch

[...]

But - as is - holding CTL_L plus left-clicking the UP-icon -
works very well as your back-cycling utility -
As is - I think we are facing the remaider of a FULLER feature.-but -do-dig in.
I have to leave.


No stone left unturned -eh? :)

Cheers
"CTL_L plus left-clicking the UP-icon" doesn't appear to be supported out of the box in precise 5.5-5.7.1.

:?
some1 wrote:@Puppus_Dogfellow
"CTL_L plus left-clicking the UP-icon" doesn't appear to be supported out of the box in precise 5.5-5.7.1.
:shock:

Mmmh- what to say:....

1. Thanks for sharing.
2. Sad to hear that.
3. Hope - you can fix it.
4. Dont bother - you dont need it.
5. Read the source
6. Move on - less might be more.
7. Go back into history - read the old patch you referenced. Some back-cycling in that -I think..
8. Per my dayform about the UP-icon:
- 1) CTL_L or not -> ROX goes UP the TREE, displaying the parent-dir of the actual displayed dir .
- 2) Left-Mouse-Click displays the parent in this window
- Right-Mouse-Click displays the parent in a new window.
9. CTL_L - CONTROLMASK in patch-/code-lingo - does NOT have a specialeffect on the UP-icon - nowadays.
10.When time permits I will edit my post about the old patch.


Hope that helps
- and that you edit your choice of cut and paste
edit what? it's pretty clear, especially if quoted in context. regarding 8.1, "CTL_L or not -"--meaning the ctl-l does nothing. has no effect. is not supported. it "goes up the tree"--it's not cycling back through where you were, just following the tree; where you were is the history...not supported, something that you seem to be aware of in 9.
But - as is - holding CTL_L plus left-clicking the UP-icon -
works very well as your back-cycling utility
untrue, yes?

regarding item 4, I don't need to be using puppy linux, but I prefer it, just as i'd prefer that holding down ctrl when clicking the up arrow allowed me to cycle back and go where i just was rather than do the same thing clicking the arrow without pressing the key does.

Mmmh- what to say:....

that you have a working .pet file that supplies the missing feature or know someone who can make one.

:wink:

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#30 Post by amigo »

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.

some1
Posts: 117
Joined: Thu 17 Jan 2013, 11:07

#31 Post by some1 »

@amigo
Thank you

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#32 Post by Puppus Dogfellow »

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.
not sure about your machine, amigo, but on mine the right click gives Parent, not Previous.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#33 Post by amigo »

Ah, right you are -I hadn't looked at that patch for a long time.

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#34 Post by Puppus Dogfellow »

amigo wrote:Ah, right you are -I hadn't looked at that patch for a long time.
alas.

:(

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#35 Post by MochiMoppel »

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

User avatar
TwoPuppies
Posts: 77
Joined: Wed 29 Dec 2010, 05:13
Location: Melbourne, Australia

#36 Post by TwoPuppies »

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.
[color=#006699]What you really need is two puppies:
Puppy Linux, and the sort with four legs and a tail.[/color]

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#37 Post by drunkjedi »

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.
To close all programs and windows, and make your desktop clean just restart X.

User avatar
TwoPuppies
Posts: 77
Joined: Wed 29 Dec 2010, 05:13
Location: Melbourne, Australia

#38 Post by TwoPuppies »

drunkjedi wrote:To close all programs and windows, and make your desktop clean just restart X.
Yep. Knew that. I was just wondering if there was another form of the scripts / commands under discussion that did the same thing.
[color=#006699]What you really need is two puppies:
Puppy Linux, and the sort with four legs and a tail.[/color]

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#39 Post by tallboy »

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
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#40 Post by MochiMoppel »

drunkjedi wrote:To close all programs and windows, and make your desktop clean just restart X.
I take this as a joke :lol:
tallboy wrote:I may be totally wrong here, but isn't XKillClient something you could use?
Thanks for trying to help, but I don't see what this does and most of all: I don't have any problem :wink: .
TwoPuppies wrote:is there a variant of this that will close ALL the windows on the current desktop, or ALL windows on ALL desktops?
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.

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

Post Reply