summaryrefslogtreecommitdiff
path: root/scripts/x-launcher
blob: 1602c8d301e1fc64913e84c387feffb23fd20fca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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