summaryrefslogtreecommitdiff
path: root/ratws
diff options
context:
space:
mode:
Diffstat (limited to 'ratws')
-rwxr-xr-xratws10
1 files changed, 6 insertions, 4 deletions
diff --git a/ratws b/ratws
index af49cd3..6dc09ce 100755
--- a/ratws
+++ b/ratws
@@ -1,8 +1,10 @@
#!/usr/bin/env sh
w=$(ratpoison -c windows)
-#[ "$1" == "-s" ] && p="Tab" && w=$(echo "$w" | grep '(surf)')
-#[ "$1" == "-w" ] && p="Windows" && w=$(echo "$w" | grep -v '(surf)')
-[ -z $w ] && exit
+[ "$1" = "-s" ] && p="Tab" && w=$(echo "$w" | grep '(surf)')
+[ "$1" = "-w" ] && p="Windows" && w=$(echo "$w" | grep -v '(surf)')
+[ -z "$w" ] && exit
sel=$(echo "$w" | ratdm -p ${p:-All}' >' | cut -d ' ' -f 1)
-[ -n $sel ] && ratpoison -c "select $sel" || true
+if [ -n "$sel" ]; then
+ ratpoison -c "select $sel"
+fi;