diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-24 21:11:27 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-24 21:11:27 +0200 |
commit | 8b9e93321bfd229b8a29fdd1fc60de670e16636d (patch) | |
tree | 60963be78e9bca76d996be3de468fc4e03deb137 /bin/menuscripts/mdsktp | |
parent | 067b271a243dafcf652fe7cfe85e723d25ff1a64 (diff) |
[menuscripts] use 'commander' in menuscripts
Diffstat (limited to 'bin/menuscripts/mdsktp')
-rwxr-xr-x | bin/menuscripts/mdsktp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/bin/menuscripts/mdsktp b/bin/menuscripts/mdsktp index a48aca6..f07fb7b 100755 --- a/bin/menuscripts/mdsktp +++ b/bin/menuscripts/mdsktp @@ -1,21 +1,8 @@ #!/bin/sh # Searches through .desktop files and prompt to launch them via dmenu -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 | - $menucmd)" -test -z "$choice" && exit 1 +choice="$(find ~/.local/share/applications -maxdepth 1 -type f -not -iname "wine-extension*" | + awk '/\/[^.\/]+\.desktop/ {print $(NF-1)}' | + commander -s -d -x -c)" +[ "$choice" ] || exit 1 gtk-launch "$choice" |