From 6bb2a7673480b17638a69e5c99f7fd21c7767c7d Mon Sep 17 00:00:00 2001 From: sefidel Date: Mon, 10 Jan 2022 00:10:38 +0900 Subject: home/base: better bar design --- .../profiles/base/config/waybar-settings.nix | 20 ++++++++---- home/modules/profiles/base/config/waybar-style.nix | 38 +++++++++++++++------- home/modules/profiles/base/default.nix | 2 +- 3 files changed, 42 insertions(+), 18 deletions(-) (limited to 'home/modules/profiles/base') diff --git a/home/modules/profiles/base/config/waybar-settings.nix b/home/modules/profiles/base/config/waybar-settings.nix index 2917e00..12fe8c8 100644 --- a/home/modules/profiles/base/config/waybar-settings.nix +++ b/home/modules/profiles/base/config/waybar-settings.nix @@ -1,15 +1,17 @@ +{ neotheme }: + +with neotheme.colors; { layer = "bottom"; position = "top"; height = 21; - modules-left = [ "pulseaudio" "cpu" "memory" ]; + modules-left = [ "pulseaudio" "custom/seperator" "cpu" "custom/seperator" "memory" ]; modules-center = [ "sway/workspaces" ]; modules-right = [ "clock" ]; modules = { "sway/workspaces" = { all-outputs = true; - persistent_workspaces = { "α" = [ ]; "β" = [ ]; @@ -26,23 +28,29 @@ "clock" = { interval = 10; - format = "{: %a %d %H:%M}"; + format = " {:%A, %b %d %H:%M}"; }; "cpu" = { interval = 5; - format = " {usage:3}%"; + format = " {usage:3}%"; }; "pulseaudio" = { - format = "{icon} {volume}%"; + format = "{icon} {volume}%"; format-muted = "ﱝ Muted"; format-icons.default = [ " " " " " " ]; }; "memory" = { interval = 5; - format = " {used:0.2f}GiB"; + format = " {used:0.2f}GiB"; + }; + + "custom/seperator" = { + format = "|"; + interval = "once"; + tooltip = false; }; }; } diff --git a/home/modules/profiles/base/config/waybar-style.nix b/home/modules/profiles/base/config/waybar-style.nix index 11c0d7d..e3f30f6 100644 --- a/home/modules/profiles/base/config/waybar-style.nix +++ b/home/modules/profiles/base/config/waybar-style.nix @@ -14,22 +14,32 @@ with neotheme.colors; window#waybar { background: #${background}; color: #${foreground}; - padding: 10px; + border-bottom: 1px solid #${bright0}; } #workspaces button { padding: 0 8px; - background: #${color4}; - color: #${background}; - border-bottom: 3px solid rgba (255, 255, 255, .2); + background: #${background}; + color: #${foreground}; + border-bottom: 1px solid #${bright0}; } #workspaces button.focused { - background-color: #${color4}; - border-bottom: 3px solid #${background}; + color: #${foreground}; + background-color: #${bright0}; + } + + #workspaces button.urgent { + color: #${color1}; + } + + #workspaces button.persistent { + color: #${alt1}; } #workspaces button:hover { + color: #${foreground}; + background: #${alt1}; box-shadow: inherit; text-shadow: inherit; } @@ -45,11 +55,11 @@ with neotheme.colors; #tray, #mode, #mpd { - padding: 0 10px; - margin: 0 4px; - color: #${background}; - background-color: #${color4}; - border-bottom: 3px solid rgba (255, 255, 255, .2); + padding: 0.2rem 0.6rem; + margin: 0 2px; + color: #${foreground}; + background-color: #${background}; + border-bottom: 1px solid #${bright0}; } @keyframes blink { @@ -58,4 +68,10 @@ with neotheme.colors; color: #${background}; } } + + #custom-seperator { + color: #${bright0}; + background-color: #${background}; + border-bottom: 1px solid #${bright0}; + } '' diff --git a/home/modules/profiles/base/default.nix b/home/modules/profiles/base/default.nix index cab1481..3d75618 100644 --- a/home/modules/profiles/base/default.nix +++ b/home/modules/profiles/base/default.nix @@ -106,7 +106,7 @@ in waybar = { enable = config.wayland.windowManager.sway.enable; - settings = [ (import ./config/waybar-settings.nix) ]; + settings = [ (import ./config/waybar-settings.nix { inherit neotheme; }) ]; style = import ./config/waybar-style.nix { inherit neotheme; }; }; -- cgit 1.4.1