Files
mesh-catalog/modules/rofi/files/bin/dmenu
T
jochen fba2d43591 rofi: the launcher as a module, claiming node-launcher and serving menu (hq ADR 0208)
Places the seat's dmenu-compatible command, the launcher and power menu, its
themes in the decided faces, and its key bindings as an i3 drop-in; Go tools
menu, applications, themes and run.
2026-10-04 13:10:58 +02:00

27 lines
784 B
Bash
Executable File

#!/bin/sh
# dmenu, as this node's launcher answers it (module rofi, novox/hq ADR 0208). The node-launcher
# seat's dmenu-compatible command: choices on standard input, the chosen one on standard output,
# exit 1 when nothing was chosen. A script calls `dmenu` and works whichever module holds the seat.
#
# rofi understands dmenu's -p, -l and -i. dmenu's look options (-fn, -nb, -nf, -sb, -sf, -m, -w)
# take a value rofi would misread, so they are dropped with it; -b and -f are dropped alone. The
# look is the launcher's theme.
set -u
n=$#
while [ "$n" -gt 0 ]; do
arg=$1
shift
n=$((n - 1))
case $arg in
-fn | -nb | -nf | -sb | -sf | -m | -w)
if [ "$n" -gt 0 ]; then
shift
n=$((n - 1))
fi
;;
-b | -f) ;;
*) set -- "$@" "$arg" ;;
esac
done
exec rofi -dmenu "$@"