menu

flatpak in CLI


If you're not a command line person, thanks for readin - have fun :)

Else this script turns your flatpaks into short commands. Instead of typing those dumb triplets and hoo haw.

script

It's in php. Not gonna explain installin php - sorry. But it's easily done manually. Lemme explain...

It just goes through all your flatpak .desktop files and pulls out exec= so run this:
 grep -i --no-filename 'exec='
      /var/lib/flatpak/exports/share/applications/*.desktop

There's all your flatpak commands right there!

All ya do is make a tiny lil bash script with a proper name to kick it. For example this line of grep output:
 Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64
    --command=/app/bin/chrome --file-forwarding com.google.Chrome @@u %U @@
 
goes into a script named chrome with the Exec= chopped off.

That should probably be built into flatpak, don't ya think ?? Not too hard, guyz...

Now you can just go:
chrome
baobab
ned file.txt
pcheetah a.song
etc


► next     ◤ home