dot

NixOS dotfiles
git clone https://git.echoz.io/dot.git
Log | Files | Refs

commit 7cab67b466c0d9778e0f9d66d71d22d02729572f
parent 961ba276b7b5b308e717b848172bbce2fc6cf8e6
Author: Chris <chris@echoz.io>
Date:   Sun, 22 Feb 2026 11:17:42 +0100

feat(waybar): detach from edge of screen and use circular highlight on workspaces

Diffstat:
Mmodules/dunst/default.nix | 14++++++++------
Mmodules/style/color-helper.nix | 2+-
Mmodules/waybar/default.nix | 48++++++++++++++++++++++++++++++++++++------------
3 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/modules/dunst/default.nix b/modules/dunst/default.nix @@ -7,9 +7,10 @@ }: { home-manager.users.${user} = { - wayland.windowManager.hyprland.settings.layerrule = [ - "blur on, ignore_alpha 0, match:namespace notifications" - ]; + wayland.windowManager.hyprland.settings = { + bind = [ "$mod, Grave, exec, uwsm app -- dunstctl history-pop" ]; + layerrule = [ "blur on, ignore_alpha 0, match:namespace notifications"]; + }; home.packages = [ pkgs.libnotify ]; @@ -20,9 +21,9 @@ follow = "mouse"; alignment = "center"; width = 500; - height = "(36, 180)"; + height = "(42, 180)"; origin = "top-center"; - offset = "(0, 0)"; + offset = "(0, 10)"; corner_radius = 10; corners = "bottom"; padding = 12; @@ -37,7 +38,8 @@ transparency = 0; separator_height = 0; fullscreen = "show"; - layer = "top"; + layer = "overlay"; + show_age_threshold = 60; }; urgency_low = { diff --git a/modules/style/color-helper.nix b/modules/style/color-helper.nix @@ -1,6 +1,6 @@ lib: r: g: b: a: let - s = builtins.toString; + s = toString; toUnsignedInt = n: lib.toInt (builtins.head (builtins.match "^([0-9]*).*$" (builtins.toString n))); toHex = n: builtins.head (builtins.match "^.*(.{2})$" "0${lib.toHexString (toUnsignedInt n)}"); xr = toHex r; diff --git a/modules/waybar/default.nix b/modules/waybar/default.nix @@ -1,7 +1,9 @@ { style, user, ... }: { home-manager.users.${user} = { - wayland.windowManager.hyprland.settings.layerrule = [ "blur on, match:namespace waybar" ]; + wayland.windowManager.hyprland.settings.layerrule = [ + "blur on, ignore_alpha 0, match:namespace waybar" + ]; programs.waybar = { enable = true; @@ -11,7 +13,10 @@ mainBar = { layer = "top"; position = "top"; - height = 36; + margin-left = 10; + margin-right = 10; + margin-top = 10; + height = 42; modules-left = [ "hyprland/workspaces" "hyprland/window" @@ -86,13 +91,17 @@ style = '' * { border: none; - border-radius: 0; font-family: ${style.fonts.mono.family}; font-size: 12pt; } + box.module { + margin: 10px; + } + window#waybar { border: none; + border-radius: 10px; color: #${style.colors.fg.hex}; background: ${style.colors.bg.rgba}; } @@ -110,22 +119,37 @@ padding-right: 10px; } - #workspaces button { - color: #${style.colors.fg.hex}; - transition: box-shadow 0.1s linear; + #workspaces box { + min-height: 5px; } - #workspaces button:hover { - background: inherit; - box-shadow: inset 0px 2px #${style.colors.fg.hex}; + #workspaces button, #workspaces button:hover, #workspaces button.active, #workspaces button.empty { + box-shadow: inherit; text-shadow: inherit; + background: transparent; + padding: 0 5px; + } + + #workspaces button label { + color: #${style.colors.fg.hex}; + transition: background 0.1s linear; + border-radius: 50%; + min-height: 22px; + min-width: 22px; + border-radius: 50%; + } + + #workspaces button:hover label { + background: #${style.colors.fg.hex}; + color: #${style.colors.bg.hex}; } - #workspaces button.active { - box-shadow: inset 0px 2px #${style.colors.fg.hex}; + #workspaces button.active label { + background: #${style.colors.fg.hex}; + color: #${style.colors.bg.hex}; } - #workspaces button.empty { + #workspaces button.empty label { color: #${style.colors.lo.hex}; } '';