From 57e8fdd884d1579acf26093db7c7e41093781af9 Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 2 Feb 2014 16:35:00 +0800 Subject: added launcher --- scripts/x-launcher | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/x-launcher (limited to 'scripts') diff --git a/scripts/x-launcher b/scripts/x-launcher new file mode 100755 index 0000000..54f8f28 --- /dev/null +++ b/scripts/x-launcher @@ -0,0 +1,16 @@ +#!/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 +xmessage -file $tmp 2>/dev/null& +xdotool search --sync --onlyvisible --maxdepth 1 xmessage mousemove --window %1 10 10 -- cgit v1.2.3