Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save teklynk/8ee65386bf3d48ce0bbb3f00ff5ebdf5 to your computer and use it in GitHub Desktop.

Select an option

Save teklynk/8ee65386bf3d48ce0bbb3f00ff5ebdf5 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Name of the Flatpak application
FLATPAK_APP="com.plexamp.Plexamp"
# Check if the app is currently running
if flatpak ps --columns=application | grep -q "^${FLATPAK_APP}$"; then
# If it's running then kill it
flatpak kill "$FLATPAK_APP"
else
# If it's Not running then start it
flatpak run "$FLATPAK_APP"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment