From bba55dc97313de140be796f1c4663bd45f11c660 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 12 Jul 2025 15:29:28 +0300 Subject: [PATCH] try to fix styling Signed-off-by: unexplrd --- modules/home/desktop/niri/niri.nix | 10 +- .../desktop/niri/programs/walker/default.nix | 10 +- .../desktop/niri/programs/waybar/default.nix | 125 ++++++++---------- .../desktop/niri/services/swaync/default.nix | 23 ++-- modules/nixos/system/stylix/default.nix | 1 + 5 files changed, 79 insertions(+), 90 deletions(-) diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index c009478..0f1106a 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -160,20 +160,20 @@ in { } struts { - left 43 - right 43 + left 36 + right 36 } tab-indicator { active-color "#${colors.base04}" inactive-color "#${colors.base03}" - corner-radius 3 + corner-radius 6 gap 3 gaps-between-tabs 3 // length total-proportion=0.3 place-within-column position "left" - width 3 + width 6 } focus-ring { width 1 @@ -191,7 +191,7 @@ in { } window-rule { - geometry-corner-radius 9 + geometry-corner-radius 12 clip-to-geometry true } window-rule { diff --git a/modules/home/desktop/niri/programs/walker/default.nix b/modules/home/desktop/niri/programs/walker/default.nix index f461750..08f772a 100644 --- a/modules/home/desktop/niri/programs/walker/default.nix +++ b/modules/home/desktop/niri/programs/walker/default.nix @@ -230,7 +230,7 @@ #window { background: @base00; color: @base05; - border-radius: 9px; + border-radius: 12px; border: 1px solid @base0D; } @@ -240,7 +240,7 @@ #search { background: @base01; - border-radius: 6px; + border-radius: 9px; padding: 8px; } @@ -249,7 +249,7 @@ #typeahead { background: none; box-shadow: none; - border-radius: 3px; + border-radius: 6px; } #input > *:first-child, @@ -268,7 +268,7 @@ #list { padding: 3px; - border-radius: 6px; + border-radius: 9px; background: @base01; } @@ -279,7 +279,7 @@ child:selected, child:hover { box-shadow: none; - border-radius: 3px; + border-radius: 6px; background: @base02; } diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index 5a02b96..493159a 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -20,14 +20,13 @@ in { settings.bar-0 = { # layer = "top"; position = "bottom"; - height = 40; + height = 33; spacing = 0; # margin-left = 3; # margin-right = 3; - margin-left = 43 + 3; - margin-right = 43 + 3; + margin-left = 36 + 3; + margin-right = 36 + 3; margin-bottom = 3; - reload_style_on_change = true; modules-left = [ "custom/launcher" "clock" @@ -82,7 +81,7 @@ in { }; }; "tray" = { - icon-size = 20; + icon-size = 16; spacing = 6; }; "clock" = { @@ -164,7 +163,7 @@ in { }; "privacy" = { icon-spacing = 0; - icon-size = 18; + icon-size = 16; transition-duration = 250; screenshare = { type = "screenshare"; @@ -179,54 +178,43 @@ in { }; "wlr/taskbar" = { format = "{icon}"; - icon-size = 20; + icon-size = 18; icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; tooltip-format = "{title}"; on-click = "activate"; }; }; + # TODO: broken padding on taskbar button style = '' - @define-color base00 #${colors.base00}; - @define-color base01 #${colors.base01}; - @define-color base02 #${colors.base02}; - @define-color base03 #${colors.base03}; - @define-color base04 #${colors.base04}; - @define-color base05 #${colors.base05}; - @define-color base06 #${colors.base06}; - @define-color base07 #${colors.base07}; - @define-color base08 #${colors.base08}; - @define-color base09 #${colors.base09}; - @define-color base0A #${colors.base0A}; - @define-color base0B #${colors.base0B}; - @define-color base0C #${colors.base0C}; - @define-color base0D #${colors.base0D}; - @define-color base0E #${colors.base0E}; - @define-color base0F #${colors.base0F}; + @define-color base00 #${colors.base00}; @define-color base08 #${colors.base08}; + @define-color base01 #${colors.base01}; @define-color base09 #${colors.base09}; + @define-color base02 #${colors.base02}; @define-color base0A #${colors.base0A}; + @define-color base03 #${colors.base03}; @define-color base0B #${colors.base0B}; + @define-color base04 #${colors.base04}; @define-color base0C #${colors.base0C}; + @define-color base05 #${colors.base05}; @define-color base0D #${colors.base0D}; + @define-color base06 #${colors.base06}; @define-color base0E #${colors.base0E}; + @define-color base07 #${colors.base07}; @define-color base0F #${colors.base0F}; * { - font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; + all: unset; + font-family: ${config.stylix.fonts.sansSerif.name}, Symbols Nerd Font, FontAwesome; font-weight: 500; - font-size: 18px; + font-size: 16px; + min-width: 1em; } - window#waybar { - background: @base00; - border-radius: 9px; - } - - .modules-left, - .modules-center, - .modules-right { + .modules-left, .modules-center, .modules-right, window#waybar { background-color: @base00; - border-radius: 9px; color: @base05; + border-radius: 12px; } tooltip { background: @base01; border: 1px solid @base0D; - border-radius: 12px; + border-radius: 16px; + padding: 2em; } tooltip label { @@ -235,7 +223,7 @@ in { button { box-shadow: inset 0 -3px transparent; - border-radius: 3px; + border-radius: 6px; } button:hover { @@ -258,10 +246,10 @@ in { #wireplumber, #workspaces button, #workspaces { - border-radius: 6px; + border-radius: 9px; background-color: @base01; margin: 3px 3px 3px 0; - padding: 0 6px; + padding: 0 0.42em; } /* #clock, */ @@ -273,15 +261,12 @@ in { #backlight, #battery, + #custom-launcher, #custom-notification, #idle_inhibitor, + #power-profiles-daemon, #wireplumber { - padding: 0 15px 0 10px; - } - - #custom-launcher, - #power-profiles-daemon { - padding: 0 17px 0 8px; + padding: 0 0.5em; } #privacy, @@ -290,39 +275,22 @@ in { padding: 0; } - #privacy-item { - padding: 0 5px; + #workspaces { + padding-left: 3px; } - #taskbar button, - #tray button { - padding: 0 3px; - margin: 3px; + #privacy-item { + padding: 0 0.3em; } #workspaces button { - border-radius: 3px; - padding: 0 5px; - margin: 3px; + border-radius: 6px; + min-width: 0.4em; } #battery.critical:not(.charging) { background-color: @base09; color: @base00; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; - } - - #mode { - background-color: rgba(0, 0, 0, 0.2); - box-shadow: inset 0 -3px @base05; - } - - #power-profiles-daemon.balanced { - color: @base05; } #power-profiles-daemon.performance { @@ -347,8 +315,27 @@ in { margin: 3px 0 3px 3px; } + #workspaces button.active, + #taskbar button.active { + background-color: @base02; + } + + #workspaces button:hover, + #workspaces button.active:hover, + #taskbar button.active:hover, #taskbar button:hover { background-color: @base0D; + color: @base00; + } + + #taskbar.empty { + background-color: transparent; + } + + #taskbar button, + #tray button { + min-width: 0.4em; + margin: 3px; } #tray > .needs-attention { @@ -360,10 +347,10 @@ in { -gtk-icon-effect: dim; } - #workspaces button.active { + /* #workspaces button.active { color: @base00; background-color: @base0D; - } + } */ label:focus { background-color: #000000; diff --git a/modules/home/desktop/niri/services/swaync/default.nix b/modules/home/desktop/niri/services/swaync/default.nix index 91e244d..dccdb67 100644 --- a/modules/home/desktop/niri/services/swaync/default.nix +++ b/modules/home/desktop/niri/services/swaync/default.nix @@ -74,16 +74,17 @@ .app-icon, .image { -gtk-icon-effect: none; + padding-right: 0.5rem; } .notification-action { - border-radius: 6px; + border-radius: 9px; margin: 3px; } .close-button { margin: 12px; - border-radius: 3px; + border-radius: 6px; } .notification-group.collapsed @@ -105,15 +106,15 @@ .notification.normal, .notification.critical, .control-center { - border-radius: 9px; + border-radius: 12px; margin: 6px; } .floating-notifications, .notification-content { + padding: 0.5rem; margin: 3px; - border-radius: 6px; - border: none; + border-radius: 9px; } .control-center-list { @@ -129,7 +130,7 @@ } .widget-title > button { - border-radius: 6px; + border-radius: 9px; padding: 0.5rem; } @@ -142,23 +143,23 @@ } .widget-dnd > switch { - border-radius: 6px; + border-radius: 9px; } .widget-dnd > switch slider { margin: 3px; - border-radius: 3px; + border-radius: 6px; padding: 0px; } .widget-mpris .widget-mpris-player { - border-radius: 9px; + border-radius: 12px; margin: 0.5rem; padding: 0.5rem; } .widget-mpris .widget-mpris-player .widget-mpris-album-art { - border-radius: 6px; + border-radius: 9px; } .widget-mpris .widget-mpris-player .widget-mpris-title { @@ -170,7 +171,7 @@ } .widget-mpris .widget-mpris-player > box > button { - border-radius: 3px; + border-radius: 6px; padding: 3px; } ''; diff --git a/modules/nixos/system/stylix/default.nix b/modules/nixos/system/stylix/default.nix index c2bae49..8a451e4 100644 --- a/modules/nixos/system/stylix/default.nix +++ b/modules/nixos/system/stylix/default.nix @@ -351,6 +351,7 @@ in { }; config = mkIf cfg.enable { + fonts.packages = [pkgs.nerd-fonts.symbols-only]; stylix = { enable = true;