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

Add Kvantum KDE style #779

Closed

Conversation

gasinvein
Copy link
Member

@gasinvein gasinvein commented Dec 20, 2018

Kvantum is a theme engine for Qt.
This extension would require access to xdg-config/Kvantum directory to work seamlessly, but I'm not sure if it's possible to apply permissions via extension.
Also 3rd-party themes installed system-wide wouldn't work, but default (those comes with Kvantum itself) and installed per-user ones work fine.
I guess multiple branches of this (e.g. 5.9 and 5.11) have to be built.

@nedrichards
Copy link
Member

bot, build org.kde.KStyle.Kvantum
testbot, build org.kde.KStyle.Kvantum

@flathubbot
Copy link

NOTE: This comment was posted by the test instance of buildbot

Queued test build for org.kde.KStyle.Kvantum.

@flathubbot
Copy link

NOTE: This comment was posted by the test instance of buildbot

Started test build 475

@flathubbot
Copy link

NOTE: This comment was posted by the test instance of buildbot

Build 475 failed

@TingPing
Copy link
Member

So there are a few problems:

  • org.kde.KStyle in the KDE runtime currently makes the assumption that only the GNOME platform uses it. This may be problematic.
  • We need a branch for every single KDE version.
  • The permission has to be added to every KDE runtime.

@gasinvein
Copy link
Member Author

@TingPing

org.kde.KStyle in the KDE runtime currently makes the assumption that only the GNOME platform uses it. This may be problematic.

Is it by design?

We need a branch for every single KDE version.

As far as I know, there are only 3 KDE runtimes, with another one on it's way.

@TingPing
Copy link
Member

Is it by design?

Not really, just how it was used.

I think the ideal solution is the KDE runtime gets two different extension points. One that auto-installs the Adwaita style if you use that Gtk theme. One that installs Kvantum (This probably won't become automatic).

@gasinvein
Copy link
Member Author

testbot, build org.kde.KStyle.Kvantum

@nedrichards
Copy link
Member

@gasinvein testbot is no more. Now everyone can use the normal bot (the test got promoted to production!)

@nedrichards
Copy link
Member

bot, build org.kde.KStyle.Kvantum

@flathubbot
Copy link

Queued test build for org.kde.KStyle.Kvantum.

@flathubbot
Copy link

Started test build 758

@flathubbot
Copy link

Build 758 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/709/org.kde.KStyle.Kvantum.flatpakref

@memeplex
Copy link

memeplex commented Jun 4, 2019

What is missing for this package to be added? How can I test it? Following the instructions above (#779 (comment)) gives:

flatpak install --user https://dl.flathub.org/build-repo/709/org.kde.KStyle.Kvantum.flatpakref

error: Can't load uri https://dl.flathub.org/build-repo/709/org.kde.KStyle.Kvantum.flatpakref: Server returned status 404: Not Found

@gasinvein
Copy link
Member Author

@memeplex Test builds are deleted after some timeout.

bot, build org.kde.KStyle.Kvantum

@flathubbot
Copy link

Queued test build for org.kde.KStyle.Kvantum.

@flathubbot
Copy link

Started test build 4269

@flathubbot
Copy link

Build 4269 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/4078/org.kde.KStyle.Kvantum.flatpakref

@gasinvein
Copy link
Member Author

bot, build org.kde.KStyle.Kvantum

@flathubbot
Copy link

Queued test build for org.kde.KStyle.Kvantum.

@flathubbot
Copy link

Started test build 4392

@gasinvein
Copy link
Member Author

gasinvein commented Feb 17, 2022

It should work with user-installed themes given the app has filesystem access to the theme files.

@spikespaz
Copy link

This does not appear to be the case. I am on Manjaro KDE using the Materia KDE package from the Community repository.

> sudo flatpak override --show
filesystems=xdg-data/themes;xdg-config/Kvantum:ro;

[Environment]
GTK_THEME=Materia-dark-compact
QT_STYLE_OVERRIDE=kvantum

I chose the first option here:

> flatpak install org.kde.KStyle.Kvantum
Looking for matches…
Similar refs found for ‘org.kde.KStyle.Kvantum’ in remote ‘flathub’ (system):

   1) runtime/org.kde.KStyle.Kvantum/x86_64/5.15
   2) runtime/org.kde.KStyle.Kvantum/x86_64/5.15-21.08

