#!/bin/sh set -e [ -n "$DEBUG" ] && set -x # make sure there we are the only running menu pgrep bemenu >/dev/null && pkill -f bemenu # always source the config to make sure . "$HOME"/.config/bemenu.conf arg0=bemenu MENU_PROMPT=${MENU_PROMPT:-󰈶󰩤} idx=0 while test $# -gt $idx; do case "$1" in -run) arg0=bemenu-run MENU_PROMPT="󰏌" shift ;; -drun) arg0="j4-dmenu-desktop --dmenu=bemenu" MENU_PROMPT="󱂬" shift ;; -p) shift MENU_PROMPT="$1" shift ;; -x) shift BEMENU_OPTS="${BEMENU_OPTS} --password" ;; esac idx=$((idx + 1)) done [ -n "${MENU_POPUP}" ] && BEMENU_OPTS="${BEMENU_OPTS} --center --width-factor 0.5 --border 2 --list 8" # --fixed-height BEMENU_OPTS="${BEMENU_OPTS} --prompt ${MENU_PROMPT}" BEMENU_OPTS="${BEMENU_OPTS} $*" exec ${arg0}