| Prev |   1     2   3 |
maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   close all open tasks easily in 1 gesture? (https://talk.maemo.org/showthread.php?t=62183)

NightShift79 2010-09-13 22:03

Re: close all open tasks easily in 1 gesture?
 
lol... come on...

danramos 2010-09-13 22:41

Re: close all open tasks easily in 1 gesture?
 
Quote:

Originally Posted by NightShift79 (Post 815293)
lol... come on...

I'm a jerk. Sorry, couldn't help it for the chuckle. :p

Crugath 2010-09-14 19:15

Re: close all open tasks easily in 1 gesture?
 
Apologies if this has been mentioned before already. I know it's not quite the same, but it's close enough. Like you said, if you have 21 conversation windows open, select one of them, tap the power button and choose "End Current Task" and all 21 conversation windows will close. I know that doesn't affect the other applications open, but it does make it easier :P

jedi 2010-09-15 09:41

Re: close all open tasks easily in 1 gesture?
 
So has anyone tried this script? I've found it pretty handy - especially when run from the power button menu.

Just occasionally it seems to not close certain windows, and I'm wondering if it's related to the assumtion of the 0x00 / 0x01 ID's being system-specific?

pelago 2010-09-15 12:52

Re: close all open tasks easily in 1 gesture?
 
Quote:

Originally Posted by Crugath (Post 816129)
Like you said, if you have 21 conversation windows open, select one of them, tap the power button and choose "End Current Task" and all 21 conversation windows will close.

Does anyone know if that closes the app "nicely", i.e. allows it to finish writing to databases etc.? I've always assumed it was to kill a task that was non-responsive in a possibly destructive manner.

munkiii 2010-09-15 14:30

Re: close all open tasks easily in 1 gesture?
 
Quote:

Originally Posted by jedi (Post 815159)
Code:

#!/bin/bash
IFS=$'\n'

for LINE in `wmctrl -lp `; do
  if [ ${LINE:2:2} -gt 1 ]; then
      PID=`echo "$LINE" | awk '{print $3}'`
      PTITLE=`echo $LINE | awk '{print $5}'`
      echo "Killing $PID ($PTITLE)"
      kill $PID
  fi
done


How do i save this as a script and run it?

I have saved all that code into a file called "close_all.sh", and tried to run it by typing

Code:

cd /home/user/
sh close_all.sh

but i get an error of

Code:

close_all.sh: line 5: syntax error: Bad substitution

jedi 2010-09-15 15:12

Re: close all open tasks easily in 1 gesture?
 
It's because it's a bash script.

First make sure you have bash installed ("apt-get install bash" when root user).

Then set the exec permission on your file:
Code:

chmod +x close_all.sh
Then run it with:
Code:

./close_all.sh
Note: you don't need to be root user to run it.

Zidust 2010-09-15 15:21

Re: close all open tasks easily in 1 gesture?
 
Have you guys ever thought about a type of Sleep/restore function? A way for the user to easily close all tasks and afterwards just as easily open all tasks again?

I'm no developer so I have no idea if this is even possible but it would be a little like firefox's restore function.

What do you guys/developers think? Is this possible? It could give us a nice boost in battery power at least :).

allnameswereout 2010-09-15 17:42

Re: close all open tasks easily in 1 gesture?
 
Quote:

Originally Posted by danramos (Post 815317)
I'm a jerk. Sorry, couldn't help it for the chuckle. :p

Well, it does work, it works out of the box, and it is rather typical for monolithic OSes and dumb terminals.

If you close all windowed applications you might as well restart your phone. Who says a daemon isn't to blame? Hence, I'd say the right way is to use upstart for this (there isnt a sysvinit).

Quote:

Originally Posted by Zidust (Post 816938)
Have you guys ever thought about a type of Sleep/restore function? A way for the user to easily close all tasks and afterwards just as easily open all tasks again?

I'm no developer so I have no idea if this is even possible but it would be a little like firefox's restore function.

What do you guys/developers think? Is this possible? It could give us a nice boost in battery power at least :).

Yes, I did, but GeneralAntilles was of the opinion thats for Intel netbooks since our lil ARM device was 24/7 never going down because it could go into very low power mode.

If you do want to suspend an application you can use kill -19 <pid>, and kill -18 <pid> to continue it.

Now, in theory he had a good point, in practice not since the device can sometimes hardly be up for 6 hours. Even laptops would auto suspend or hibernate when juice is too low.

SAABoy 2010-09-17 23:06

Re: close all open tasks easily in 1 gesture?
 
Quote:

Originally Posted by fraaaaanka (Post 815173)
typical woman with bad idea .... the shakey option wouldnt work as i listen to music at the gym on my n900

ps only jkin about the typical woman bit!!!!

perhaps long press on camera button when lens cover is closed or an icon on desktop?

dude, really? that was a nasty comment whether you call it a joke or not.


| Prev |   1     2   3 |
All times are GMT. The time now is 10:42.

vBulletin® Version 3.8.8