#!/usr/bin/env sh xephyr=/usr/bin/Xephyr awesome=/usr/bin/awesome # TODO: configurable confdir=./src/awesomerc rcfile=./config/awesome/rc.lua screen=1600x900 display=:1.0 startXephyr() { $xephyr $display -ac -br -noreset -screen $screen >/dev/null 2>&1 & } runAwesome() { DISPLAY=$display $awesome \ --config $rcfile \ --search $confdir } case $1 in start) startXephyr luamon . pkill Xephyr ;; runAwesome) runAwesome ;; debug) startXephyr sleep 1 # wait for Xephyr to be ready runAwesome ;; try-current) startXephyr sleep 1 # wait for Xephyr to be ready DISPLAY=$display $awesome ;; *) echo "Need command" ;; esac