Skip to content

Conversation

@porkloin
Copy link
Contributor

@porkloin porkloin commented Jan 1, 2026

👋

I'm using DMS on zirconium which is a universal blue/bootc project, so many pieces of software are installed via flatpak rather than via package manager.

I noticed that matugen tries to determine whether or not to generate theme files for supported applications based on some shell execs in the utils dir. I'm hoping to contribute some work in a follow-on PR that allows the configuration in core/internal/matugen/matugen.go to take flatpak package IDs, for example something like:

appendConfig(opts, cfgFile, []string{"zen", "zen-browser", "app.zen_browser.zen"}, "zenbrowser.toml")

The semantics of how to implement that can be hashed out later, but this PR contributes some simple utils that would be needed to have matugen interact with flatpaks more broadly. The utils aren't rigged up or called from any other part of the codebase currently, but it provides the following util funcs for getting flatpak info:

  • FlatpakInPath - determines if the user even has flatpak installed, that way we can fail fast if not
  • FlatpakExists - for a given fully-qualified flatpak id (foo.bar.myapp) returns whether or not the package is installed on host system
  • FlatpakSearchBySubstring - for a conventional app name ("calculator") returns whether or not a package with a matching name exists on host system (org.calc.calculator)
  • FlatpakInstallationDir - gets the home sandbox dir for a sandbox. Probably helpful if future matugen work wants/needs to stuff configs directly into the sandbox dir of the flatpak

I have also added some steps to the go-ci.yml file for installing flatpak onto the runner so that my tests can run in the CI environment. Long term it would probably be best to just pick a runner that has flatpak pre-installed, or bake an image that adds flatpak onto ubuntu-latest to prevent needing to do all that network shit on every PR commit 🙃

I wanted to just propose this smaller PR initially that stubs out the core set of interactions with flatpak, but I'm happy to also chat here more about ideas or concerns about integrating flatpak support into matugen.

Let me know what you folks think - I'm happy to adapt or adjust this if needed. Thanks for all the amazing work on DMS!

ci: run apt as sudo

ci: fix flatpak remote in runner

ci: flatpak install steps in runner

ci: specific version of freedesktop

ci: freedesktop install perms
@porkloin
Copy link
Contributor Author

porkloin commented Jan 2, 2026

Reworked a couple missing sudos in the GHA workflow, but it's running successfully and passing on my fork 👍

@bbedward
Copy link
Collaborator

bbedward commented Jan 2, 2026

This is good, but what's the next step for flatpak theme support?

@bbedward bbedward merged commit 1c7d15d into AvengeMedia:master Jan 2, 2026
2 checks passed
ewtodd pushed a commit to ewtodd/DankMaterialShell that referenced this pull request Jan 2, 2026
ci: run apt as sudo

ci: fix flatpak remote in runner

ci: flatpak install steps in runner

ci: specific version of freedesktop

ci: freedesktop install perms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants