From 07838aa669269f8bcab63b443bc4dd418925d343 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 8 May 2025 12:30:00 +0300 Subject: [PATCH] waybar restyle, new themes Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 4 +- hosts/dunamis/users/user/programs.nix | 2 +- modules/home/desktop/niri/default.nix | 18 +++++-- .../desktop/niri/programs/waybar/default.nix | 44 ++++++++-------- modules/nixos/system/misc/stylix/default.nix | 52 +++++++++++++++++++ 5 files changed, 90 insertions(+), 30 deletions(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index f7799f3..3f61fd4 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -8,7 +8,7 @@ self.nixosModules.desktop self.nixosModules.system ./disko - ./minecraft.nix + # ./minecraft.nix ]; networking = { @@ -31,7 +31,7 @@ }; stylix = { enable = true; - theme = "helios"; + theme = "rose-pine-dawn"; }; }; diff --git a/hosts/dunamis/users/user/programs.nix b/hosts/dunamis/users/user/programs.nix index f51c13b..9e7cca7 100644 --- a/hosts/dunamis/users/user/programs.nix +++ b/hosts/dunamis/users/user/programs.nix @@ -9,7 +9,7 @@ terminal.wezterm.enable = true; terminal.ghostty.enable = true; systemd.user.settings.Manager.DefaultEnvironment = { - TERMINAL = "ghostty"; + TERMINAL = "wezterm"; }; services = { diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 386e957..d1abcfe 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -34,19 +34,27 @@ in { }; "org/gnome/desktop/interface" = { icon-theme = config.gtk.iconTheme.name; + color-scheme = + if config.stylix.polarity == "dark" + then lib.mkDefault "prefer-dark" + else lib.mkDefault "prefer-light"; }; }; gtk = { enable = true; - iconTheme = { + iconTheme = let + papirusPackage = + if (lib.strings.hasPrefix "rose-pine" osConfig.module.stylix.theme) + then pkgs.papirus-icon-theme.override {color = "indigo";} + else if (lib.strings.hasPrefix "nord" osConfig.module.stylix.theme) + then pkgs.papirus-icon-theme.override {color = "nordic";} + else pkgs.papirus-icon-theme; + in { name = if config.stylix.polarity == "dark" then "Papirus-Dark" else "Papirus-Light"; - package = - if (removeSuffix "-light" theme) == "nord" - then pkgs.papirus-nord - else pkgs.papirus-icon-theme; + package = papirusPackage; }; }; qt = { diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index d9eaad0..ac19ab7 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -14,11 +14,12 @@ settings = { bar-0 = { # layer = "top"; - position = "top"; + position = "bottom"; height = 24; - spacing = 4; - # margin-left = 63; - # margin-right = 63; + spacing = 6; + margin-left = 24 + 3; + margin-right = 24 + 3; + margin-bottom = 3; reload_style_on_change = true; modules-left = [ "niri/language" @@ -96,7 +97,7 @@ }; }; "tray" = { - icon-size = 16; + icon-size = 20; spacing = 6; }; "clock" = { @@ -217,10 +218,8 @@ font-size: 100%; } window#waybar { - background-color: @base00; + background-color: transparent; color: @base05; - transition-property: background-color; - transition-duration: 0.5s; } .modules-center { background-color: transparent; @@ -228,17 +227,18 @@ .mpris.stopped { background-color: transparent; } - .mpris.playing, - .mpris.paused, .modules-left, + .modules-center, .modules-right { - /* border-top-left-radius: 12px; - border-top-right-radius: 12px; - border-bottom-left-radius: 0px; - border-bottom-right-radius: 0px; + /* border-bottom-left-radius: 12px; + border-bottom-right-radius: 12px; + border-top-left-radius: 0px; + border-top-right-radius: 0px; */ background-color: @base00; - color: @base05; */ - margin: 0 0.5em; + border-radius: 12px; + border: 3px solid @base0D; + color: @base05; + padding: 0 0.4em; } tooltip { background: @base01; @@ -261,8 +261,9 @@ } #battery, #backlight, - #workspaces, + /* #workspaces, #taskbar, + #privacy, */ #taskbar button, #language, #clock, @@ -270,16 +271,15 @@ #backlight, #wireplumber, #workspaces button, - #custom-separator { - padding: 0 0.3em; - } #custom-notification, #idle_inhibitor, #power-profiles-daemon, - #privacy, #privacy-item, + #custom-separator { + padding: 0 0.3em; + } #tray button { - padding: 0 0.4em; + padding: 0 0.3em; margin: 0 0.2em; } #workspaces button.active { diff --git a/modules/nixos/system/misc/stylix/default.nix b/modules/nixos/system/misc/stylix/default.nix index c043dbf..07ab880 100644 --- a/modules/nixos/system/misc/stylix/default.nix +++ b/modules/nixos/system/misc/stylix/default.nix @@ -41,8 +41,60 @@ name = "wallhaven-yq7gox.jpg"; sha256 = "09s31spp9mq71fgkl1w80nzdc1458p1gjfyi3y6fy14wj2dza0pj"; }; + mountains-black = builtins.fetchurl { + url = "https://w.wallhaven.cc/full/9d/wallhaven-9djzww.jpg"; + name = "wallhaven-9djzww.jpg"; + sha256 = "1p2si922i9qs09h8c74lrvx0f284g0xvm7lh85gk1x7lqhn611zm"; + }; + cyber-dawn = builtins.fetchurl { + url = "https://w.wallhaven.cc/full/ym/wallhaven-ymo2y7.png"; + name = "wallhaven-ymo2y7.png"; + sha256 = "1b3j0hxxy8m25scq42lxsxc99xvr15pha1j4wplgz761asrvxly3"; + }; }; themes = { + rose-pine-dawn = { + polarity = "light"; + scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-dawn.yaml"; + wallpaper = wallpapers.cyber-dawn; + + serif = { + package = iosevkaPackage; + name = "Iosevka Nerd Font Propo"; + }; + + monospace = { + package = iosevkaTermPackage; + name = "IosevkaTerm Nerd Font Mono"; + }; + + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 24; + }; + }; + rose-pine-moon = { + polarity = "dark"; + scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-moon.yaml"; + wallpaper = wallpapers.cyber-dawn; + + serif = { + package = iosevkaPackage; + name = "Iosevka Nerd Font Propo"; + }; + + monospace = { + package = iosevkaTermPackage; + name = "IosevkaTerm Nerd Font Mono"; + }; + + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 24; + }; + }; nord = { polarity = "dark"; scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";