summaryrefslogtreecommitdiff
path: root/ratws
diff options
context:
space:
mode:
authorTslil Clingman <tslil.clingman@gmail.com>2017-05-28 17:32:03 -0500
committerTslil Clingman <tslil.clingman@gmail.com>2017-05-28 17:32:03 -0500
commit721668ea57fda4254ceee9146c6b6bee470b3fc6 (patch)
treef0f7a8078c601d47dd521567749b215f9ca36373 /ratws
parent6d1077a28b8d6f64ca72b9aa00f0b2cab97fb594 (diff)
Ran shellcheck, fixed (?) things
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;