diff --git a/README.md b/README.md index 790e533..bb23a64 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file +Seems to be unicode safe, haven't don't much testing though. diff --git a/nwindow b/nwindow index d4caefc..b0866a3 100755 --- a/nwindow +++ b/nwindow @@ -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