I also tried with them both. What is the difference?

Kvantum is installed outside of sandbox and has the theme selected and configured for the rest of the system.

@gasinvein
Copy link
Member Author

package from the Community repository

This is a system-wide installed theme. It isn't accessible from flatpak sandbox, thus won't work.
Since you said "user-installed themes", I assumed you mean that, per-user themes, installed in the users' home - those should work.

@spikespaz
Copy link

Is there a way to use themes installed from pacman repositories? Other than creating a symlink (which I expect might cause problems having duplicates shown in menus and such).

@gasinvein
Copy link
Member Author

Is there a way to use themes installed from pacman repositories?

No, and it's unlikely there ever will be.

creating a symlink

If you mean symlink Kvantum themes in /usr to somewhere in ~/, then it just won't work, since the /usr is entirely different inside the sandbox.

@spikespaz
Copy link

I tried crating a symlink as such: ln -s /usr/share/Kvantum /home/jacob/.local/share/Kvantum

I don't think this is the correct location. Where is Flatpak/Kvantum looking for the theme?

@gasinvein
Copy link
Member Author

I tried crating a symlink as such: ln -s /usr/share/Kvantum /home/jacob/.local/share/Kvantum

As I said, this won't work. You can only try copying the themes instead of symlinking.

@spikespaz
Copy link

That approach worked for the $HOME/.local/share/themes for GTK, why not this?

@gasinvein
Copy link
Member Author

GTK themes work in flatpak by automatically installing matching GTK theme in flatpak format. The symlink most likely was irrelevant.

@spikespaz
Copy link

It appears to work just fine. I think the only reason it didn't work for Kvantum is because I don't know what needs to be accessible from a user owned path. Where do Kvantum themes and the relevant files go in the user home?

https://youtu.be/RUWrG1341QE

@gasinvein
Copy link
Member Author

Hmm, looks like when the --filesystem= value itself is a symlink, Flatpak follows the symlink, and mounts its target.
Kvantum looks for user-installed themes in ~/.config/Kvantum. So you can try symlinking Kvantum/Materia as passing it through as --filesystem=xdg-config/Kvantum/Materia.

@spikespaz
Copy link

spikespaz commented Feb 17, 2022

# Just start from scratch since  don't know how to reset just one filesystem portal
> sudo flatpak override --reset
# Set this back the way it was
> sudo flatpak override --env=GTK_THEME=Materia-dark-compact
# This too
> sudo flatpak override --env QT_STYLE_OVERRIDE=kvantum
# And this
> sudo flatpak override --filesystem=xdg-data/themes:ro
# What you said, hope it resolves the symlink
> sudo flatpak override --filesystem=xdg-config/Kvantum/MateriaDark:ro
# Necessary because the directory `MateriaDark#` and `kvantum.kvconfig` need to be accessible
> sudo flatpak override --filesystem=xdg-config/Kvantum:ro

Now flatpaks simply do not run at all. The applications launch and show up for a second and then close before anything is rendered.

Edit:

> flatpak run com.github.quaternion
bwrap: Can't bind mount /oldroot/usr/share/Kvantum/MateriaDark on /newroot/home/jacob/.var/app/com.github.quaternion/config/Kvantum/MateriaDark: Unable to mount source on destination: No such file or directory

@gasinvein
Copy link
Member Author

Right, xdg-config/Kvantum/MateriaDark won't work together with xdg-config/Kvantum.

@spikespaz
Copy link

