plasma-manager icon indicating copy to clipboard operation
plasma-manager copied to clipboard

Question: Can I enable numlock and can I switch the desktop mode?

Open Svenum opened this issue 1 year ago • 10 comments
trafficstars

  1. I would like to change the default behave from the numlock with this flake, so that it gets reactivated on every login, is this possible? Setting in GUI: Open Plasma Settings -> Keyboard -> Keyboard -> Hardware -> NumLock on Plasma Startup -> Turn on

  2. I would like to be able to change the desktop mode from "Folder View" to "Desktop" with this module, is this possible? Setting in GUI: Right Click on Desktop -> Configure Desktop and Wallpaper -> Layout -> Select "Desktop" in Dropdown Menu

Svenum avatar Apr 07 '24 07:04 Svenum

Does setting programs.plasma.configFile.kcminputrc.Keyboard.NumLock.value = 0; fix this maybe?

magnouvean avatar Apr 07 '24 09:04 magnouvean

This seems to work, thanks. Do you have an solution to the second question?

Svenum avatar Apr 07 '24 19:04 Svenum

There it is harder. The relevant key seems to be the plugin key for each of the containments in plasma-org.kde.plasma.desktop-appletsrc, where the value is set to org.kde.plasma.folder for folderview and org.kde.plasma.desktopcontainment for desktop view. This probably will need a higher level interface and some plasma desktop scripting, so it isn't supported a.t.m..

magnouvean avatar Apr 07 '24 19:04 magnouvean

Could that be done by the panels? This is the type of scripting you mean? Right?

Svenum avatar Apr 08 '24 05:04 Svenum

Yeah the same type of desktop scripting. Panels is one of the uses for it, but there are some more uses as well. I think desktop scripting is our best shot for getting this functionality.

magnouvean avatar Apr 08 '24 06:04 magnouvean

Just tried the desktop mode thing with plasma script, and while it succeeds in writing the correct config to the file it doesn't get applied immediately, and hence probably would need a log out/in again, which doesn't work when we are running the script in the autostart. I'm afraid this doesn't have any elegant solution for now.

magnouvean avatar Apr 22 '24 16:04 magnouvean

Hi, is there is still no fix for the desktop view? I'd love even something hacky, its the one thing missing from my original plasma config currently. If not, is there some reference for how plasma config works, so one could try to contribute?

rachelambda avatar Jun 25 '24 09:06 rachelambda

The appropriate file this is configured in is ~/.config/plasma-org.kde.plasma.desktop-appletsrc. The only good interface to modify that we have found is through plasma desktop scripts, but for some reason after running the script required to configure this, the configuration isn't applied until plasma has been restarted (or some component of plasma at the very least). I can test again on plasma 6.1 if it has changed, though I kinda doubt it tbh. After #222 maybe we could implement a hacky solution though by restarting plasma-desktop after running the script. I can test this soon. If this doesn't work either I'm afraid we are out of luck until some changes are made on kde's side.

magnouvean avatar Jun 25 '24 12:06 magnouvean

OK so I did try this, but unfortunately to no luck. What I have found out is that it appears that the desktop containment doesn't just have it's plugin key altered, but it appears that kde generates a completely new desktop-containment.

I don't really have that much time available for plasma-manager in the near future for personal reasons, so I'm not sure I'll figure this out. It's possible that a solution does exist though. If you (or anyone for that matter) want to experiment with this I would suggest trying to find some plasma-script code which changes the layout of a desktop to desktop-mode (you can run plasma-scripts in plasma-interactiveconsole). It's fine if the script only is successful after running systemctl --user restart plasma-plasmashell (or any other systemd service for that matter). What I have tried to no success is simply:

for (var desktop of desktops()) {
  desktop.writeConfig("plugin", "org.kde.desktopcontainment")
}

magnouvean avatar Jun 25 '24 15:06 magnouvean

thanks for trying! I will play around with this a bit in the days to come

rachelambda avatar Jun 25 '24 15:06 rachelambda