diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-16 21:25:03 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-16 21:25:03 +0200 |
commit | 26507f3d1c9223778b4881f4ea62c6453c80fab3 (patch) | |
tree | 10cac9659da198c882865d592251b858d775cc7c /bin/guiscripts/dmapimg | |
parent | 583d6a1d20f213b84589e4ce6198ca1109dfe2af (diff) |
made scripts MENUCMD sensitive
Diffstat (limited to 'bin/guiscripts/dmapimg')
-rwxr-xr-x | bin/guiscripts/dmapimg | 22 |
1 files changed, 16 insertions, 6 deletions
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}"* |