From 3c3d062ed51a853445b207383874294b7c79ebea Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 1 Aug 2024 19:25:41 -0400 Subject: [PATCH] theming --- config/modules/bspwm/bspwm.nix | 22 +++++++++++++++------- config/modules/bspwm/polybar.nix | 22 +++++++++++----------- config/modules/color-scheme.nix | 12 ------------ config/modules/theme.nix | 10 +++++++++- config/users/alex/default.nix | 4 ++-- 5 files changed, 37 insertions(+), 33 deletions(-) delete mode 100644 config/modules/color-scheme.nix diff --git a/config/modules/bspwm/bspwm.nix b/config/modules/bspwm/bspwm.nix index 3ef7755..859bd7b 100644 --- a/config/modules/bspwm/bspwm.nix +++ b/config/modules/bspwm/bspwm.nix @@ -1,15 +1,18 @@ { pkgs, ... }: { - xsession.windowManager.bspwm = let colors = import ../color-scheme.nix; in { + xsession.windowManager.bspwm = let theme = import ../theme.nix; in { enable = true; settings = { - normal_border_color = colors.disabled; - active_border_color = colors.secondary; - focused_border_color = colors.primary; + normal_border_color = theme.colors.disabled; + active_border_color = theme.colors.secondary; + focused_border_color = theme.colors.primary; + + border_width = theme.sizing.m; + window_gap = theme.sizing.xl; - border_width = 2; - window_gap = 10; focus_follows_pointer = true; + single_monocle = true; + honor_size_hints = true; }; extraConfig = '' bspc monitor DP-2 -d I II III IV V @@ -26,6 +29,11 @@ ${pkgs.feh}/bin/feh --bg-fill ${pkgs.atau-pkgs.atau-wallpapers}/share/backgrounds/atau-wallpapers/aos1.png ''; - startupPrograms = [ "picom" "polybar primary" "polybar secondary" ]; + startupPrograms = [ + "bluetoothd" + "picom" + "polybar primary" + "polybar secondary" + ]; }; } diff --git a/config/modules/bspwm/polybar.nix b/config/modules/bspwm/polybar.nix index 66965d2..7c42988 100644 --- a/config/modules/bspwm/polybar.nix +++ b/config/modules/bspwm/polybar.nix @@ -4,20 +4,20 @@ enable = true; script = ""; # required but we start polybar via bspwm, so dont start it here. config = rec { - colors = import ../.color-scheme.nix; + theme = import ../theme.nix; common-bar = { width = "100%"; - height = "24pt"; - radius = 10; + height = "${theme.sizing.str.xl}pt"; + radius = theme.border-radius; #;dpi = 96 - background = colors.background; - foreground = colors.foreground; + background = theme.colors.background; + foreground = theme.colors.foreground; line-size = "3pt"; - border-size = "4pt"; + border-size = "${theme.sizing.str.m}pt"; border-color = "#00000000"; padding-left = 0; @@ -26,7 +26,7 @@ module-margin = 1; separator = "|"; - separator-foreground = colors.disabled; + separator-foreground = theme.colors.disabled; font-0 = "monospace;2"; wm-restack = "bspwm"; @@ -59,19 +59,19 @@ pin-workspaces = true; label-active = "%name%"; - label-active-background = colors.background-alt; - label-active-underline = colors.primary; + label-active-background = theme.colors.background-alt; + label-active-underline = theme.colors.primary; label-active-padding = 1; label-occupied = "%name%"; label-occupied-padding = 1; label-urgent = "%name%"; - label-urgent-background = colors.alert; + label-urgent-background = theme.colors.alert; label-urgent-padding = 1; label-empty = "%name%"; - label-empty-foreground = colors.disabled; + label-empty-foreground = theme.colors.disabled; label-empty-padding = 1; }; }; diff --git a/config/modules/color-scheme.nix b/config/modules/color-scheme.nix deleted file mode 100644 index 54ccf0f..0000000 --- a/config/modules/color-scheme.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - background = "#282A2E"; - background-alt = "#373B41"; - - foreground = "#C5C8C6"; - - primary = "#F0C674"; - secondary = "#8ABEB7"; - - alert = "#A54242"; - disabled = "#707880"; -} diff --git a/config/modules/theme.nix b/config/modules/theme.nix index 392e925..62b5500 100644 --- a/config/modules/theme.nix +++ b/config/modules/theme.nix @@ -12,11 +12,19 @@ alert = "#A54242"; disabled = "#707880"; }; - sizing = { + sizing = rec { xs = 1; s = 2; m = 4; l = 8; xl = 16; + + str = { + xs = toString xs; + s = toString s; + m = toString m; + l = toString l; + xl = toString xl; + }; }; } diff --git a/config/users/alex/default.nix b/config/users/alex/default.nix index 2e13aba..b862cfa 100644 --- a/config/users/alex/default.nix +++ b/config/users/alex/default.nix @@ -7,7 +7,6 @@ home.homeDirectory = "/home/${user}"; imports = [ - ../../apps/vscode.nix ../../modules/bspwm ../../apps/bash.nix @@ -15,6 +14,8 @@ ../../apps/git.nix ../../apps/kitty.nix ../../apps/mpv.nix + ../../apps/nextcloud.nix + ../../apps/vscode.nix ]; # Packages that should be installed to the user profile. @@ -48,7 +49,6 @@ lmms lutris moonlight-qt - nextcloud-client nixpkgs-fmt nodejs_20 obsidian