From a8d417c7746b1ed93f4b00711492a3ef813ef1c3 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 21 Apr 2021 04:07:18 +0200 Subject: [PATCH] home: i3: make use of built-in theme module --- home/x/i3.nix | 74 ++++++--------------------------------------------- 1 file changed, 8 insertions(+), 66 deletions(-) diff --git a/home/x/i3.nix b/home/x/i3.nix index 919a86b..ba0c559 100644 --- a/home/x/i3.nix +++ b/home/x/i3.nix @@ -14,17 +14,7 @@ let logoutMode = "[L]ogout, [S]uspend, [P]oweroff, [R]eboot"; - # colors - colorBg = "#282828"; - colorRed = "#cc241d"; - colorGreen = "#98971a"; - colorYellow = "#d79921"; - colorBlue = "#458588"; - colorPurple = "#b16286"; - colorAqua = "#689d68"; - colorGray = "#a89984"; - colorDarkGray = "#1d2021"; - colorWhite = "#ffffff"; + i3Theme = config.my.home.theme.i3Theme; in { config = lib.mkIf isEnabled { @@ -53,65 +43,17 @@ in position = "top"; fonts = [ "DejaVuSansMono" "FontAwesome5Free 9" ]; - colors = { - background = colorBg; - statusline = colorYellow; - - focusedWorkspace = { - border = colorAqua; - background = colorAqua; - text = colorDarkGray; - }; - inactiveWorkspace = { - border = colorDarkGray; - background = colorDarkGray; - text = colorYellow; - }; - activeWorkspace = { - border = colorAqua; - background = colorDarkGray; - text = colorYellow; - }; - urgentWorkspace = { - border = colorRed; - background = colorRed; - text = colorBg; - }; - - separator = colorRed; - }; + colors = i3Theme.bar; } ]; colors = { - focused = { - border = colorBlue; - background = colorBlue; - text = colorDarkGray; - indicator = colorPurple; - childBorder = colorDarkGray; - }; - focusedInactive = { - border = colorDarkGray; - background = colorDarkGray; - text = colorYellow; - indicator = colorPurple; - childBorder = colorDarkGray; - }; - unfocused = { - border = colorDarkGray; - background = colorDarkGray; - text = colorYellow; - indicator = colorPurple; - childBorder = colorDarkGray; - }; - urgent = { - border = colorRed; - background = colorRed; - text = colorWhite; - indicator = colorRed; - childBorder = colorRed; - }; + inherit (i3Theme) + focused + focusedInactive + unfocused + urgent + ; }; focus = {