this post was submitted on 28 Aug 2024
6 points (87.5% liked)

Pop!_OS (Linux)

5131 readers
2 users here now

Pop!_OS is an operating system developed by System76 for STEM and creative professionals who use their computer as a tool to discover and create. Unleash your potential on secure, reliable open source software. Based on your exceptional curiosity, we sense you have a lot of it.

Unleash your potential

Whether this is your first experience with Linux, or your latest adventure, all are welcome to discuss and ask questions about Pop!_OS and COSMIC. Keep the discussions friendly though, and remember to assume good intentions whenever you reply. We're all here because we have a shared love for Linux and open source software.

System76 Logo

Support us by buying System76 hardware for you or your company! Or by donating on the Pop!_OS website through the "Support Pop" button. Pop!_OS and COSMIC are fully funded by System76 hardware sales. All systems are assembled in the USA. With your support, we'll work to push the Linux desktop forward with COSMIC.

Links

Guides

Hardware

Recommended

Community Rules

Follow the Code of Conduct

All posts on pop_os must adhere to the Pop!_OS community Code of Conduct. https://github.com/pop-os/code-of-conduct

Be helpful

Posts to pop_os must be helpful. When responding to a user asking for help, do not provide tongue-in-cheek responses like "RTM" or links to LMGTFY. Linking to direct sources that answer the asker's question is fine, but it's advised to provide some explanation as to how you got to that source.

Critique should be constructive

We within the Pop!_OS community welcome helpful criticism or ideas on ways to improve. However, basic "It's bad" or other simple negative comments don't help anyone fix anything. When voicing a complaint about something, try to point out ways the complaint could be improved or worked around, so that we can make a better product for it.

This rule applies to both Pop!_OS and its projects as well as other products available from third-parties.

Don't post malicious "advice"

It can be funny to joke about malicious commands, however this is not the venue for it. Do not advise users to run commands which will lock up their systems, steal their data, or erase their drive. Examples of this include (but are not limited to) fork bombs, rm, etc.

Posts violating this rule will be removed, even if the post is clearly in jest. Repeated offences may lead to a ban. You may understand that the command isn't serious, but a new user might not.

No personal attacks

Posts making a personal attack on any user will not be tolerated.

No hate speech

Hate speech of any kind will not be tolerated. Any violations will be removed, and are grounds for a ban.

founded 1 year ago
MODERATORS
 

I want to use the dark cosmic theme with kweather from flatpak. I've tried lots of stuff, but I don't understand how to determine what is a valid theme from terminal, or how to add to use it with a flatpak.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 2 months ago* (last edited 2 months ago) (1 children)

The QT theme can be set under cosmic. I think it's some kind of issue with using qt6ct with flatpak. If I install qbittorrent through apt install qbittorrent then add

alias qbittorrent="export QT_QPA_PLATFORMTHEME=qt6ct; /usr/bin/qbittorrent"

To my ~/.bashrc file, then I can launch qbittorrent with the settings from qt6ct when using qbittorrent from cosmic-term.

This doesn't change qbittorrent in the applications launcher. I think that requires changing the .desktop file. I haven't been able to determine how to launch qbittorrent with qt6ct with the version from flatpak yet.

edit: If this fails, it's usually because qbittorrent was already running. I'm able to have it work consistently by opening the "System Monitor" and killing all processes under qbittorrent then laucnhing it from cosmic-term.


edit: I found out later that editing ~/.profile with exports is more frequently recommended. I haven't tested it, but I just used the discouraged system wide /etc/environment file. This works for the other shortcut like ways to open files. The reason I used the /etc/environment was because I didn't really care, and also wanted to fix the mouse and resolution issues I was having that I found very annoying.

export XCURSOR_SIZE=24
export QT_SCALE_FACTOR=1
export QT_QPA_PLATFORMTHEME=qt6ct

I guess I might end facing consequences for it sometime? I don't know, I think the worse I'm expecting is that it just applies automatically to new users, but I guess I'll find out...

[–] [email protected] 1 points 2 months ago* (last edited 2 months ago) (1 children)

After seeing this post I managed to get mixed themes with Kvantum between Qt5 and Qt6 with flatpaks. Though, kweather uses Qt6.


edit: I did also confirm it is possible to theme Qt6 applications with Kvantum on Cosmic.

There's a discussion here about adding support to Ubuntu, but I just used the install instructions for Ubuntu directly from the Kvantum repository.

[–] [email protected] 1 points 2 months ago* (last edited 2 months ago) (1 children)

I finally managed to theme the org.kde.kweather flatpak, but I didn't use qt6ct.

I just ended up doing

sudo apt install plasma-desktop

Then opening KDE Settings, changing the theme to Breeze Dark and then

sudo apt remove plasma-desktop
sudo apt autoremove

I think these steps should also work for other applications that were originally made for KDE, but I'm new to using Desktop Linux as a primary DE. I don't really know if there are any consequences for doing this, but it seemed to work...


I think org.kde.kweather uses abnormal theming intended for KDE. I did a bunch of testing, I went back to older versions of it from months ago. I finally found a version that was compatible with Kvantum, and installed a package that makes Kvantum work with qt6ct.

The kvantum theme was mostly broken with org.kde.kweather in the older verison. And, then I found out that KDE applications read from ~/.config/kdeglobals, so I found a sample version and confirmed that I could in fact change the theme by creating the file. After this, I realized just using KDE to change the theme was probably going to be the easiest way forward, and that's how I ended up at the above solution.

[–] [email protected] 1 points 2 months ago* (last edited 2 months ago)

I forgot to say, it's also possible to use Kvantum with KDE applications that are flatpaks.

I just had to set the theme to Kvantum in the KDE Settings. I also noticed that the theme works slightly better if the platform theme on KDE applications is exported as QT_QPA_PLATFORMTHEME=kde, though it's not necessary. One other note, QT works by using plugins. I think the export is specifying the installed plugin. That was confusing to me, I was searching for config files but it's a plugin to QT.


edit: When opening the KDE settings, I think I also had to change the export to QT_QPA_PLATFORM=kde temporarily so that KDE recognized that it was supposed to change configuration files on the filesystem. Otherwise, I think it expects that qt6ct is managing it, and it shouldn't do anything. (because qt6ct was likely set earlier in in either the /etc/environment or in the ~/.profile)

I don't remember it was a requirement or not. Just that I had to change it so that KDE Settings would use the theme when I opened it.