-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The panels
option causes the file .config/plasma-org.kde.plasma.desktop-appletsrc
to grow indefinitely
#76
Comments
I have noticed after a while it made the taskbar hang for a few seconds when plugging in a monitor, but apart from that it doesn't seem to cause any issues. That said that's on a 7840U with a pretty decent SSD, and I see this being a problem on old/low power devices. We might want to add a warning about this on the readme |
One problem that is caused by this issue, is how keyboard shortcuts for panel applets normally work on plasma. But if you now delete all you pannels, and regenerete new ones via |
Might look into this but I need to finish the konsole module first |
How would a possible fix look like? Add a script to I'm still a bit concerned about the old entries. If you would want to remove the old entries from both files, you would need to know which widget ids are no longer valid. Also I'm wondering what's the maximum number plasma does generate for these ids, and if it does search for a unused number, as soon as a certain limit is reached. I think this wouldn't be something to worry about too much for a KDE dev, because how many panels will a user possibly create in his entire life? But again, with |
We could save the IDs when we generate the panels so that we can clean up old entries.
Unless you have |
Ah okay, thank you for clarification! I was under the impression the script will run on every startup. |
Hmm... |
I've now tested it. |
so, regarding the keyboard shortcut I've came up with this little plasma script:
But it won't work, because I would need to delete the old entry in So, I guess it would be nice to have the old widget ids available in I still have the issue of the script running on every startup. I will try to figure this out later. |
I've now looked a little bit deeper into the "script runs on every startup" issue. So, I assume that the timestamp I'm using home-manager as a nixos module, so I can build the whole system config including the home-manager config with a single |
I'm running home manager as a NixOS module too, and afaik I didn't have that happen ¯\_(ツ)_/¯ @FF-AntiK do you not have any |
The |
I cannot tell for sure, because the original file in the nix store has no timestamp (1. Jan 1970). |
It doesn't compare the timestamp against Here's the script that applies theme settings: #!/bin/sh
last_update=$(stat -c %Y "$0")
last_update_file=/home/toast/.local/share/plasma-manager/last_run_themes
stored_last_update=0
if [ -f "$last_update_file" ]; then
stored_last_update=$(cat "$last_update_file")
fi
if [ $last_update -gt $stored_last_update ]; then
success=1
plasma-apply-lookandfeel -a Catppuccin-Mocha-Mauve || success=0
plasma-apply-desktoptheme default || success=0
plasma-apply-cursortheme Breeze_Snow || success=0
plasma-apply-colorscheme CatppuccinMochaMauve || success=0
/nix/store/9lfr9sqjnifnc51i1w3n6yxhkrlgxs28-plasma-workspace-5.27.10/libexec/plasma-changeicons breeze-dark || success=0
[ $success = 1 ] && echo "$last_update" > "$last_update_file"
fi |
Looking at the code, it does compare it to the timestamp of |
🤨 |
@magnouvean any ideas on what could be happening here? |
I have noticed this too. I think the problem may have to do with how symlinks work with nix, and that they may get symlinked again after reboot. I think I though they worked differently when I wrote this, and didn't consider time-changes between reboots. On my machine at least it runs every time I reboot, but not when I log out and re-log back in. What I think we could do is to instead of checking the timing of the file, to just check the sha256-sum or something, and compare that instead. As far as solving this I think we can just delete this file before generating the plasma-layout. I can't see anything wrong with that tbh as that is what I actually thought was happening, and the file is not needed when all the panels are deleted anyway. |
B.t.w. @FF-AntiK a much cleaner and simpler way of doing what you have done above would be something like:
See how you can specify what is written with writeConfig directly for each of the widgets via the config-option. I do see that this is not well documented at all. We really should work some more on documentation once we have gotten some more functionality in place as it is lagging quite behind I see. What is causing the problem might not be that there is a duplicated kglobalshortcuts entry or something, but one problem could be that writeConfig in general writes to |
Deleting But also deleting the file wouldn't solve the problem of incrementing widget ids. @magnouvean thanks for the example. This is helpful for all the widgets directly in the panel. But it won't help for widgets inside the system-tray like plasma-pass. Also it won't help with the Regarding the sections in |
Ah alright, that's a good sign I guess. I would think the panels-option would revert all the panels already though seeing as it will delete all the panels and re-generate them on each startup. I see you are probably correct though with deleting the file wont solve much as I use |
Yeah, I think it is an odd decision of the KDE devs to not automatically clean up I cannot speak for your |
So far I'd vote for comparing checksums insted of timestamp, regarding the Regarding the incrementing widget ids, I could live with that. But I still would need a solution for my special case with keyboard shortcuts for widgets inside the systray. I still think it's a little bit odd that I have to define the shortcut both in |
@magnouvean I've just checked the |
I appears you are correct, nice spot. For some reason I always thought it was there. It definitely should be there though. I think that list was just gathered from the list of files tracked by |
Since I enabled The |
It seems like default shortcuts will be overwritten automatically when using some of the default key-sequences for other tasks. So all my issues are fixed now! :-) |
Overrideconfig will essentially set all the settings not explicitly set in your nix config to the default ones, but the ones you set in your nix config should not be overridden. If you want to unset some of the settings (which is often needed when there are colliding keybindings for example) you may want to explicitly disable them in your config. In some cases adding "[$i]" at the end of your key can help settings not being overridden. |
We can keep it open as it is still a problem when not using overrideConfig, and probably needs some minor tweaks |
I've explicitly tested without "unsetting" colliding shortcuts. I don't know for sure, but I assume my config will apply first and the defaults will be added later, so they loose when there are colligind key-sequences. I may be wrong though. |
I think it is a bit unpredictable. In my experience it is needed in some cases (I need them for "Meta+1", "Meta+2", ... as far as I am aware), but other times it is fine. Nice that things have worked out! |
As per #78 autostart scripts now use |
The
panels
option creates new panels on every login (and removes the old ones beforehand).All the widgets inside the new panels will then be registered in
plasma-org.kde.plasma.desktop-appletsrc
.Unfortunately KDE Plasma doesn't cleanup the old entries, so the file will grow indefinitely.
I don't know if it would be safe to delete that file every time.
KDE Plasma seems to automatically regenerate the file, but maybe there are some side-effects on the containment / widget numbering.
The text was updated successfully, but these errors were encountered: