From 2758227472054a0976d8dc0888da9aff83031eec Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 20 Apr 2023 21:34:59 +0200 Subject: made dmdsktp MENUCMD sensible --- bin/guiscripts/dmdsktp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'bin/guiscripts') diff --git a/bin/guiscripts/dmdsktp b/bin/guiscripts/dmdsktp index 3711f13..a48aca6 100755 --- a/bin/guiscripts/dmdsktp +++ b/bin/guiscripts/dmdsktp @@ -1,9 +1,21 @@ #!/bin/sh # Searches through .desktop files and prompt to launch them via dmenu -gtk-launch "$(find ~/.local/share/applications \ +if [ "$MENUCMD" = "tofi" ] +then + menucmd="tofi" +elif [ "$MENUCMD" = "dmenu" ] +then + menucmd="dmenu -g 1 -i" +else + menucmd="fzf" +fi + +choice="$(find ~/.local/share/applications \ -maxdepth 1 \ -type f \ -not -iname "wine-extension*" -a -iname "*.desktop" \ -printf "%f\n" | cut -d. -f1 | - dmenu -i -p "app:" -g 1)" + $menucmd)" +test -z "$choice" && exit 1 +gtk-launch "$choice" -- cgit v1.2.3