I don't think that is the issue, why is Flatpak trying to bind a root directory with xdg-config?

@gasinvein
Copy link
Member Author

This error comes from bwrap, to debug it further, we'll need to look at the bwrap command line that flatpak constructed (flatpak run -vv ...).
But I guess replacing xdg-config/Kvantum with xdg-config/Kvantum/kvantum.kvconfig would be enough.

@spikespaz
Copy link

None of this works even if I do copy the Materia directory.

@spikespaz
Copy link

Looks like the directory MateriaDark# is copied to $HOME/.config/Kvantum from /usr/share/Kvantum/MateriaDark/ automatically when the theme has modified settings. It doesn't depend on anything else from the original theme. So considering that, where is all the QML or CSS that needs to be ported to Flatpak?

@coffseducation
Copy link

So, is this working?

I added the following in Flatseal - see pic at https://cloud.barkingbandicoot.com/index.php/s/ykKCkDtpWd4DJcS

I also copied the theme to /usr/share/Kvantum
but still cannot get KDE Kasts to exhibit the Kvantum theme.

Thanks.

@TiZ-HugLife
Copy link

Don't install themes in /usr/share/, because the Flatpak environment has a separate /usr from the host. Instead, install them in ~/.config/Kvantum. You should also be able to use the Kvantum Manager's theme installer. You will also have to create a global override: flatpak --user override --filesystem=xdg-config/Kvantum

This issue is mainly for the merge request to make Kvantum exist in Flatpak; any further issues you experience should be reported at the issue tracker for the Flathub package.

@Uberkeyser
Copy link

bot, build org.kde.KStyle.Kvantum

@flathubbot
Copy link

Queued test build for org.kde.KStyle.Kvantum.

@flathubbot
Copy link

Started test build 84177

@bbhtt
Copy link
Contributor

bbhtt commented Nov 28, 2023

bot, build org.kde.KStyle.Kvantum

The repo is here https://github.com/flathub/org.kde.KStyle.Kvantum and it is available on Flathub not sure why you are triggering test builds...

@flathubbot
Copy link

Queued test build for org.kde.KStyle.Kvantum.

@TiZ-HugLife
Copy link

What @bbhtt said. (Not quoting because I'm not trying to get the bot all worked up.) What's the particular motivation for the rebuild request? I'm guessing its absence from current runtimes? Those issues are currently being tracked on that repo.

@flathubbot
Copy link

Build 84177 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/66816/org.kde.KStyle.Kvantum.flatpakref

@Uberkeyser
Copy link

Uberkeyser commented Nov 29, 2023

org.kde.KStyle.Kvantum is broken for me (on KDE Neon; flatpaks do not find Kvantum anymore despite running under "--filesystem=xdg-config/Kvantum:ro"; it used to work just fine in the past on the same system). I cannot figure out what causes it, thought maybe rebuilding the test build and install that might fix it. But it does not.

@TiZ-HugLife
Copy link

Flatpaks are not finding it because it is not there. For each version of the KDE runtime, there must exist a corresponding branch in every KStyle. Adwaita's KStyle has been on top of this, but Kvantum, not so much. I have made some pull requests to build Kvantum against the current runtimes. Once the maintainers of that repo merge them, you will be able to install org.kde.KStyle.Kvantum//5.15-23.08, org.kde.KStyle.Kvantum//6.5, and org.kde.KStyle.Kvantum//6.6, which will bring Kvantum theming back to your Flatpak Qt applications.

@Uberkeyser
Copy link

OK thanks. I was guessing something like that, but though building the test might build it against the current KDE runtime. Noob here, Sorry for messing around with your bots

@Uberkeyser
Copy link

@HugLifeTiZ It seem your pull requests have been heard, org.kde.KStyle.Kvantum is available for 6.5 and 6.6 now. Thanks for following up on it

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

Successfully merging this pull request may close these issues.

None yet