-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
KDE5 decoration plugin #1784
Comments
As discussed on the list, here is a diff to the current kwin master (git://anongit.kde.org/kwin) that displays the VM title as a suffix on every window, regardless of the current decoration style. |
And here is a program to demonstrate the palette setting option. compile with
If we were to install schemes with label suffixes then xside.c could set this property to point to the files and no further KWin changes would be required! |
The following is a minimal color profile that will be applied by KWin:
According to the KDE color scheme docs at https://docs.kde.org/trunk5/en/kde-workspace/kcontrol/colors/index.html (look for 'Window Manager Colors'), its up to the theme whether they use the window manager colors from the Experimentation shows that Breeze uses You can try the above with the propset test program and see that the colors are correct under Oxygen and Breeze. Given this I'm going to hack up a patch to xside.c to set this value. |
And here is a commit making gui-daemon set the palette file for KWin. |
Finally, here is a quick script to generate sample palette files for all VMs. Placed in /usr/share/qubes/color-schemes with the patch above applied they should provide window colors under both oxygen and breeze. |
There is a standard utility |
Fixed gui-daemon range checking, updated commit is here. I didn't realise xprop let you set properties too, doh. |
Can you post some screenshots how it looks? With custom color palette and VM name as remote machine name, different themes etc. |
I've tried this on Fedora 23 Live. But I've failed to get VM name in the window title. |
The VM name will only show in the window with the kwin patch linked above applied, then _QUBES_VMNAME set via xprop. WM_CLIENT_MACHINE won't work and if it did we couldn't use it anyway I think. We have to keep all existing methods/markers of truly remote windows intact. Setting the VM name using that patch works with all windows decorations though, and its a very small patch to carry compared to the current plugin. I will attempt to get some screenshots up shortly. |
See http://postimg.org/image/vu4vxue49/ and http://postimg.org/image/n1sinwid5/ - these show a patched kwin5 + breeze with VM name and colors set manually using xprop. Note that 1) the colors aren't correct (either by rgb value or label-to-color mapping) since this is just a mock up and 2) the kwin patch doesn't format the VM name in any way so I manually set it to ' [vmname]'. However you can see that the active/inactive colors change when windows are selected which is nice I think. |
Yes, it is small, but still it requires carrying own kwin package - tracking upstream version etc. Compared to the plugin which worked almost untouched across multiple KDE and Fedora versions. But if there is no other way... Or maybe there is: if no formatting is applied to the VM name anyway, maybe gui-daemon can simply prefix window title with "[VMNAME]"? That should be some configuration/command line option to easily switch this feature on different window managers, or when someone will implement better support for KDE.
Yes :) Apparently only title bar is changed, not the rest of the window borders, which looks a little weird, but not a problem. |
If this covers all the ways in which apps can set their title then it seems like a good idea as an initial implementation.
Yeah, that looks like a kwin bug TBH and I'm pretty sure upstream will accept a patch for it. Until its fixed upstream, picking a smaller difference in active/inactive colors than my test color files would look better. |
Yes, this is the only way how VM can set a window title visible in title bar (where currently it is prefixed with VM name by window manager). There are some cases where window don't have title bar at all (for example tray icons), but there is no place for VM name either. |
Great, would you like me to code this up for the gui-daemon with a command line option to enable it? |
Yes :) Best Regards, |
I've added untested/uncompiled support for this to this branch. Compiling and testing is proving difficult due to qubes-builder breakage which I'll raise on qubes-devel. My worry currently is what happens if a program fetches its own window title and then appends something to it, will it end up with the VM name prefix twice? |
I've raised a KDE Bug for the window frame color issue, lets see what upstream have to say about it. |
OK, I've built and trivially tested the branch and it seems to work as far as the title goes. Regarding your comments on naming the color files after the VM I don't think its a good idea, I think they should be named after the levels. I suspect if we want to support multiple VM decorations that we will end up with a set per decoration, e.g. red-breeze, red-oxygen etc (because each decoration uses different and incompatible color elements from the file). |
Isn't it possible to have them in the same file? I think your generator does exactly that, no? Anyway, if not, we can have Additionally (not sure about that), it may be possible then to switch border colors on the fly, without restarting VM. Depends on KDE - if/when color profile is reloaded. Pretty minor feature, but if we'd got it for free, why not? Anyway, thanks for the patches! I'll try get back to fc22 based dom0 somehow later this week (need to find which disk it was...). After final R3.1 release, which is building just now :) |
If you read the response to the KDE bug, the upstream view seems to be that its up to each window decoration to use whatever colors they feel like in actually drawing the window. For breeze we can make the colors look good by setting the border (Colors:Window:BackgroundNormal) to the inactive color (i.e. a slightly darker shade) so when the window activates the title brightens and it darkens when inactivated (this looks much better than the screenshots above where the border color stays bright when deactivated). But since oxygen only uses Colors:Window:BackgroundNormal for both the border and the title, we have to set it to the actual label color when using the oxygen style. Under oxygen we get no choice to dim the color for inactive windows. We can't therefore use a single color file and have both styles looking their best. Other default styles and default theme styles can presumably be tweaked using different color override still.
Yes this is doable and I suspect the only approach if you want per vm color files instead of per label. These could be handled in the same way as the VM icon file is from the looks of it, generated from qvm-create with an external helper that imports the color definitions and spits out color files for the styles we support into the VM directory.
Yes I am looking forward to playing with this, thanks. I will also be looking at other areas as I get used to the code, I imagine there are a few areas I may be able help out. |
As an alternative/interim solution, I customized the Breeze theme, as can be seen at marmarek/qubes-desktop-linux-kde@c57ef7d and marmarek/qubes-desktop-linux-kde#1 |
On KDE5 native decoration plugin is used and requires special properties set (instead of `_QUBES_VMNAME` etc). Special care needs to be taken when detecting environment, because environment variables aren't good enough - this script may be running with cleared environment (through sudo, or from systemd). So check properties of X11 root window. QubesOS/qubes-issues#1784
Using upstream theme with custom color palete requires even less maintenance, so is preferred solution. Additionally this way both title bar and borders are colored. Initial script implemented by @jgriffiths (thanks!), later modified to dynamically extract defined labels and color values. QubesOS/qubes-issues#1784
Remove "Computer" tab. kickoff.tar.gz is unmodified upstream version. QubesOS/qubes-issues#1784
Created #2042 for this. |
I can't manage to remove devicenotifier using config init/update API (https://userbase.kde.org/KDE_System_Administration/PlasmaTwoDesktopScripting), so provide default configuration file in /etc/skel. QubesOS/qubes-issues#1784
There should be semicolon at the end. Also remove NoDisplay=true to make debugging easier. QubesOS/qubes-issues#1784 Reported by: Niels Kobschaetzki <niels@kobschaetzki.net>
There should be semicolon at the end. Also remove NoDisplay=true to make debugging easier. QubesOS/qubes-issues#1784 Reported by: Niels Kobschaetzki <niels@kobschaetzki.net>
In light of the move from KDE to Xfce4 as the default in R3.2, is anyone still working on still working on this? In particular, @jgriffiths? Asking for tracking purposes. |
I'm not working on this right now, I've recently started a new job which is taking most of my time. Also I think its time to admit that KDE has lost the plot with constant refactoring and chasing non desktop usage. It is ugly, slow and unstable. I would stop using Qubes if it forced gnome in dom0 but I can live with xfce. Especially if I can upgrade dom0 past f22 sooner as a result. |
Understood. Thanks. |
Commit from core2: commit 94d52a1 core: adjust guid parameters when running on KDE5 On KDE5 native decoration plugin is used and requires special properties set (instead of `_QUBES_VMNAME` etc). Special care needs to be taken when detecting environment, because environment variables aren't good enough - this script may be running with cleared environment (through sudo, or from systemd). So check properties of X11 root window. QubesOS/qubes-issues#1784
This has been implemented a long time ago. |
KDE 5 have major changes in window decoration plugin API, making upgrade hard. Most likely Qubes decoration plugin will need to be rewritten from scratch.
This issue blocks dom0 upgrade to something newer than Fedora 20.
We're planning to add Gnome support in dom0, which somehow makes this issue lower priority, but still an issue.
Related discussion: https://groups.google.com/d/msgid/qubes-devel/20150708225129.GN900%40mail-itl
The text was updated successfully, but these errors were encountered: