Skip to main content

cosmic-flatpak-fixer

Restore COSMIC applet metadata that Flatpak strips from exported .desktop files.

The problem

Flatpak 1.18.4+ filters the keys of .desktop files it exports, using an allowlist. Keys such as X-CosmicApplet, X-OverflowPriority or X-HostWaylandDisplay are dropped, so the COSMIC panel no longer recognises Flatpak-installed applets as applets.

cosmic-flatpak-fixer finds installed Flatpak applications that declare X-CosmicApplet=true and patches their exported .desktop file in place (replacing the export symlink with a real file) so the COSMIC keys survive. Patched files carry a # Managed by fix-cosmic-applet-desktops marker, which records the original symlink so clean can restore it.

Do not put these files in ~/.local/share/applications. COSMIC then treats the applet as a normal running app window.

Install

uv tool install cosmic-flatpak-fixer
# or
pipx install cosmic-flatpak-fixer

Usage

cosmic-flatpak-fixer fix --dry-run   # show what would be patched
cosmic-flatpak-fixer fix             # patch exports of installed COSMIC applets
cosmic-flatpak-fixer clean --dry-run # show what would be restored
cosmic-flatpak-fixer clean           # restore exports of applets that were uninstalled
cosmic-flatpak-fixer --version
  • fix patches the export for every installed Flatpak whose desktop file has X-CosmicApplet=true. It also removes legacy overlays previously written to ~/.local/share/applications. Run it again after Flatpak updates.
  • clean restores Flatpak's original symlink for managed exports whose applet is no longer installed, and removes any leftover legacy overlays.

Both commands search the user ($XDG_DATA_HOME/flatpak, ~/.local/share/flatpak) and system (/var/lib/flatpak) installations. Re-open the panel settings (or log out and in) if applets still look wrong afterwards.

Replacing the old shell script

This package replaces fix-cosmic-applet-desktops. The marker format is unchanged, so files patched by the script are picked up without migration. Remove the old script from ~/.local/bin once the package is installed.

Development

uv sync
just check        # ruff + pytest
just build        # check, then build sdist and wheel into dist/

Releasing

just bump-version minor   # or: just set-version 1.0.0
git commit -am "chore: release $(uv version --short)"
git tag "v$(uv version --short)"
just publish              # uv publish; token via UV_PUBLISH_TOKEN or keyring

Set UV_PUBLISH_URL=https://test.pypi.org/legacy/ to try TestPyPI first.

License

MIT

Metadata

Release files for cosmic-flatpak-fixer 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cosmic-flatpak-fixer 0.1.0
File Size Uploaded Provenance Actions
cosmic_flatpak_fixer-0.1.0.tar.gz 8.2 kB Without provenance Details for cosmic_flatpak_fixer-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cosmic-flatpak-fixer 0.1.0
File Interpreter ABI Platform Actions
cosmic_flatpak_fixer-0.1.0-py3-none-any.whl Python 3 none any Details for cosmic_flatpak_fixer-0.1.0-py3-none-any.whl

Total release size: 19.4 kB

Release files / cosmic_flatpak_fixer-0.1.0.tar.gz

Download URL cosmic_flatpak_fixer-0.1.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
68a263112c4ec74907efeed1260750ee4cee3cf51d68ea7ab7845fba3b4594dd
BLAKE2b-256 checksum
How to use checksums
94f58761fbff1123a59c87c2286f8d30fd1b22648c019d8771d37694078c06ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.0

Release files / cosmic_flatpak_fixer-0.1.0-py3-none-any.whl

Download URL cosmic_flatpak_fixer-0.1.0-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
328f28e1e21a269490e5c853d3d57653f8d7cd1d3832264a04a76c862a417ae0
BLAKE2b-256 checksum
How to use checksums
95ec8b96cc9329fe24fbc7a0eec16370e6beb6e8b41744b4df90b3edaf4c2503
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.0

Security for cosmic-flatpak-fixer 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page