From 26507f3d1c9223778b4881f4ea62c6453c80fab3 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 16 Apr 2023 21:25:03 +0200 Subject: made scripts MENUCMD sensitive --- bin/guiscripts/dmapimg | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'bin/guiscripts/dmapimg') diff --git a/bin/guiscripts/dmapimg b/bin/guiscripts/dmapimg index 3677ed3..151b8d0 100755 --- a/bin/guiscripts/dmapimg +++ b/bin/guiscripts/dmapimg @@ -1,7 +1,17 @@ #!/bin/sh -dest="$XDG_DATA_HOME"/appimages/ -appimage="$(\ - find "$dest" -type f -printf "%f\n" \ - | sed 's/\.[Aa]pp[Ii]mage$//g' \ - | dmenu -x -l 10 -g 1 -p "AppImage:")" -setsid "${dest}/${appimage:-NOSEL}"* + +if [ -z "$MENUCMD" ] +then + menucmd="fzf" +elif [ "$MENUCMD" = "tofi" ] +then + menucmd='tofi --width 700 --height 300 --prompt-text Appimage:' +else + menucmd="dmenu -x -l 10 -g 1 -p Appimage:" +fi + +dest="$XDG_DATA_HOME"/appimages +appimage="$(find "$dest" -type f -printf "%f\n" | + sed 's/\.[Aa]pp[Ii]mage$//g' | + $menucmd)" +setsid "$dest/${appimage:-NOSEL}"* -- cgit v1.2.3