#!/bin/bash # # This script provides functionality similar to the windowlist command in GNU screen # It requires ratmenu 1.5 or later: http://packages.debian.org/unstable/x11/ratmenu.html # # To use it, add something like this to your .ratpoisonrc # # bind quotedbl exec /home/doug/bin/windowlist # bind C-quotedbl exec /home/doug/bin/windowlist # RATMENU="ratmenu -style dreary -bg black -fg yellow" eval "$RATMENU $( paste <( ratpoison -c windows | sed 's/"/\\"/g;s/.*/"&"/' ) \ <( ratpoison -c "windows ratpoison -c 'select %n'" | sed 's/.*/"&"/' ) \ | tr '\n' ' ' )"