|
|
2010-09-13
, 18:33
|
|
Posts: 176 |
Thanked: 59 times |
Joined on Mar 2010
|
#12
|
|
|
2010-09-13
, 18:36
|
|
Posts: 1,224 |
Thanked: 1,763 times |
Joined on Jul 2007
|
#13
|
|
|
2010-09-13
, 18:37
|
|
Posts: 436 |
Thanked: 298 times |
Joined on Jan 2010
@ England
|
#14
|
Hi, Ive tried both searches and cant seem 2 find any hints, but does anyone know of a way to kill all open tasks instantly? easily! I always end up with 20 odd conversation windows and it bugs be havin 2 click them 1 by 1 to shut in the task switcher. I am a text addict!
|
|
2010-09-13
, 18:44
|
|
|
Posts: 1,411 |
Thanked: 1,330 times |
Joined on Jan 2010
@ Tatooine
|
#15
|
When the device is locked there is another window that should probably not be closed: gp_tklock.
It seems to me that the id of all the windows that should not be locked starts with 0x01, and the other (user) windows starts with something else. Using this might make your script simpler, and might allow for not closing other windows that should not be closed, that are not on your list.
|
|
2010-09-13
, 19:44
|
|
|
Posts: 1,411 |
Thanked: 1,330 times |
Joined on Jan 2010
@ Tatooine
|
#16
|
#!/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
|
|
2010-09-13
, 19:55
|
|
Posts: 436 |
Thanked: 298 times |
Joined on Jan 2010
@ England
|
#17
|
How about linking this function or script to the accelerometer ?
So flipping the device face over, or shaking it, clears all tasks.
|
|
2010-09-13
, 21:37
|
|
Posts: 95 |
Thanked: 26 times |
Joined on Oct 2009
@ UK
|
#18
|
|
|
2010-09-13
, 21:49
|
|
|
Posts: 417 |
Thanked: 200 times |
Joined on Apr 2010
@ Germany
|
#19
|
|
|
2010-09-13
, 21:51
|
|
|
Posts: 4,672 |
Thanked: 5,455 times |
Joined on Jul 2008
@ Springfield, MA, USA
|
#20
|
Hi, Ive tried both searches and cant seem 2 find any hints, but does anyone know of a way to kill all open tasks instantly? easily! I always end up with 20 odd conversation windows and it bugs be havin 2 click them 1 by 1 to shut in the task switcher. I am a text addict!

| The Following 3 Users Say Thank You to danramos For This Useful Post: | ||
Note: it requires Bash and wmctrl (apt-get install bash wmctrl)
#!/bin/bash IFS=$'\n' shopt -s nocasematch # Array of window titles NOT to close NOCLOSE=("hildon-home" "hildon-status-menu" "desktop") for LINE in `wmctrl -lp `; do PID=`echo "$LINE" | awk '{print $3}'` PTITLE=`echo $LINE | awk '{print $5}'` SKIP=FALSE for i in ${NOCLOSE[@]};do if [[ "$i" = "$PTITLE" ]];then SKIP=TRUE fi done if [[ $SKIP = TRUE ]]; then echo "Skipping $PID ($PTITLE)" else echo "Killing $PID ($PTITLE)" kill $PID fi doneMy coding skills suck - I'm sure there's a much better/optimal way of doing this, but it works for me.
May the source be with you.