From de6ce28912a78b915db3abcfd7bf726d062864c9 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 15 Apr 2025 19:49:08 +0300 Subject: [PATCH] desktop/niri: move to hostName id, change waybar Signed-off-by: unexplrd --- modules/home/desktop/niri/default.nix | 43 ++++++++++++++------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 7186c01..e8bf9e0 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -10,15 +10,15 @@ inherit (config.lib.stylix) colors; inherit (config.stylix) cursor; inherit (osConfig.module.stylix) theme; - inherit (osConfig.networking) hostId; + inherit (osConfig.networking) hostName; cfg = config.desktop.niri; keyboard = - if hostId == "eldrid" + if hostName == "eldrid" then "chromeos" else "platform"; xdgPics = config.xdg.userDirs.pictures; - ifLaptop = mkIf (hostId != "c7f6c4a1"); + ifLaptop = mkIf (hostName != "dunamis"); # TODO: make terminal depent on thing outside a module terminal = getExe pkgs.ghostty; launcher = getExe pkgs.fuzzel; @@ -270,6 +270,7 @@ in { terminal = terminal + " -e"; fields = "filename,name,generic,keywords,categories,exec"; dpi-aware = false; + width = 20; horizontal-pad = 12; vertical-pad = 12; show-actions = true; @@ -375,7 +376,7 @@ in { xkb { layout "us,ua" ${ - if hostId == "c7f6c4a1" + if (hostName == "dunamis" || hostName == "legion") then "// variant \"colemak_dh_ortho,\"" else "variant \"colemak_dh_ortho,\"" } @@ -416,7 +417,11 @@ in { variable-refresh-rate } output "Philips Consumer Electronics Company 27M2N5500 UK02418033254" { - mode "2560x1440@180.000" + mode "2560x1440@${ + if hostName == "legion" + then "144.001" + else "180.000" + }" variable-refresh-rate position x=0 y=0 scale 1.33 @@ -641,7 +646,7 @@ in { settings = { bar-0 = { # layer = "top"; - position = "bottom"; + position = "top"; height = 24; spacing = 4; # margin-left = 63; @@ -652,16 +657,15 @@ in { "niri/workspaces" "wlr/taskbar" ]; - modules-center = ["mpris"]; + modules-center = ["clock"]; modules-right = [ - "wireplumber" (ifLaptop "group/laptop") + "wireplumber" "tray" "privacy" (ifLaptop "power-profiles-daemon") "idle_inhibitor" "custom/notification" - "clock" ]; "niri/workspaces" = { format = "{index}"; @@ -725,11 +729,11 @@ in { }; "tray" = { icon-size = 16; - spacing = 4; + spacing = 6; }; "clock" = { interval = 1; - format = "{:%H:%M}"; + format = "{:%H:%M:%S}"; tooltip-format = "{:%d.%m.%Y}"; }; battery = { @@ -891,25 +895,24 @@ in { #backlight, #workspaces, #taskbar, + #taskbar button, #language, #clock, #battery, #backlight, #wireplumber, + #workspaces button, #custom-separator { padding: 0 0.3em; } - #privacy, - #tray button, - #privacy-item, - #idle_inhibitor, #custom-notification, + #idle_inhibitor, #power-profiles-daemon, - #workspaces button { - padding: 0 0.3em; - } - #taskbar button { - padding: 0 0.1em; + #privacy, + #privacy-item, + #tray button { + padding: 0 0.4em; + margin: 0 0.2em; } #workspaces button.active { color: @base0D;