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

Theming options for Gtk and Qt #71079

Merged
merged 6 commits into from Feb 21, 2020
Merged

Theming options for Gtk and Qt #71079

merged 6 commits into from Feb 21, 2020

Conversation

ghost
Copy link

@ghost ghost commented Oct 13, 2019

Motivation for this change

In place of #70276

When I started to use NixOS at desktop I was wondered that there is no module to set Gtk and Qt widget and icon themes (in bare WM environment). Its no joy to use lxappearence, qt5ct and similar tools. These modules fix that issue by adding a way to configure themes declaratively.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @worldofpeace

TODO: ping jtojnar mid february

@ghost ghost requested a review from infinisil as a code owner October 13, 2019 11:26
nixos/modules/config/qt.nix Outdated Show resolved Hide resolved
nixos/modules/config/gtk/gtk.nix Outdated Show resolved Hide resolved
nixos/modules/config/gtk/gtk.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we configure cursor themes for gtk as well?
I believe it's just another key/s in gtkrc.

@ghost
Copy link
Author

ghost commented Nov 18, 2019

@worldofpeace

Could we configure cursor themes for gtk as well?
I believe it's just another key/s in gtkrc.

Done, thanks!

@ghost
Copy link
Author

ghost commented Dec 23, 2019

@worldofpeace @jtojnar merge please?

@ghost
Copy link
Author

ghost commented Jan 9, 2020

@worldofpeace @jtojnar ping

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/configuring-system-wide-gtk-settings/5689/2

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Feb 17, 2020

@gnidorah Could you expand the manual chapter "GTK/Qt themes" with a mention to this module and an example?

@ghost
Copy link
Author

ghost commented Feb 21, 2020

@rnhmjoj Done, thank you!

Copy link
Contributor

@rnhmjoj rnhmjoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested every option of gtk and I can completely reproduce my current configuration with it.
Also the example works as expected. I tried another Qt style (arc-kde) but I can't get to work, it's probably my fault: I know nothing of Qt.

IMHO this has waited long enough, I hoped it would be in 20.03 already. Let's merge it.

@rnhmjoj rnhmjoj merged commit 802a528 into NixOS:master Feb 21, 2020
@ghost
Copy link
Author

ghost commented Feb 21, 2020

@rnhmjoj Thank you! arc-kde doesn't provide native qt style, instead it provides settings for 3rd party theme engine (kvantum)

@ghost ghost deleted the theming branch February 21, 2020 18:55
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Feb 21, 2020

doesn't provide native qt style

I figured it was different somehow, that explains it.

@rnhmjoj Thank you!

Thank you

@worldofpeace
Copy link
Contributor

👎 I feel like at least @jtojnar @ttuegel and myself should have approved on this before it was merged. I even expressed that to @gnidorah. With release management I've had almost no time to look at these things, which I'm sorry about. I probably should have at least mentioned that here also for everyone to see, instead of the mentions I made on IRC.

@worldofpeace
Copy link
Contributor

worldofpeace commented Feb 23, 2020

IMHO this has waited long enough, I hoped it would be in 20.03 already. Let's merge it.

As mentioned, it may look like it has waited and received improvements off feedback, but there really hasn't been much.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Feb 23, 2020

👎 I feel like at least @jtojnar @ttuegel and myself should have approved on this before it was merged. I even expressed that to @gnidorah.

I'm sorry. I saw the changes you requested were completed and @gnidorah had to fix conflicts several times so I thought it would be better to merge it now.

@worldofpeace
Copy link
Contributor

-1 I feel like at least @jtojnar @ttuegel and myself should have approved on this before it was merged. I even expressed that to @gnidorah.

I'm sorry. I saw the changes you requested were completed and @gnidorah had to fix conflicts several times so I thought it would be better to merge it now.

Indeed, it's sad for something like this to go unnoticed.

@worldofpeace
Copy link
Contributor

worldofpeace commented Feb 23, 2020

#80854. Could you open another PR for this? I will review it.
And you should also request review of @jtojnar, and @ttuegel on the qt module.
I'd for sure like to see @infinisil ✔️ on it since it's a new module, maybe we can make use of NixOS/rfcs#42.

@worldofpeace
Copy link
Contributor

worldofpeace commented Feb 23, 2020

It would also help, though I think you'd have to rewrite your history 😦, if the gtk module and the qt module weren't in the same PR. It just makes it easier to review, because they don't depend on each other.

@ghost ghost restored the theming branch February 23, 2020 04:55
@ghost ghost deleted the theming branch February 23, 2020 04:55
@ghost ghost restored the theming branch February 23, 2020 05:01
This was referenced Feb 23, 2020
@pinpox
Copy link
Member

pinpox commented Oct 10, 2020

Is there any way to override theme colors declaratively? I'd like to replace some colors with custom ones I have defined to be used throughout my configuration in variables

@pinpox
Copy link
Member

pinpox commented Oct 16, 2020

Hm, that only sets the the gtk theme, if I'm not mistaken. I was referring to changing the individual colors. For now I ended up doing it like this: https://github.com/pinpox/nixos-home/blob/1cefe28c72930a0aed41c20d254ad4d193a3fa37/gtk.nix#L11
Maybe someone knows a simpler solution?

@rycee
Copy link
Member

rycee commented Oct 18, 2020

@pinpox That looks quite nice. Under which license is your configuration? I'd like to include a setup like yours in my gtk.nix file but need it to be compatible with MIT.

@pinpox
Copy link
Member

pinpox commented Oct 26, 2020

@rycee Sure thing, go ahead. I have added MIT to the files, let me know if you have any questions

@rycee
Copy link
Member

rycee commented Oct 26, 2020

@pinpox Thanks, I've added it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants