diff --git a/modules/niri/default.nix b/modules/niri/default.nix index acdd9cc..5d9c59b 100644 --- a/modules/niri/default.nix +++ b/modules/niri/default.nix @@ -23,6 +23,10 @@ in { package = pkgs.niri-unstable; }; + services.upower = { + enable = true; + }; + services.logind = { powerKey = "ignore"; powerKeyLongPress = "poweroff"; diff --git a/modules/niri/fuzzel.conf.nix b/modules/niri/fuzzel.conf.nix index d206d6c..e7fcaa7 100644 --- a/modules/niri/fuzzel.conf.nix +++ b/modules/niri/fuzzel.conf.nix @@ -3,7 +3,7 @@ inherit (config) theme; in { main = { - font = "FiraCodeNerdFont:size=18"; + font = "FiraCodeNerdFont:size=8"; icons-enabled = false; terminal = "alacritty -e"; prompt = "'󱄅 '"; diff --git a/modules/niri/niri.conf.nix b/modules/niri/niri.conf.nix index 83af248..1514701 100644 --- a/modules/niri/niri.conf.nix +++ b/modules/niri/niri.conf.nix @@ -38,7 +38,7 @@ in { layout = { focus-ring = { - width = 4; + width = 2; active.gradient = { to = config.theme.rose; from = config.theme.pine; @@ -57,6 +57,9 @@ in { default-column-width = { proportion = 0.5; }; gaps = 2; + struts = { + top = 4; + }; }; window-rules = [ diff --git a/modules/niri/waybar.conf.nix b/modules/niri/waybar.conf.nix index 63feaa6..cfd8b78 100644 --- a/modules/niri/waybar.conf.nix +++ b/modules/niri/waybar.conf.nix @@ -2,39 +2,20 @@ mainBar = { layer = "top"; position = "top"; - modules-left = [ - "network" - ]; modules-center = [ - "clock" - ]; - modules-right = [ "battery" ]; - "clock" = { - format = "{:%H:%M}"; - format-alt = "{:%a, %Y-%m-%d}"; - tooltip = false; - }; - - "network" = { - format-wifi = "{icon}"; - format-alt = "{essid}"; - format-ethernet = "󰈁"; - format-disconnected = "󰤭 "; - format-icons = ["󰤯 " "󰤟 " "󰤢 " "󰤥 " "󰤨 "]; - tooltip = false; - }; "battery" = { states = { - good = 80; - warning = 30; - critical = 10; + better = 70; + good = 50; + bad = 30; + worse = 10; + worst = 5; }; - format = "{icon}"; - format-alt = "{capacity}%"; - format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; + format = " "; + format-alt = " "; tooltip = false; }; }; diff --git a/modules/niri/waybar.css.nix b/modules/niri/waybar.css.nix index aff8883..454b1bd 100644 --- a/modules/niri/waybar.css.nix +++ b/modules/niri/waybar.css.nix @@ -1,52 +1,62 @@ { config, ... }: let - background = config.theme.base; - font = config.theme.text; - charging = config.theme.pine; - warning = config.theme.rose; - critical = config.theme.love; + best = config.theme.pine; + better = config.theme.foam; + good = config.theme.iris; + bad = config.theme.rose; + worse = config.theme.gold; + worst = config.theme.love; + charging = config.theme.highlight-high; in { style = '' * { - border: none; - font-family: FiraCodeNerdFont; - font-size: 18px; - color: ${font}; - border-radius: 20px; + font-size: 1px; } window#waybar { background: rgba(0, 0, 0, 0); } - /*-----module groups----*/ - .modules-right { - background-color: ${background}; - margin: 2px 10px 0 0; + #battery { + border: none; + border-radius: 4px; + min-height: 4px; + min-width: 720px; + margin: 2px; + background: ${best}; } - .modules-center { - background-color: ${background}; - margin: 2px 0 0 0; + #battery.better { + background: ${better}; } - .modules-left { - margin: 2px 0 0 10px; - background-color: ${background}; + #battery.good { + background: ${good}; + } + #battery.bad { + background: ${bad}; + } + #battery.worse { + background: ${worse}; + } + #battery.worst { + background: ${worst}; } - #battery, - #clock, - #network { - padding: 0 15px; - } - - /*-----Indicators----*/ #battery.charging { - color: ${charging}; + background: linear-gradient(0deg, ${charging}, ${best}); } - #battery.warning:not(.charging) { - color: ${warning}; + #battery.better.charging { + background: linear-gradient(0deg, ${best}, ${better}); } - #battery.critical:not(.charging) { - color: ${critical}; + #battery.good.charging { + background: linear-gradient(0deg, ${better}, ${good}); + } + #battery.bad.charging { + background: linear-gradient(0deg, ${good}, ${bad}); + } + #battery.worse.charging { + background: linear-gradient(0deg, ${bad}, ${worse}); + } + #battery.worst.charging { + background: linear-gradient(0deg, ${worse}, ${worst}); } ''; }