blob: f40e762c3384728d4e6dd2f1d64a30dbb6e72eed (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#!/bin/sh
set -e
[ -n "$DEBUG" ] && set -x
arg0=bemenu
# prompt=${MENU_PROMPT:- :}
prompt=${MENU_PROMPT:-}
main_color="#4E4371"
args=
idx=0
while test $# -gt $idx; do
case "$1" in
-run)
arg0=bemenu-run
prompt=" "
shift
;;
-drun)
# arg0=$HOME/devel/upstream/github.com/Cloudef/bemenu/bemenu-drun; prompt=bin
arg0=bemenu-drun
prompt=" "
main_color="#e03c8a"
shift
;;
-p)
shift
prompt="$1"
shift
;;
-x)
shift
MENU_PASSWORD=1
;;
esac
idx=$((idx + 1))
done
# HACK: https://github.com/Cloudef/bemenu/issues/5
args=
[ -n "${MENU_PASSWORD}" ] && args="${args} --password"
# make sure there we are the only running menu
pgrep "${arg0}" && pkill "${arg0}"
exec "${arg0}" \
--tb "$main_color" --tf '#fffffb' \
--hb "$main_color" --hf '#fffffb' \
--scb '#1c1c1c' --scf "$main_color" \
--prompt="${prompt}" \
${args} \
"$@"
|