diff options
Diffstat (limited to 'ratws')
| -rwxr-xr-x | ratws | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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; |
