nwindow in better order

This commit is contained in:
Mytchel Hammond 2015-04-09 11:09:11 +12:00
parent 728aedbadd
commit 9af240e7c2
2 changed files with 4 additions and 4 deletions

View File

@ -11,8 +11,8 @@ user presses return nenu exits and prints what was typed to stdout.
Check out the man page.
Look in nexec, ntime and nwindow for examples of use. These are useable scripts
Look in nexec, ntime and nwindow for examples of use. These are useful scripts
in their own right.
On exit returns 0, unless escape was pressed, then returns 1.
Seems to be unicode safe, haven't don't much testing though.
Seems to be unicode safe, haven't don't much testing though.

View File

@ -1,7 +1,7 @@
#!/bin/sh
# wmutils's chwso to show menu of mapped windows, select one then raise it.
N=`(for p in $(lsw); do echo " $(wname $p)"; done) | \
N=`(for p in $(lsw | tac); do echo " $(wname $p)"; done) | \
nl -n rz -s ' ' -w 2 | nenu -n | cut -d' ' -f1`
[ ! -z $N ] && lsw | head -$N | tail -1 | cut -d' ' -f1 | xargs chwso -r
[ ! -z $N ] && lsw | tac | head -$N | tail -1 | cut -d' ' -f1 | xargs chwso -r