summaryrefslogtreecommitdiff
path: root/bin/menuscripts/mapimg
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-04-17 18:55:38 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-04-17 19:02:28 +0200
commite1254e11ae320848c2fc6ce329a33db107083b9f (patch)
tree49c6257d03d02a31ac78717cfede876ff9fa9dff /bin/menuscripts/mapimg
parentca569f466565dc9d435aa6fd96c1905a12c40216 (diff)
moved menuscripts to seperate folder
Diffstat (limited to 'bin/menuscripts/mapimg')
-rwxr-xr-xbin/menuscripts/mapimg17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/menuscripts/mapimg b/bin/menuscripts/mapimg
new file mode 100755
index 0000000..151b8d0
--- /dev/null
+++ b/bin/menuscripts/mapimg
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+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}"*