Repository navigation
feat: declarative kickoff favorites - #694
Open
itzTheMeow wants to merge 1 commit into
Open
itzTheMeow wants to merge 1 commit into
itzTheMeow wants to merge 1 commit into
Conversation
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


supersedes #642 - uses some of that methodology
closes #539
related: #376
This is my attempt at declarative kickoff favorites.
This is a program-wide module rather than a panel-specific override since it is difficult to determine the actual applet ID of each kickoff widget, so setting favorites will change all kickoff widget favorites and ordering to match.
Favorites are stored in the kactivitymanagerd database and its pretty trivial to edit them. This module adds 2 scripts.
The pre-boot script runs before plasmashell and kactivitymanagerd start, so it can modify the sqlite database to add/remove the pinned favorites.
It also edits the statsrc file with the correct ordering.
The applet ID for statsrc is parsed from the appletsrc file, meaning that file will have to exist at boot for the ordering to apply properly.
(i ran into this issue due to my impermanence setup, and had to persist the appletsrc file which led to #693)
This also means that on an edge case where someone drastically changes their panel configuration such that the kickoff widget IDs change, on the first login the ordering will not apply since the new panel won't be written to appletsrc until after the reconciliation. It seems kickoff defaults to a lexicographical ordering of the favorites in this case. Favorite ordering will correctly re-apply on next login.
There is a second fallback script that uses dbus to add/remove favorites, this is only ran if it is found that the database is out of sync. Really the only time this would happen is on a fresh install where the database does not exist yet when the initial reconciliation runs. The side-effect of this is that it requires plasmashell to be restarted to take effect.
I was running this dbus script on my machine for a couple of months before redoing this.
The wording in the module description is taken from the original #238 PR.
Tested this on my NixOS 26.05 machine with Plasma 6.6.6 and a full favorites menu.
Some of the planning and development was assisted by OpenCode (GLM 5.3 Flash)