home: themes: setup i3bar theme

This commit is contained in:
Antoine Martin 2021-04-22 02:33:39 +02:00
parent 494542899d
commit 273cbba17f
5 changed files with 53 additions and 1 deletions

View file

@ -11,6 +11,10 @@ let
type = import ./i3.nix { inherit lib; };
default = {};
};
i3BarTheme = mkOption {
type = import ./i3bar.nix { inherit lib; };
default = {};
};
};
};
in

24
home/themes/i3bar.nix Normal file
View file

@ -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 = {};
};
};
}

View file

@ -1,4 +1,5 @@
{
i3Theme = import ./i3.nix;
i3BarTheme = import ./i3bar.nix;
alacrittyTheme = import ./alacritty.nix;
}

View file

@ -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;
};
};
}

View file

@ -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 = [
{