Registered Member
|
I'm running on Arch linux, using plasma v5.26.2.
I've built/coded a number of global themes for my users by coding up a layout template which is common to all, and for each theme a separate look-and-feel. My themes use an autostarted instance of latte-dock which, until one of the recent plasma updates, would remain in place through the change of themes. Now, when a theme is changed, not only is the latte-dock process killed, the ~/.config/autostart/org.kde.latte-dock.desktop entry is deleted. I've been able to force the restart after a logout/login by using either 1) /etc/xdg/autostart; or 2) adding some shell scripted logic to .xinitrc that checks the look-and-feel name for my signature, then checks if an org.kde.latte-dock.desktop entry exists in ~/.config/autostart, creating one if one should be there. I consider these to be heavy-handed solutions, especially given that this requires the user to logout and login to restore the dock. What I'd like to do is to handle this via the look-and-feel org.kde.plasma.desktop-layout.js file or via the layout-template's layout.js file. However, there doesn;t appear to be any way to create a symlink or copy a file from the javascript used in these 2 files. What I'd like to know is whether or not there is some way I have yet to find or figure out to perform file operations from these scripts, or if there's some entry that can be created in a config file to make sure that the dock is autostarted after a change in theme. Or is there a way to do this using the metadata.desktop file? Using the defaults file? Changing one of the qml source files? I'm at a loss at this point. |
Registered Member
|
Just crickets... OK.
I took a dive into plasma-workspace and found that in lookandfeelmanager, the constructor automatically sets m_applyLatteLayout if latte-dock is already running - I believe that this is a bug that needs to be investigated. If m_applyLatteLayout is set (which it will be if latte is already running), then at some point setLatteLayout is called which looks for the file 'looknfeel.layout.latte' in your look-and-feel's layouts directory. This is undocumented and is very useful information, especially given the unconditional setting of m_applyLatteLayout which leads directly to setLatteLayout. If this file is not found, the lookandfeelmanager kiils the current latte-dock process without respawn, and, importantly, without autostart. This logic flow is flawed and needs to be looked into. |
Registered Member
|
Found a very useful easter egg - if a zero-sized 'looknfeel.layout.latte' file is found in the look-and-feel theme's layouts directory, latte-dock will be started, enabling autostart, and it will toss away the zero-sized layout passed to it and use the layout from the users' .config directory, where the correct and current dock layout is stored. thus the issue is resolved and should be documented. Simply adding a zero-sized 'looknfeel.layout.latte' file - 'touch looknfeel.layout.latte' - to one's l&f theme's layouts directory, ensures that only themes including latte will set up starting latte, choosing any other theme(s) without the dock will shut it down. and only a zero-sized 'looknfeel.layout.latte' file in the theme's layouts directory is needed to make it work properly.
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell