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

Documentation for setting GTK theme #45

Open
AnotherRandomGitHubAccount opened this issue Jan 20, 2024 · 11 comments · May be fixed by #49
Open

Documentation for setting GTK theme #45

AnotherRandomGitHubAccount opened this issue Jan 20, 2024 · 11 comments · May be fixed by #49

Comments

@AnotherRandomGitHubAccount

I am trying to figure out how to use the gtk theme generation functionality, and how to make it set as the gtk theme. I've tried but can't figure out how to do this. a short example in the README.md would be very helpful. thanks

@Kyesarri
Copy link

I've set my GTK theme here:
https://github.com/Kyesarri/nixos/blob/master/home/gtk/default.nix

Module is imported by the host machine:
https://github.com/Kyesarri/nixos/blob/master/hosts/laptop/default.nix#L46

Colour scheme is set at the top of each host machine
https://github.com/Kyesarri/nixos/blob/master/hosts/laptop/default.nix#L1-L3

and configured for home-manager and nixos on the following lines:
https://github.com/Kyesarri/nixos/blob/master/hosts/laptop/default.nix#L69-L70

My code is messy, could be more functional but works for me. What have you tried so-far?

@AnotherRandomGitHubAccount
Copy link
Author

after a while i got it to work. i forked the repo so I could change all background variants to base00... it would be nice if there were options other than just the materia theme. something like flat-remix or graphite would be nice

@Kyesarri
Copy link

Kyesarri commented Feb 6, 2024

after a while i got it to work. i forked the repo so I could change all background variants to base00... it would be nice if there were options other than just the materia theme. something like flat-remix or graphite would be nice

I believe that's out of the current teams scope, I'm sure they would be open to a PR if someone wanted to put the work in.

@Misterio77
Copy link
Owner

Hey, contributed functions for different theme upstreams are very welcome!

Interface wise: the gtk-theme function's argument is an attrset so as to allow new arguments in the future. So feel free to add a upstream (or kind, or flavor, etc) argument (while falling back to materia by default) and implement your favorite theme :)

@Misterio77
Copy link
Owner

Re documentation: I will look into adding a complete example for setting up GTK themes.

@aspauldingcode
Copy link

aspauldingcode commented Feb 22, 2024

i forked the repo so I could change all background variants to base00...

I want to do the same. I just got this working thanks to @Kyesarri, although I went my own way about it.

in addition, I don't like how many applications are forced to use base02 instead of base00 (border of chromium for example).
I am additionally curious if this background issue could be resolved. it should be base00 (like this neovim for example).

Could it be fixed without a fork?

Screenshot 2024-02-22 at 09 01 12 AM

@Kyesarri
Copy link

Kyesarri commented Feb 22, 2024

Thanks @aspauldingcode, glad to hear my spaghetti could help someone.

Interesting point about the colours used on some windows, from my digging around "02" should be used for selection backgrounds. Might be worthwhile looking into conformity between colour schemes.

https://codeberg.org/kye/nixos/src/branch/master/theme.css is what I base my theming off, I think Firefox may be the same for its window background but I'll have to check exactly which it is using.

@Misterio77 I've never forked a repository / sent a PR but I might take a look at what's being used across themes and try and get some further conformity.

@AnotherRandomGitHubAccount
Copy link
Author

@Kyesarri
Copy link

Kyesarri commented Mar 1, 2024

Added a PR:
#48

I'd like to tackle more ideas on exposing spacing, roundness, opacity or even another theme but might be out of my wheelhouse currently. See how this progresses.

@AnotherRandomGitHubAccount
Copy link
Author

@eureka-cpu
Copy link

After trying to find the solution myself, I've gone ahead and opened a PR which just adds to the existing example in the contributed functions section of the README. Having a full guide on how you could potentially set GTK themes would be ideal, but having this would have saved me a few hours :p

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 a pull request may close this issue.

5 participants