12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #!/bin/bash
-
- . <(ffoom init)
- ffoo import core
- ffoo import ini
-
- FFOO_INI_PATH="__FFOO_INI_PATH__"
-
- usage() {
- usage_is "[-l|--lines NUM] [--split CHAR] ARGS..."
- }
-
- numbered=false
- lines=10
- maybe_split=cat
-
- while true; do case $1 in
- -l|--lines) lines=$2; shift 2 ;;
- --split) delim=$2; shift 2 ;;
- --help|--usage) usage ;;
- *) break ;;
- esac done
-
- test -n "$delim" && maybe_split=do_split
-
- host=$(hostname -s)
- nb="$(iniread -p style.color.nbg)"
- nf="$(iniread -p style.color.nfg)"
- sb="$(iniread -p style.color.sng)"
- sf="$(iniread -p style.color.sfg)"
- fn="$(iniread -p style.font)"
- fn=${fn:--*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*}
-
- style() {
- test -n "$nb" && echo -n "-nb $nb "
- test -n "$nf" && echo -n "-nf $nf "
- test -n "$sb" && echo -n "-sb $sb "
- test -n "$sf" && echo -n "-sf $sf "
- test -n "$fn" && echo -n "-fn $fn "
- }
-
- do_split() {
- cut -d$delim -f2-
- }
-
- dmenu -i -l $lines $(style) "$@" | $maybe_split
|