feat: configure theme globally

This commit is contained in:
Michael Mandl 2022-08-18 21:15:03 +02:00
parent a2cff9b42c
commit 07484604d4
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7
7 changed files with 32 additions and 21 deletions

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, theme, ... }:
let
theme_name = "Solarized (${theme})";
in
{
programs = {
bat = {
enable = true;
config.theme = "Solarized (dark)";
config.theme = theme_name;
};
};
}

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, user, theme, ... }:
let
theme_name = if theme == "light" then "Solarized Light" else "Solarized Dark";
in
{
programs = {
kitty = {
enable = true;
theme = "Solarized Dark";
theme = theme_name;
font = {
name = "DejaVu Sans Mono";
};

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, user, theme, ... }:
let
cmp-nvim-lsp-signature-help = pkgs.vimUtils.buildVimPlugin {
@ -141,7 +141,10 @@ in
${builtins.readFile ./luasnip.lua }
${builtins.readFile ./nvim-cmp.lua }
${builtins.readFile ./telescope.lua }
${builtins.readFile ./themes.lua }
vim.opt.background = '${theme}'
${builtins.readFile ./project-nvim.lua }
EOF
'';

View file

@ -1,2 +1 @@
vim.opt.background = 'dark'
vim.cmd("colorscheme solarized")

View file

@ -1,5 +1,7 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, user, theme, ... }:
let
zsh_autosuggest_highlight_style = if theme == "light" then "fg=180" else "fg=10";
in
{
programs.zsh = {
enable = true;
@ -8,7 +10,7 @@
history.size = 10000;
sessionVariables = {
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=10";
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = zsh_autosuggest_highlight_style;
};
shellAliases = {