-
-
Save rubenhorn/5ec73d3f782b3e54be613604928990fd to your computer and use it in GitHub Desktop.
A simple, fuzzy flatpak launcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# A simple, fuzzy flatpak launcher | |
if [ -z "$(which flatpak 2>/dev/null)" ] | |
then | |
echo "Flatpak not installed!" | |
exit 1 | |
fi | |
if [ $# -ne 1 ] | |
then | |
echo "Usage: $(basename $0) <flatpak app>" | |
exit 1 | |
fi | |
for app in $(flatpak list | awk -F "\t" '{print $2}') | |
do | |
if [ ! -z $(echo $app | grep -iF "$1") ] | |
then | |
exec flatpak run $app | |
fi | |
done | |
echo "No such app!" | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment