Skip to content

Instantly share code, notes, and snippets.

@rubenhorn
Created October 7, 2022 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubenhorn/5ec73d3f782b3e54be613604928990fd to your computer and use it in GitHub Desktop.
Save rubenhorn/5ec73d3f782b3e54be613604928990fd to your computer and use it in GitHub Desktop.
A simple, fuzzy flatpak launcher
#! /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