diff --git a/home/themes/default.nix b/home/themes/default.nix index ebf417e..6ce1d1a 100644 --- a/home/themes/default.nix +++ b/home/themes/default.nix @@ -11,6 +11,10 @@ let type = import ./i3.nix { inherit lib; }; default = {}; }; + i3BarTheme = mkOption { + type = import ./i3bar.nix { inherit lib; }; + default = {}; + }; }; }; in diff --git a/home/themes/i3bar.nix b/home/themes/i3bar.nix new file mode 100644 index 0000000..990c6d5 --- /dev/null +++ b/home/themes/i3bar.nix @@ -0,0 +1,24 @@ +{ lib }: +with lib; +let + mkColorOption = import ./color.nix { inherit lib; }; +in +types.submodule { + options = { + theme = mkOption { + type = types.submodule { + options = { + name = mkOption { + type = types.str; + default = "plain"; + }; + overrides = mkOption { + type = types.attrsOf types.str; + default = {}; + }; + }; + }; + default = {}; + }; + }; +} diff --git a/home/themes/solarizedLight/default.nix b/home/themes/solarizedLight/default.nix index 299fec1..ed22ad4 100644 --- a/home/themes/solarizedLight/default.nix +++ b/home/themes/solarizedLight/default.nix @@ -1,4 +1,5 @@ { i3Theme = import ./i3.nix; + i3BarTheme = import ./i3bar.nix; alacrittyTheme = import ./alacritty.nix; } diff --git a/home/themes/solarizedLight/i3bar.nix b/home/themes/solarizedLight/i3bar.nix new file mode 100644 index 0000000..69594f4 --- /dev/null +++ b/home/themes/solarizedLight/i3bar.nix @@ -0,0 +1,21 @@ +let + colors = import ./colors.nix; +in +with colors; +{ + theme = { + name = "solarized-light"; + overrides = { + idle_bg = base2; + idle_fg = base00; + info_bg = blue; + info_fg = base3; + good_bg = green; + good_fg = base3; + warning_bg = yellow; + warning_fg = base3; + critical_bg = red; + critical_fg = base3; + }; + }; +} diff --git a/home/x/i3bar.nix b/home/x/i3bar.nix index 4ebc301..a9c4b65 100644 --- a/home/x/i3bar.nix +++ b/home/x/i3bar.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: let isEnabled = config.my.home.x.enable; + i3BarTheme = config.my.theme.i3BarTheme; in { @@ -16,8 +17,9 @@ in bars = { top = { - theme = "solarized-light"; icons = "awesome5"; + theme = i3BarTheme.theme.name; + settings = i3BarTheme; blocks = [ {