summary refs log tree commit diff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rwxr-xr-x.config/sxmo/userscripts/appstore.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/.config/sxmo/userscripts/appstore.sh b/.config/sxmo/userscripts/appstore.sh
index c66ca39..0743df4 100755
--- a/.config/sxmo/userscripts/appstore.sh
+++ b/.config/sxmo/userscripts/appstore.sh
@@ -28,11 +28,19 @@ exit"
 
 ## Functions
 
+bin2launch(){
+	xargs -I{} grep "^write_line_app {} " /usr/share/sxmo/default_hooks/*apps* |grep -o '"[^"]*"$' |xargs -I{} sh -c 'eval echo {}'
+}
+
 pkgInfo(){
 	pkg="$1"
 	case "$ID_LIKE" in
 		"alpine")
 			apk info -dws "$pkg" | grep -v '^$' | grep -v ' webpage:' | grep -v 'installed size:'
+			bins="$(apk info -L "$pkg" |grep ^usr/bin/ | cut -d/ -f3)"
+			if test -n "$bins"; then
+				echo "$bins" | bin2launch | sed 's/^/Launch /g'
+			fi
 			;;
 		"debian")
 			# apt has an unstable cli
@@ -169,6 +177,9 @@ exit"
 		"exit"|"")
 			exit
 			;;
+		"Launch "*)
+			${sel#???????}
+			;;
 		*"://"*)
 			sxmo_open.sh "$sel"
 			exit