From 85a5b96b17ba7c025a96e616d11a20f1489b3fab Mon Sep 17 00:00:00 2001 From: sefidel Date: Wed, 26 Jan 2022 11:38:00 +0900 Subject: home/base: waybar - store config in seperate dir --- home/profiles/base/config/waybar-settings.nix | 56 ------------------- home/profiles/base/config/waybar-style.nix | 77 --------------------------- home/profiles/base/config/waybar/settings.nix | 56 +++++++++++++++++++ home/profiles/base/config/waybar/style.nix | 77 +++++++++++++++++++++++++++ home/profiles/base/default.nix | 4 +- 5 files changed, 135 insertions(+), 135 deletions(-) delete mode 100644 home/profiles/base/config/waybar-settings.nix delete mode 100644 home/profiles/base/config/waybar-style.nix create mode 100644 home/profiles/base/config/waybar/settings.nix create mode 100644 home/profiles/base/config/waybar/style.nix (limited to 'home/profiles/base') diff --git a/home/profiles/base/config/waybar-settings.nix b/home/profiles/base/config/waybar-settings.nix deleted file mode 100644 index 90e793a..0000000 --- a/home/profiles/base/config/waybar-settings.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ neotheme }: - -with neotheme.colors; -{ - layer = "bottom"; - position = "top"; - height = 22; - modules-left = [ "pulseaudio" "custom/seperator" "cpu" "custom/seperator" "memory" ]; - modules-center = [ "sway/workspaces" ]; - modules-right = [ "clock" ]; - - "sway/workspaces" = { - all-outputs = true; - disable-scroll = false; - format = "{name}"; - persistent_workspaces = { - "1:I" = [ ]; - "2:II" = [ ]; - "3:III" = [ ]; - "4:IV" = [ ]; - "5:V" = [ ]; - "6:VI" = [ ]; - "7:VII" = [ ]; - "8:VIII" = [ ]; - "9:IX" = [ ]; - "10:X" = [ ]; - }; - }; - - "clock" = { - interval = 10; - format = " {:%A, %b %d %H:%M}"; - }; - - "cpu" = { - interval = 5; - format = " {usage:3}%"; - }; - - "pulseaudio" = { - format = "{icon} {volume}%"; - format-muted = "ﱝ Muted"; - format-icons.default = [ " " " " " " ]; - }; - - "memory" = { - interval = 5; - format = " {used:0.2f}GiB"; - }; - - "custom/seperator" = { - format = "|"; - interval = "once"; - tooltip = false; - }; -} diff --git a/home/profiles/base/config/waybar-style.nix b/home/profiles/base/config/waybar-style.nix deleted file mode 100644 index 686da35..0000000 --- a/home/profiles/base/config/waybar-style.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ neotheme }: - -with neotheme.colors; - -'' - * { - border: none; - border-radius: 0; - font-family: "Dina, JetBrainsMono Nerd Font"; - font-size: 12px; - min-height: 0; - } - - window#waybar { - background: #${background}; - color: #${foreground}; - border-bottom: 1px solid #${bright0}; - } - - #workspaces button { - padding: 0 8px; - background: #${background}; - color: #${foreground}; - border-bottom: 1px solid #${bright0}; - } - - #workspaces button.focused { - 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; - } - - #clock, - #cpu, - #temperature, - #backlight, - #network, - #memory, - #language, - #pulseaudio, - #tray, - #mode, - #mpd { - padding: 0.2rem 0.6rem; - margin: 0 2px; - color: #${foreground}; - background-color: #${background}; - border-bottom: 1px solid #${bright0}; - } - - @keyframes blink { - to { - background-color: #${color4}; - color: #${background}; - } - } - - #custom-seperator { - color: #${alt1}; - background-color: #${background}; - border-bottom: 1px solid #${bright0}; - } -'' diff --git a/home/profiles/base/config/waybar/settings.nix b/home/profiles/base/config/waybar/settings.nix new file mode 100644 index 0000000..90e793a --- /dev/null +++ b/home/profiles/base/config/waybar/settings.nix @@ -0,0 +1,56 @@ +{ neotheme }: + +with neotheme.colors; +{ + layer = "bottom"; + position = "top"; + height = 22; + modules-left = [ "pulseaudio" "custom/seperator" "cpu" "custom/seperator" "memory" ]; + modules-center = [ "sway/workspaces" ]; + modules-right = [ "clock" ]; + + "sway/workspaces" = { + all-outputs = true; + disable-scroll = false; + format = "{name}"; + persistent_workspaces = { + "1:I" = [ ]; + "2:II" = [ ]; + "3:III" = [ ]; + "4:IV" = [ ]; + "5:V" = [ ]; + "6:VI" = [ ]; + "7:VII" = [ ]; + "8:VIII" = [ ]; + "9:IX" = [ ]; + "10:X" = [ ]; + }; + }; + + "clock" = { + interval = 10; + format = " {:%A, %b %d %H:%M}"; + }; + + "cpu" = { + interval = 5; + format = " {usage:3}%"; + }; + + "pulseaudio" = { + format = "{icon} {volume}%"; + format-muted = "ﱝ Muted"; + format-icons.default = [ " " " " " " ]; + }; + + "memory" = { + interval = 5; + format = " {used:0.2f}GiB"; + }; + + "custom/seperator" = { + format = "|"; + interval = "once"; + tooltip = false; + }; +} diff --git a/home/profiles/base/config/waybar/style.nix b/home/profiles/base/config/waybar/style.nix new file mode 100644 index 0000000..686da35 --- /dev/null +++ b/home/profiles/base/config/waybar/style.nix @@ -0,0 +1,77 @@ +{ neotheme }: + +with neotheme.colors; + +'' + * { + border: none; + border-radius: 0; + font-family: "Dina, JetBrainsMono Nerd Font"; + font-size: 12px; + min-height: 0; + } + + window#waybar { + background: #${background}; + color: #${foreground}; + border-bottom: 1px solid #${bright0}; + } + + #workspaces button { + padding: 0 8px; + background: #${background}; + color: #${foreground}; + border-bottom: 1px solid #${bright0}; + } + + #workspaces button.focused { + 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; + } + + #clock, + #cpu, + #temperature, + #backlight, + #network, + #memory, + #language, + #pulseaudio, + #tray, + #mode, + #mpd { + padding: 0.2rem 0.6rem; + margin: 0 2px; + color: #${foreground}; + background-color: #${background}; + border-bottom: 1px solid #${bright0}; + } + + @keyframes blink { + to { + background-color: #${color4}; + color: #${background}; + } + } + + #custom-seperator { + color: #${alt1}; + background-color: #${background}; + border-bottom: 1px solid #${bright0}; + } +'' diff --git a/home/profiles/base/default.nix b/home/profiles/base/default.nix index eade27c..2480b34 100644 --- a/home/profiles/base/default.nix +++ b/home/profiles/base/default.nix @@ -118,9 +118,9 @@ in waybar = { enable = config.wayland.windowManager.sway.enable; - settings = [ (import ./config/waybar-settings.nix { inherit neotheme; }) ]; + settings = [ (import ./config/waybar/settings.nix { inherit neotheme; }) ]; - style = import ./config/waybar-style.nix { inherit neotheme; }; + style = import ./config/waybar/style.nix { inherit neotheme; }; }; zsh = { -- cgit 1.4.1