From 07c5526868b7da7cd428ed854cbad364ec80a1d1 Mon Sep 17 00:00:00 2001 From: Timo Boomers Date: Mon, 7 Jul 2025 16:02:37 +0200 Subject: [PATCH 1/2] niri changes --- modules/home/applications/helix.nix | 1 - .../desktop-environments/niri/default.nix | 14 +++++ .../home/desktop-environments/niri/waybar.nix | 59 +++++++++++++++++-- modules/system/display-managers/greetd.nix | 2 +- 4 files changed, 68 insertions(+), 8 deletions(-) diff --git a/modules/home/applications/helix.nix b/modules/home/applications/helix.nix index 2a0d175..5db5dc3 100644 --- a/modules/home/applications/helix.nix +++ b/modules/home/applications/helix.nix @@ -95,7 +95,6 @@ in { insert = "bar"; }; editor.end-of-line-diagnostics = "hint"; - editor.inline-diagnostics.cursor-line = "error"; }; languages = { # Rust diff --git a/modules/home/desktop-environments/niri/default.nix b/modules/home/desktop-environments/niri/default.nix index 8ce3d49..0b39038 100644 --- a/modules/home/desktop-environments/niri/default.nix +++ b/modules/home/desktop-environments/niri/default.nix @@ -35,6 +35,20 @@ in { }; }; + + # Configure default applications + xdg.mimeApps = { + enable = true; + defaultApplications = { + "text/html" = "firefox.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "x-scheme-handler/about" = "firefox.desktop"; + "x-scheme-handler/unknown" = "firefox.desktop"; + "application/pdf" = "firefox.desktop"; + }; + }; + programs.niri.enable = true; programs.niri.package = pkgs.unstable.niri; diff --git a/modules/home/desktop-environments/niri/waybar.nix b/modules/home/desktop-environments/niri/waybar.nix index 064aa28..3e597f8 100644 --- a/modules/home/desktop-environments/niri/waybar.nix +++ b/modules/home/desktop-environments/niri/waybar.nix @@ -35,20 +35,71 @@ in { ]; modules-right = [ "tray" + "network" "pulseaudio" + "battery" ]; "clock" = { - "format" = "{:%H:%M - %a, %d %b %Y}"; + "format" = "{:%H:%M - %d}"; }; "tray" = { "spacing" = 8; }; + + "battery" = { + "bat" = "BAT1"; + "interval" = 60; + "states" = { + "warning" = 30; + "critical" = 15; + }; + "format" = "{icon} {capacity}%"; + "format-icons" = [ "" "" "" "" "" ]; + }; + + "pulseaudio" = { + "format" = "{icon} {volume}%"; + "format-bluetooth" = "{volume}% {icon}"; + "format-muted" = "󰝟"; + "format-icons" = { + "headphone" = ""; + "hands-free" = ""; + "headset" = ""; + "phone" = ""; + "portable" = ""; + "car" = ""; + "default" = ["" ""]; + }; + "scroll-step" = 1; + "on-click" = "pavucontrol"; + "ignored-sinks" = ["Easy Effects Sink"]; + }; + + "network" = { + "interface" = "wlan0"; + "format" = "{ifname}"; + "format-wifi" = " {essid}"; + "format-ethernet" = "󰊗 {ipaddr}/{cidr}"; + "format-disconnected" = ""; + "tooltip-format" = "{ifname} via {gwaddr}"; + "tooltip-format-wifi" = "{essid} ({signalStrength}%)"; + "tooltip-format-ethernet" = "{ifname}"; + "tooltip-format-disconnected" = "Disconnected"; + "max-length" = 50; + }; }; }; programs.waybar.style = /* css */'' + #workspaces,#window,#clock,#battery,#tray,#pulseaudio,#network { + background-color: @base01; + border-radius: 10px; + padding: 0px 10px; + margin-top: 3px; + } + #workspaces button { padding: 0 5px; background: transparent; @@ -62,17 +113,13 @@ in { } window#waybar { - background: rgba(0,0,0,0.4); + background: transparent; } #workspaces button.active { border-bottom: 2px solid @base05; } - #tray { - padding: 0 5px; - } - #network { padding: 0 5px; } diff --git a/modules/system/display-managers/greetd.nix b/modules/system/display-managers/greetd.nix index 43bd44d..1dc417a 100644 --- a/modules/system/display-managers/greetd.nix +++ b/modules/system/display-managers/greetd.nix @@ -26,7 +26,7 @@ in { enable = true; settings = { default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd niri-session"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd niri-session"; user = "greeter"; }; }; From 89de487f68ed6c17e78e65fbae8484ffb763bb64 Mon Sep 17 00:00:00 2001 From: Timo Boomers Date: Tue, 8 Jul 2025 15:08:35 +0200 Subject: [PATCH 2/2] added margin between modules --- modules/home/desktop-environments/niri/waybar.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/desktop-environments/niri/waybar.nix b/modules/home/desktop-environments/niri/waybar.nix index 3e597f8..8b563d9 100644 --- a/modules/home/desktop-environments/niri/waybar.nix +++ b/modules/home/desktop-environments/niri/waybar.nix @@ -98,6 +98,8 @@ in { border-radius: 10px; padding: 0px 10px; margin-top: 3px; + margin-left: 5px; + margin-right: 5px; } #workspaces button {