Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 16 Jun 2019, 01:38
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to close all minimized apps at once?(SOLVED)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
gychang


Joined: 29 Nov 2008
Posts: 292
Location: San Diego, CA

PostPosted: Sat 20 Apr 2019, 08:54    Post subject:  How to close all minimized apps at once?(SOLVED)  

I am using BionicPup64 and I find it convenient and faster using keyboard shortcut/command mostly. Frequently have several apps running in the background/minimized, rox, geany, urxvt, etc.

Rather than opening each app and close with Alt-F4 or Ctrl-Q, mouse click on close button, killall "appname" etc. is there an easy way to close all apps with a single command? can a bash script be used?

_________________
---
trying to learn puppylinux...
---

Last edited by gychang on Sat 20 Apr 2019, 23:17; edited 1 time in total
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 13227
Location: Arizona USA

PostPosted: Sat 20 Apr 2019, 11:00    Post subject:  

Does restarting the X server do the trick?
Back to top
View user's profile Send private message 
gychang


Joined: 29 Nov 2008
Posts: 292
Location: San Diego, CA

PostPosted: Sat 20 Apr 2019, 11:55    Post subject:  

Flash wrote:
Does restarting the X server do the trick?


"restartwm" does close all minimized/backgroup apps but also closes the active full-sized app...

_________________
---
trying to learn puppylinux...
---
Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 894

PostPosted: Sat 20 Apr 2019, 12:11    Post subject:  

You'd want a script that kills all ROX-Filer child processes

If you run:
Code:
ps -eal | grep "ROX-Filer"

you will find the pid of rox filer.

Now run the command again but put rox filer's pid as the grep argument.
That will show you all the child processes running in your desktop.
Back to top
View user's profile Send private message 
dwnld_phpbb

Joined: 20 Apr 2019
Posts: 2

PostPosted: Sat 20 Apr 2019, 12:22    Post subject:    

Take what jafadmin handed you and make your own "script to close many programs gracefully."
Back to top
View user's profile Send private message 
gychang


Joined: 29 Nov 2008
Posts: 292
Location: San Diego, CA

PostPosted: Sat 20 Apr 2019, 20:08    Post subject:  

user MochiMoppel recommended a script "close-all"

# Courtesy of MochiMoppel
Code:
WIN_ID=$(wmctrl -l | awk '{print $1}')
for i in $WIN_ID; do
   wmctrl -ic $i
done


made it executable and bound to keycombo xx in .bashrc. alias xx='cd && sh close-all && exit'
when I activate it, closes all active/minimized/background apps in all virtual desktops.

Originally I just wanted to end only minimized apps but this seem very useful. Is there a way to only batch close minimized apps anyone?

_________________
---
trying to learn puppylinux...
---
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1841
Location: Japan

PostPosted: Sat 20 Apr 2019, 21:19    Post subject:  

jafadmin wrote:
You'd want a script that kills all ROX-Filer child processes
Hmm...I can't see how ROX-Filer could be of any help here. ROX-Filer doesn't know the window states of its own windows, let alone those of other applications.

gychang wrote:
user MochiMoppel recommended a script "close-all"

# Courtesy of MochiMoppel
WIN_ID=$(wmctrl -l | awk '{print $1}')
for i in $WIN_ID; do
wmctrl -ic $i
done
I think that was related to my thread How to close all windows of a given program at once.

It should be easy to add an option "close all windows of all applications" to the dialog posted in the linked thread and restrict is to minimized windows. Please specify in the thread what you have in mind and I'll see what I can do.
Back to top
View user's profile Send private message 
gychang


Joined: 29 Nov 2008
Posts: 292
Location: San Diego, CA

PostPosted: Sat 20 Apr 2019, 21:57    Post subject:  

MochiMoppel wrote:
jafadmin wrote:
You'd want a script that kills all ROX-Filer child processes
Hmm...I can't see how ROX-Filer could be of any help here. ROX-Filer doesn't know the window states of its own windows, let alone those of other applications.

gychang wrote:
user MochiMoppel recommended a script "close-all"

# Courtesy of MochiMoppel
WIN_ID=$(wmctrl -l | awk '{print $1}')
for i in $WIN_ID; do
wmctrl -ic $i
done
I think that was related to my thread How to close all windows of a given program at once.

It should be easy to add an option "close all windows of all applications" to the dialog posted in the linked thread and restrict is to minimized windows. Please specify in the thread what you have in mind and I'll see what I can do.


as per my original message title here, I was mainly interested in how to quickly close all minimized apps (sparing active open apps).

_________________
---
trying to learn puppylinux...
---
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1841
Location: Japan

PostPosted: Sat 20 Apr 2019, 22:45    Post subject:  

I tried to answer your question in my thread. See if it helps you.
Back to top
View user's profile Send private message 
gychang


Joined: 29 Nov 2008
Posts: 292
Location: San Diego, CA

PostPosted: Sat 20 Apr 2019, 23:17    Post subject:  

MochiMoppel wrote:
I tried to answer your question in my thread. See if it helps you.


works perfectly, thanks

_________________
---
trying to learn puppylinux...
---
Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 894

PostPosted: Sun 21 Apr 2019, 12:54    Post subject:  

MochiMoppel wrote:
I tried to answer your question in my thread. See if it helps you.


Way more granularity. Very nice, @MochiMoppel
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0415s ][ Queries: 11 (0.0101s) ][ GZIP on ]