summaryrefslogtreecommitdiff
path: root/scripts/x-launcher
blob: 54f8f281b7456152037d95eb90d169ad8763b653 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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