#!/bin/bash # # simple launcher # dmenu="dmenu -nb #ffffff -nf #000000 -sb #ffffff -sf #ffffff -fn 10x20" tmp="/tmp/$(basename $0).$$.$RANDOM" __exit() { command rm -f $tmp; } trap __exit EXIT run=$( echo run | $dmenu ) [[ "$run" == "" ]] && exit 0 $run 2>&1 > $tmp [[ "$1" == "" ]] && exit 0; [[ $(cat $tmp) == "" ]] && exit 0 xmessage -file $tmp 2>/dev/null& xdotool search --sync --onlyvisible --maxdepth 1 xmessage mousemove --window %1 10 10