#!/usr/bin/env bash # # Ratpoison window manager utility. # # Parameters BASENAME="`basename $0`" ACTION="$1" # Dispatch if [ -z "$ACTION" ]; then echo "usage: $BASENAME " exit 1 elif [ "$ACTION" == "workspaces" ]; then # Spawn rpws rpws init 9 -k -a # Sleep, giving time for rpws to start properly sleep 2 # Apply a workaround to display a window after rpws is initialized ratpoison -c 'prev' ratpoison -c 'next' elif [ "$ACTION" == "custom" ]; then # Sources a custom ratpoisonrc file, if present if [ -e "$HOME/.custom/ratpoisonrc" ]; then ratpoison -c "source $HOME/.custom/ratpoisonrc" fi fi