-
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
Add Desktop option for Panel Module #52
Comments
I myself also use two monitors, however as of right now you can only configure panels on one screen. I believe this is a limitation on the kde plasma side, as the plasma-scripting API incredibly enough (at least as far as I have found out) doesn't support specifying screens of the panels, they just get assigned automatically. Hopefully such support is added in the future though, and I'll leave this issue open for discussions on solutions when this potentially happens (or if anyone can find a way to get it working as of the current release) |
Any news on this with plasma6? |
I think I managed to do something similar with my plasma 5 setup. In
For Plasma to know which screen has which screen number it seems to need another configuration in
I achieve this with the following
Sidenote: I had a weird behaviour on plasma wayland session, where despite my script the screen numbers were randomly overwritten in |
I will try tomorrow |
I couldn't get that to work. The keys are just overwritten all the time here as well. Could it be that they just appear on the primary screen? This does look promising if we can get it to work reliably (and preferably without needing to log in/out two times). Another clever potential solution could be that since the panels appears on the currently focused screen, to just shift focus to the screen we want the panel to be placed on when generating the panels. The only problem with that approach is that I haven't found a way to actually focus on a certain input, but that should probably be possible in some way. I am not aware of any new capabilities in kde plasma 6 which makes this easier though, but I could have missed something. |
Yeah, I figured under wayland I still have random |
Ok, but I need this for Wayland sadly. But thanks for your help |
I tested around with trying to move focus over to windows before creating panels as well, and while I did manage to create scripts for focusing different screens, it appears that the mouse must be on the screen for the panel to created on the monitor, and it does not look like moving the mouse to some screen is possible via the command-line on plasma wayland (it is probably possible on x11). Therefore I think we just will have to wait for kde to implement some kind of support for specifying monitor screen in plasma desktop-scripts. I might try to open an issue on some kde repo when I get time. This will probably take some time though as it would be in potentially some future release. |
Thank you for your effort. I will wait. |
For now I get the best results by bypassing plasma-manager's panel option and just linking my
The key for positioning the panel to a certain screen is still the |
While not an ideal solution this does open up for the possibility of implementing this using plasma-manager directly as well. We could write the screen for a panel by adding |
I'm just asking out of curiosity. Is there a specific reason for using Plasma Desktop Scripting to generate the panels? I still don't know much about how the internals of Plasma works, and maybe the problem is that Plasma expects the config files to be writable. But in my opinion (and I could be wrong), generating the config files directly would be much cleaner. |
Having them writable is not the problem as the files plasma-manager generates are actually writeable. I do believe though that simply writing this file is not particularly simple as you have to deal with all sorts of ids and stuff which update all the time and is probably a pain to deal with. Maybe if we could use any id we want this would be possible, but I believe this is not straightforward (I might need to test this). Plasma scripts provide a quite simple way of dealing with all this in a higher level interface, though it does have some major limitations as I have found out. |
I didn't run into any issues with hardcoded containment and applet (widget) ids so far.
As you can see, I even came up with my own numbering scheme, where |
Hmm, in that case we may have to test to see if this would be a better solution and if stuff works properly this way. That would potentially be both quicker and make us less dependent on plasma desktop scripting API which can be frustrating, though with that said it would need some testing as I can potentially see this adding some unexpected bugs with it (I would assume there is a reason why seemingly new ids are generated by plasma for these panels). Thanks for the input, I'll explore further when I have time :) |
Thank you very much for the effort! |
Anyting new on this? |
I'm gonna test some approaches and hopefully get something working next week. I haven't had much free time the last week to work on this project, but this is one of my biggest priorities when I do get time. |
Ive been trying to implement panels being written to rc files on my fork if its any help (https://github.com/cfitz25/plasma-manager). |
Seems fine for me, but I am not an nix expert. I am pretty overwhelm that you can run one command and get an qemu VM with nix installed in it... |
I have tried to implement this without using desktop-scripts and while I did get it to work (with some bugs still), I also get that some of the previous panels will reappear even when I delete them from |
I have come up with this solution in #96, and can confirm it works quite well, but obviously not completely ideal. I think for now it is good enough. Feel free to try this out and see if it is good enough for you (keep in mind it uses the new config-format from #94 though, which essentially means that you need to add .value at the end of all the keys in |
@magnouvean sorry for the late response. This PR works great, but one problem: error:
… while checking flake output 'nixosConfigurations'
at /nix/store/n8rl5zlqvbhzi7qq2zvklnc4wpiwlf53-source/flake.nix:9:5:
8| {
9| nixosConfigurations = {
| ^
10| Ni = lib.nixosSystem {
… while checking the NixOS configuration 'nixosConfigurations.Shi'
at /nix/store/n8rl5zlqvbhzi7qq2zvklnc4wpiwlf53-source/flake.nix:23:7:
22|
23| Shi = lib.nixosSystem {
| ^
24| specialArgs = {
(stack trace truncated; use '--show-trace' to show the full trace)
error: A definition for option `home-manager.users.sven.programs.plasma.configFile.khotkeysrc.Data.DataCount' is not of type `submodule'. Definition values:
- In `/nix/store/4lkyp212hpwxi2l68q376j54rxgnhcwj-source/modules/hotkeys.nix': This should be related to #94. The Panel parts works as perfectly as expected. 👍 |
Yeah I think it is just a problem with the fact that #96 wasn't up to date with |
Yes now its working fine |
Great! I will probably merge it tomorrow. Regarding writing manually to the file I still think it may be worth looking into if anyone is willing to experiment with this and think it is possible to get it working well (though I have a bit limited time with exactly this problem). For it to be viable though I would like such a solution to have as good support for the various options as the current plasma-scripts solution, as well as the fact that it should be able to work even if the user has existing panels. It also needs to be quite bug-free of course. If all this can be achieved I would welcome using this solution, but until this can potentially be achieved I reckon the solution in #96 is good enough, even if it is a little bit hacky. |
I have two Monitors and I want to add a second Pannel to the second Monitor. Is this possible?
The text was updated successfully, but these errors were encountered: