How do you theme your desktop?

I’m becoming increasingly fed up with the lack of consistent colors across my main three applications: Emacs, a terminal, and Firefox. Using Gnome is a good way to get consistent colors for Firefox (GTK) and gnome-terminal, but misses Emacs, and prohibits XMonad.

Curious if anyone in the NixOS community has a good setup regarding this. Preferably DE-agnostic.

So I have some very basic requirements, for my DE, and not sure this helps your question.

  1. Some tiling features
  2. purple glass terminals
  3. avoiding the mouse
  4. my gui terminal using fish without changing my default login shell

So for years I have kept an openbox config that hits all these things. Allows me to maximize and dock a window to either side. Switch virtual desktops, move things across desktops. etc. I used openbox combined with nitrogen, compton, xscreensaver. I added fluxbox to get the fbrun command for a launcher and xfce4-app-finder for when I don’t know the exact name and all configured as keyboard shortcuts.

When I switched to nixos I found the kde from default to be sensible, performant, and good looking. So I basically just tweaked the shortcut keys to what I preferred, added a desktop I like and off I went. Maybe a theme change here but mostly just using the kde tools.

It basically came down to less work for me, use what is in the default install and tweak and not have to add a whole bunch of things to my config for “my base install”. In that I have found kde to have very consistent look and feel and sddm + kde to not be a really big impediment or lag from a cold boot.

So I guess my suggestion is try the default kde. It is very tweakable and good looking. Yes function is my first metric and for that keyboard shortcuts + tiling + konsole themed to my liking is what I need. So perhaps give that a try and see how it feels.

Ken

1 Like

I haven’t yet made any attempt to theme gtk programs, but I’ve found that nix makes it very easy to enforce consistent theming for programs where colours are controlled through config files.

I’ve been using a combination of home-manager and base16. I have a small home manager module (which is very hacky/ugly at the moment - GitHub - atpotts/base16-nix: Home manager module for themeing programs with base16 templates) that can read base16 colorschemes and use them to build config files or directly template colourschemes inside other home-manager modules. I’ve been able to use this to configure all my program colorschemes.

I’ve found it quite pleasant: when my mood changes, I just change one line of config, do a home-manager switch, and reload applications. Everything (xmonad/xmobar/qutebrowser/terminal/editor/dunst/desktop wallpaper…) all goes from e.g. solarized dark to gruvbox light straight away.

3 Likes

That sounds very good. I’d love to see your configs if you’re willing to share them.

1 Like

If you want to be able to change colors quickly, check out GitHub - deviantfero/wpgtk: 🎴 a colorscheme, wallpaper and template manager for *nix ! I have created a NixOs package for it which should be available in 19.03. It is essentially a Wallpaper and color manager for GTK, but it has a templating system which allows for other configs. You can feed it a background image and it can either automatically create a theme for it or you can give it a json. WPGTK has also a interface where you can change the colors of a wallpaper.

I can follow up with a post about how I use WPGTK with my current setup if you are interested. But I must say I don’t have a template for emacs yet and I don’t think I will create one in the near future.

2 Likes

Happy to share, I’ve tidied up the relevant components a little bit in GitHub - atpotts/base16-nix: Home manager module for themeing programs with base16 templates.

Nice. I wonder why no one’s made a GTK 3 theme for base16 yet.

Thank you for packaging my software in nixOS, is there any way we can document that in the official wiki in the repo?

Actually I stopped using it because I had some troubles setting it up - wpgtk is kind of working against the immutable setup of Nix, especially when using Home-Manager (a tool to create immutable dotfiles) which I started using…

But I may find time to look into it this or the coming week to create a short documentation.
I think it’ll make sense to document it in the NixOS wiki and add a reference on the README page of the wpgtk repo?

That would be great, and if you don’t mind, would you like telling me if it is within my reach to work around this nixOs specific stuff?

I’d love to help users of my software whenever I can, but I don’t actually know a lot about nixos :slight_smile:

1 Like

Please excuse the very late answer! I had some busy time and completely forgot about it after that!

When using NixOS without another dotfile manager, wpgtk should work without problems (except that it can’t overwrite any files in the /etc/ directory, which it doesn’t anyway IIRC).
I just checked the config on my old laptop, the only other thing that needs to be set in the config is programs.dconf.enable = true; - I just created a very short documentation over at the NixOS Wiki with this information.

When using Home Manager, which is quite common, it doesn’t work anymore because Home Manager updates dotfiles itself. It would probably not be too hard to tell Home Manager to put the config files in the wpgtk template directory instead of their final place. But home-manager is not an official part of NixOS and thus I guess we can ignore this issue for now.

On a side note: Go check out NixOS! It’s an amazing OS with very unique benefits like rollbacks and declarative, reproducible system configurations :grin:

Just getting my feet wet in here and stumbled across your project. This looks awesome.

I have recently installed NixOS, so it looks like I have to get up to speed on Nix. I’m running bspwm/polybar. Do you happen to have templates for bspwm, polybar or lightdm? Have you made any recent improvements?