Fausto-Korpsvart / Tokyonight-GTK-Theme

A GTK theme based on the Tokyo Night colour palette.
https://www.pling.com/p/1681315/
GNU General Public License v3.0
470 stars 30 forks source link

pop os testing - seems to use light mode for dark theme #17

Closed ryannathans closed 2 weeks ago

ryannathans commented 1 year ago

my apps like element or geary are using a very bright white theme instead of a dark theme when the borderless dark theme is applied in gnome 42/pop os 22.04

when i use "pop-dark" for legacy applications in gnome tweaks, the issue is gone but then most apps aren't themed

Fausto-Korpsvart commented 1 year ago

my apps like element or geary are using a very bright white theme instead of a dark theme when the borderless dark theme is applied in gnome 42/pop os 22.04

when i use "pop-dark" for legacy applications in gnome tweaks, the issue is gone but then most apps aren't themed

I haven't actually tested PopOS!, I'm going to test to find out what's wrong and fix it as soon as possible. One more thing, could you post some screenshots to get an idea of the problem?, I would also like to know which specific version is causing the problem.

Thanks for reporting, @ryannathans };-]

ryannathans commented 1 year ago

not sure if it matters but they are flatpak apps

this is geary with the theme on image

and this is with pop-dark for legacy apps image

GNOME Shell 42.3.1

I downloaded

Tokyonight-Dark-BL.zip | 8.0 | Tokyonight Dark Borderless Version

extracted it in ~./themes

and in gnome tweaks

image

Fausto-Korpsvart commented 1 year ago

not sure if it matters but they are flatpak apps

this is geary with the theme on image

and this is with pop-dark for legacy apps image

GNOME Shell 42.3.1

I downloaded

Tokyonight-Dark-BL.zip | 8.0 | Tokyonight Dark Borderless Version

extracted it in ~./themes

and in gnome tweaks

image

not sure if it matters but they are flatpak apps

this is geary with the theme on image

and this is with pop-dark for legacy apps image

GNOME Shell 42.3.1

I downloaded

Tokyonight-Dark-BL.zip | 8.0 | Tokyonight Dark Borderless Version

extracted it in ~./themes

and in gnome tweaks

image

Yes, it does matter if they are Flatpak applications, here is an article that explains how to run a command in the terminal to Apply GTK themes to Flatpak Apps

ryannathans commented 1 year ago

~$ sudo flatpak override --filesystem=$HOME/.themes ~$ sudo flatpak override --env=GTK_THEME=Tokyonight-Dark-BL ~$ ls ~/.themes Tokyonight-Dark-BL

then restarting geary/relogging, still looks the same - bright white

Fausto-Korpsvart commented 1 year ago

~$ sudo flatpak override --filesystem=$HOME/.themes ~$ sudo flatpak override --env=GTK_THEME=Tokyonight-Dark-BL ~$ ls ~/.themes Tokyonight-Dark-BL

then restarting geary/relogging, still looks the same - bright white

OK, I downloaded the PopOS! ISO, I'm going to test to see where the error is because for Flatpak applications that command has always worked for me. One more question, have you downloaded the Gnome42 theme?, because if they are GTK4/Libadwaita applications, the theme doesn't apply with GTK3 themes. You could try applying the specific theme for Gnome 42. Anyway, I'm going to install PopOS! and test to see where the error is.

ryannathans commented 1 year ago

I tried the gnome42 theme but it didn't seem to change anything (that I could find anyway) when placed in ~/.config/gtk-4.0/gtk.css

also, not sure if they are supposed to be affected but the dock and application launcher are unaffected by the theme eg image image

appreciate the assistance and testing :)

ryannathans commented 1 year ago

image also seeing some light theming on some menus

Fausto-Korpsvart commented 1 year ago

I tried the gnome42 theme but it didn't seem to change anything (that I could find anyway) when placed in ~/.config/gtk-4.0/gtk.css

also, not sure if they are supposed to be affected but the dock and application launcher are unaffected by the theme eg image image

appreciate the assistance and testing :)

Well, I'm going to do the tests to fix these errors as soon as possible.

And no, the white colour in the shell menu is supposed to be like that to make some contrast.

I'll do the tests and when I solve the bugs I'll make the updates.

Thanks for reporting and for your support.

Fausto-Korpsvart commented 1 year ago

I tried the gnome42 theme but it didn't seem to change anything (that I could find anyway) when placed in ~/.config/gtk-4.0/gtk.css also, not sure if they are supposed to be affected but the dock and application launcher are unaffected by the theme eg image image appreciate the assistance and testing :)

Well, I'm going to do the tests to fix these errors as soon as possible.

And no, the white colour in the shell menu is supposed to be like that to make some contrast.

I'll do the tests and when I solve the bugs I'll make the updates.

Thanks for reporting and for your support.

I just installed PopOS and Geary is already installed, I installed Element and I don't see any problem with any of those applications. I guess because they are Flatpak applications, the theme is not applied, which indicates that the theme is not the problem. The only problem I've noticed is that the PopOS Applications Menu doesn't apply the theme and neither does the Dock, for the Dock you can install the Dash To Dock for Cosmic extension from Gnome Extensions to change the appearance. With the PopOS Application Menu, I'm going to try to make it work.

Again, thanks for reporting and for your support.

Element Geary

ryannathans commented 1 year ago

How did you get geary into dark mode whilst using theme? If I set legacy applications in gnome tweaks from pop-dark to Tokyonight-Dark-BL then geary and element turn white (element does use the correct top bar though, but in light theme)

image

Maybe I am applying the theme wrong/partially somehow?

Fausto-Korpsvart commented 1 year ago

How did you get geary into dark mode whilst using theme? If I set legacy applications in gnome tweaks from pop-dark to Tokyonight-Dark-BL then geary and element turn white (element does use the correct top bar though, but in light theme)

image

Maybe I am applying the theme wrong/partially somehow?

For Geary you must install the Ubuntu (deb) version from the PopOS Shop. pop_shop

With Element, the theme is only applied to the title bar because the application is probably not made in GTK and so the theme is not applied for that reason.

With the Dock, install the Dash To Dock for Cosmic extension and disable the PopOS Dock from the settings.

ryannathans commented 1 year ago

Thanks. Apps seem to think the theme is light and default to light mode. Is there any way to override this? When I use themes with a dark variant like pop-dark they default to dark mode.

Fausto-Korpsvart commented 1 year ago

Thanks. Apps seem to think the theme is light and default to light mode. Is there any way to override this? When I use themes with a dark variant like pop-dark they default to dark mode.

If I remember correctly, I think editing the 'settings.ini' file in '~/.config/gtk3.0' can do it, you should add this line:

[Settings] gtk-application-prefer-dark-theme=1

If the file does not exist, you can create it, and it should look like this: settings.ini If that doesn't work, then I'll look for a solution and let you know so that I can fix that problem.

ryannathans commented 1 year ago

Unfortunately didn't work.

Interestingly, this was set to 0. I set it to 1 and rebooted. Apps such as the flatpak geary still apply the light mode. When I swap to the pop-dark legacy applications theme, geary and element swap to dark mode. I wonder what the pop-dark theme is doing differently to achieve this. I am having a hard time finding gtk3 documentation about creating dark mode themes.

ryannathans commented 1 year ago

https://docs.flatpak.org/en/latest/desktop-integration.html?highlight=theme#theming

aha i think flatpaks will copy the system theme - only if there is a flatpak theme with the same name

and because there is one for pop-dark and not for this theme - that is why flatpaks do not inherit the dark mode (or any other styling) from this theme

eg: I have the flatpak org.gtk.Gtk3theme.Pop-dark

ryannathans commented 1 year ago

https://www.linuxuprising.com/2018/05/how-to-get-flatpak-apps-to-use-correct.html

feel like publishing the theme on flathub? :P

Fausto-Korpsvart commented 1 year ago

Thanks for the info, I really have no idea how to publish themes to Flatpak, it always worked for me to run the above command to make themes apply to Fatpak, I will check the documentation to know how to do it and then try to publish a theme as a test to see if they will work because I don't know what changes I need to make to the 'css' files to make it work.

Anyway, I'm going to read the documentation to find out what I need to do and find the solution.

Thanks for the support and for the info. };-]

ryannathans commented 1 year ago

thanks dude, enjoying the theme!

Fausto-Korpsvart commented 1 year ago

thanks dude, enjoying the theme!

I have found a way to make themes work in Flatpak applications!!

Just copy the themes to the following path, which I guess is the path where the packaged Flatpak themes are installed, the path is: ~/.local/share/flatpak/org.gnome.Platform/x86_64/41/... Then there is a folder with a long numeric code and inside that folder there is another folder called 'files' inside files you look for the folder 'share' and inside look for the folder 'themes', the full path would be: ~/.local/share/flatpak/org.gnome.Platform/x86_64/41/the long numeric code folder/files/share/themes

Everything is explained in this article in Linux Mint Adding Custom Themes to Flatpak Apps

I hope this will help while I look for a way to package the themes for Flatpak.

atraxsrc commented 1 year ago

For pop_os i recommend this script for legacy apps https://github.com/atraxsrc/libadwaita-theme-changer