use long arguments

This commit is contained in:
speedie 2023-03-28 03:10:09 +02:00
parent 7e7d5481b7
commit 8d08f98791
5 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@
[ -z "$prefix" ] && prefix="/tmp/.list_songs"
[ -z "$RUNLAUNCHER" ] && RUNLAUNCHER="spmenu"
[ -z "$RUNLAUNCHER_ARGS" ] && RUNLAUNCHER_ARGS="-l 40 -g 1 -is 200 -ngc"
[ -z "$RUNLAUNCHER_ARGS" ] && RUNLAUNCHER_ARGS="--lines 40 --columns 1 --image-size 200 --no-generate-cache"
create_list() {
[ -z "$i" ] && i=1

View file

@ -3,7 +3,7 @@ c="$(find *.pdf -type f | wc -l)"
i=1
[ -z "$prefix" ] && prefix="/tmp/.list_pdfs"; mkdir -p ${prefix}
[ -z "$RUNLAUNCHER" ] && RUNLAUNCHER="spmenu"
[ -z "$RUNLAUNCHER_ARGS" ] && RUNLAUNCHER_ARGS="-l 40 -g 1 -is 400 -ngc"
[ -z "$RUNLAUNCHER_ARGS" ] && RUNLAUNCHER_ARGS="--lines 40 --columns 1 --image-size 400 --no-generate-cache"
print_list() {
while true; do

View file

@ -15,4 +15,4 @@ ${bg_blue} ${bg_yellow} ${bg_blue}\n\
${bg_blue} ${bg_yellow} ${bg_blue}\n\
\n\
${reset}${fg_blue}c${fg_yellow}o${fg_blue}o${fg_yellow}l\n\
" | spmenu -sgr4 "$color1" -sgr5 "$color3" -sgr12 "$color1" -sgr13 "$color3" -na -l 40 -g 7 "$@"
" | spmenu --sgr4 "$color1" --sgr5 "$color3" --sgr12 "$color1" --sgr13 "$color3" --no-alpha --lines 40 --columns 7 "$@"

View file

@ -8,7 +8,7 @@ path() { echo "$PATH" | tr ':' '\n' | uniq | sed 's#$#/#' | xargs ls -lu --time-
# run spmenu and parse it
parse() {
dout="$(path | sed "s/\&/\&/g" | spmenu -im -H "$HISTORY" "$@")"
dout="$(path | sed "s/\&/\&/g" | spmenu --insert --hist-file "$HISTORY" "$@")"
# parse
[ "$(printf '%c' "$dout")" = "#" ] && RUN_ARG="$TERMINAL"

View file

@ -46,7 +46,7 @@ command -v maim > /dev/null && maim -uB > /tmp/image.png
IMAGE="/tmp/image.png"
main() {
[ -e "$IMAGE" ] && IMAGEARG="-is 500" && IMAGEPREFIX="IMG:" || IMAGE=""
[ -e "$IMAGE" ] && IMAGEARG="--image-size 500" && IMAGEPREFIX="IMG:" || IMAGE=""
printf "$IMAGEPREFIX$IMAGE\t\
${v1}\
@ -107,7 +107,7 @@ ${v1}q${v2}w${v3}e${v4}r${v5}t${v6}y${v7}u${v8}i${v9}o${v10}p${v11}[${v12}]${v13
\n\
Arguments will be passed to spmenu.\n\
Report any issues at the Codeberg repo.\n\
" | spmenu -na -l 40 $IMAGEARG "$@" -g 1 -p "<big>spmenu <i>test</i> <small>script</small></big>"
" | spmenu --no-alpha --lines 40 $IMAGEARG "$@" --columns 1 --prompt "<big>spmenu <i>test</i> <small>script</small></big>"
}
main "$@"