Skip to content
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

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

Open
Svenum opened this issue Apr 7, 2024 · 10 comments
Open

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

Svenum opened this issue Apr 7, 2024 · 10 comments

Comments

@Svenum
Copy link

Svenum commented Apr 7, 2024

  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

@magnouvean
Copy link
Collaborator

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

@Svenum
Copy link
Author

Svenum commented Apr 7, 2024

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

@magnouvean
Copy link
Collaborator

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..

@Svenum
Copy link
Author

Svenum commented Apr 8, 2024

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

@magnouvean
Copy link
Collaborator

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
Copy link
Collaborator

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.

@rachelambda
Copy link

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?

@magnouvean
Copy link
Collaborator

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
Copy link
Collaborator

magnouvean commented Jun 25, 2024

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")
}

@rachelambda
Copy link

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

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

No branches or pull requests

3 participants