From 5ce8aa86410e46fa5a16fab927dd2e83c97e789f Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Sat, 7 Jan 2023 13:29:06 -0800 Subject: [PATCH] Dynamically theme wallpaper, i3 tabs, kitty --- colors/everforest.nix | 3 +++ colors/nord.nix | 3 +++ hosts/home.nix | 3 ++- i3.nix | 31 ++++++++++++++++--------------- terminal.nix | 7 +++++-- 5 files changed, 29 insertions(+), 18 deletions(-) diff --git a/colors/everforest.nix b/colors/everforest.nix index 1625890..d4e749c 100644 --- a/colors/everforest.nix +++ b/colors/everforest.nix @@ -1,4 +1,7 @@ { + kitty-theme = "Everforest Dark Hard"; + wallpaper = "306286.jpg"; + background = "#1e2326"; background-alt = "#272e33"; foreground = "#d3c6aa"; diff --git a/colors/nord.nix b/colors/nord.nix index ed74183..0a4d02a 100644 --- a/colors/nord.nix +++ b/colors/nord.nix @@ -1,4 +1,7 @@ { + kitty-theme = "Nord"; + wallpaper = "roxynord.png"; + background = "#2e3440"; background-alt = "#3b4252"; foreground = "#eceff4"; diff --git a/hosts/home.nix b/hosts/home.nix index 3b115f6..b207762 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -3,6 +3,7 @@ let theme = pkgs.nordic; themeName = "Nordic"; + colors = import ../colors; in { imports = [ @@ -17,7 +18,7 @@ in ../terminal.nix ]; - home.file."./.background-image".source = ../wallpapers/306286.jpg; + home.file."./.background-image".source = ../wallpapers/${colors.wallpaper}; programs.home-manager.enable = true; diff --git a/i3.nix b/i3.nix index 2c6619c..1de5775 100644 --- a/i3.nix +++ b/i3.nix @@ -1,6 +1,7 @@ { pkgs, lib, ... }: let + colors = import ./colors; mod = "Mod4"; in { # Dependencies @@ -22,25 +23,25 @@ in { }; colors = { focused = { - border = "#4c566a"; - background = "#4c566a"; - text = "#eceff4"; - indicator = "#ff00ff"; - childBorder = "#ff00ff"; + border = "${colors.background-alt}"; + background = "${colors.background-alt}"; + text = "${colors.foreground}"; + indicator = "${colors.undefined}"; + childBorder = "${colors.undefined}"; }; focusedInactive = { - border = "#434c5e"; - background = "#434c5e"; - text = "#e5e9f0"; - indicator = "#ff00ff"; - childBorder = "#ff00ff"; + border = "${colors.background-alt}"; + background = "${colors.background-alt}"; + text = "${colors.foreground}"; + indicator = "${colors.undefined}"; + childBorder = "${colors.undefined}"; }; unfocused = { - border = "#2e3440"; - background = "#2e3440"; - text = "#e5e9f0"; - indicator = "#ff00ff"; - childBorder = "#ff00ff"; + border = "${colors.background}"; + background = "${colors.background}"; + text = "${colors.foreground}"; + indicator = "${colors.undefined}"; + childBorder = "${colors.undefined}"; }; }; startup = [ diff --git a/terminal.nix b/terminal.nix index 64352e6..c92ef6f 100644 --- a/terminal.nix +++ b/terminal.nix @@ -1,10 +1,13 @@ -{ pkgs, ... }: +{ ... }: +let + colors = import ./colors; +in { programs.kitty = { enable = true; # https://github.com/kovidgoyal/kitty-themes/blob/master/themes.json - theme = "Everforest Dark Hard"; + theme = "${colors.kitty-theme}"; font = { name = "FiraCode Nerd Font Mono"; size = 12;