diff options
| author | Patrick <phaller@localhost.localdomain> | 2014-02-02 16:35:00 +0800 |
|---|---|---|
| committer | Patrick <phaller@localhost.localdomain> | 2014-02-02 16:35:00 +0800 |
| commit | 57e8fdd884d1579acf26093db7c7e41093781af9 (patch) | |
| tree | 7f03d72d21b2d52f70fa7dc5a277e9e8049c3129 | |
| parent | bef55f10d9d7d3e2a9b4510c1df4a3b8dfd56c1e (diff) | |
added launcher
| -rw-r--r-- | Makefile | 4 | ||||
| -rwxr-xr-x | scripts/x-launcher | 16 |
2 files changed, 18 insertions, 2 deletions
@@ -1,7 +1,7 @@ PREFIX = /usr/local SRC = x-session.c X11SRC = x-move-resize.c x-alt-tab.c x-focus-manager.c x-placement-manager.c x-undecorate.c x-window-list.c -SCRIPTS= scripts/x-banish scripts/x-root-clean +SCRIPTS= scripts/x-banish scripts/x-root-clean scripts/x-launcher CC = gcc CFLAGS = -O2 -Wall -std=c99 -pedantic @@ -21,4 +21,4 @@ clean: rm $(BIN) $(X11BIN) install: - install -m 0755 $(BIN) $(X11BIN) ${PREFIX}/bin/. + install -m 0755 $(BIN) $(X11BIN) $(SCRIPTS) ${PREFIX}/bin/. 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 |
