diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-16 21:54:54 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-16 21:54:54 +0200 |
commit | 102e7d997a40a7215b10686ce2b0d006d5a97c2e (patch) | |
tree | 86449e1b494d7c209563f6870a5c7493528434aa /bin/guiscripts/dmapimg | |
parent | a58ae56e98a8d9fcbe7fc7beaa976a4d164ee99a (diff) | |
parent | 0403da37e183e41d3b949b473038806059130815 (diff) |
Merge branch 'main' of db:dotfiles
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}"* |