summaryrefslogtreecommitdiff
path: root/ratws
diff options
context:
space:
mode:
Diffstat (limited to 'ratws')
-rwxr-xr-xratws14
1 files changed, 14 insertions, 0 deletions
diff --git a/ratws b/ratws
new file mode 100755
index 0000000..7f55235
--- /dev/null
+++ b/ratws
@@ -0,0 +1,14 @@
+#!/usr/bin/env dash
+
+font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
+screen=$(ratpoison -c sdump | tr ',' '\n' | grep '1$')
+width=$(echo $screen | cut -d ' ' -f 4)
+height=$(echo $screen | cut -d ' ' -f 5)
+s=$(echo $screen | cut -d ' ' -f 1)
+w=$(($width/3))
+h=$(($height/3))
+
+alias dm="dmenu -l 16 -s $s -x $w -y $h -w $w -p \"Select >\" -sb '#0B0' -sf black -nb '#000' -fn $font -i"
+
+sel=$(ratpoison -c windows | dm | cut -d ' ' -f 1)
+[ ! "$sel" = "" ] && ratpoison -c "select $sel" || true