From e1f7fb5c5f9e5276645a42cb387c442f06336919 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 12:51:41 +0800 Subject: [PATCH 1/5] migrate waybar to niri --- modules/home/rice/bar.nix | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/modules/home/rice/bar.nix b/modules/home/rice/bar.nix index 27a04dd..686523f 100644 --- a/modules/home/rice/bar.nix +++ b/modules/home/rice/bar.nix @@ -12,15 +12,15 @@ modules-left = [ "custom/start" - "hyprland/workspaces" - "hyprland/window" + "niri/workspaces" + "niri/window" "mpris" ]; modules-center = if rice.bar.minimal then [] else [ "custom/dunst" "clock" "tray" - "hyprland/submap" + # "hyprland/submap" ]; modules-right = if rice.bar.minimal then [ "tray" @@ -91,15 +91,10 @@ balanced = ""; }; }; - "hyprland/workspaces" = { - format = "{name}"; - format-icons = { - default = " "; - active = " "; - urgent = " "; - }; - on-scroll-down = "hyprctl dispatch workspace e+1"; - on-scroll-up = "hyprctl dispatch workspace e-1"; + "niri/workspaces" = { + format = "{value}"; + on-scroll-down = "niri msg action focus-workspace-down"; + on-scroll-up = "niri msg action focus-workspace-up"; }; "custom/dunst" = { format = "{}"; @@ -119,7 +114,7 @@ on-click-right = "playerctl next"; on-click = "playerctl previous"; }; - "hyprland/window" = { + "niri/window" = { icon = true; max-length = 35; separate-outputs = false; @@ -128,16 +123,14 @@ "~" = "${username}@${hostname}"; "btop" = "${username}@${hostname}"; }; - on-click-right = "hyprctl dispatch fullscreen 0"; - on-click-middle = "hyprctl dispatch killactive"; - on-click = "hyprctl dispatch fullscreen 1"; - on-scroll-up = "hyprctl dispatch cyclenext"; - on-scroll-down = "hyprctl dispatch cyclenext prev"; - }; - "hyprland/submap" = { - format = " {}"; - on-click = "hyprctl dispatch submap reset"; + on-click-right = "niri msg action fullscreen-window"; + on-click-middle = "niri msg action close-window"; + on-click = "niri msg action maximize-column"; }; + # "hyprland/submap" = { + # format = " {}"; + # on-click = "hyprctl dispatch submap reset"; + # }; "clock" = { format = "{:%b %d, %I:%M:%S %p}"; interval = 1; @@ -234,6 +227,7 @@ #workspaces button { border-radius: 0px; margin: 0px; + padding: 4px; background: none; border: none; } From e3070b231cf80428520690f5b86ba96af6245ecc Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 13:05:45 +0800 Subject: [PATCH 2/5] use unstable, migrate the rest of the keybinds, a bit of styling config --- modules/home/rice/compositor.nix | 14 ++++++++++++++ modules/home/rice/keybinds.nix | 25 +++++++++++++++++++++++++ modules/system/desktop.nix | 5 ++++- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index add66fc..04e0eb0 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -3,6 +3,8 @@ ./keybinds.nix ]; + # TODO: https://github.com/sodiboo/niri-flake/issues/1393 for nwg-displays monitor dynamic config + programs.niri = { settings = { outputs."eDP-1" = { @@ -10,6 +12,7 @@ position = { x=0; y=0; }; scale = 1.0; }; + environment = { XCURSOR_SIZE = "24"; XCURSOR_THEME = "catppuccin-${ctp-opt.flavor}-light-cursors"; @@ -31,6 +34,17 @@ "nm-applet &" "tailscale systray &" ]; + + prefer-no-csd = true; + layout = { + tab-indicator.enable = false; + gaps = rice.gap.outer; + border = { + enable = true; + width = rice.borders.size; + + }; + }; }; }; diff --git a/modules/home/rice/keybinds.nix b/modules/home/rice/keybinds.nix index 6a9c841..a8c838f 100644 --- a/modules/home/rice/keybinds.nix +++ b/modules/home/rice/keybinds.nix @@ -29,6 +29,7 @@ "Mod+Q".action.close-window = {}; "Mod+W".action.maximize-column = {}; + "Mod+S".action.fullscreen-window = {}; "Print".action.screenshot-screen = {}; "Mod+Up".action.focus-workspace-up = {}; @@ -36,11 +37,35 @@ "Mod+Left".action.focus-column-left = {}; "Mod+Right".action.focus-column-right = {}; + "Mod+Space" = { action.spawn = [ "playerctl" "play-pause" ]; allow-when-locked = true; }; "Mod+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" ":" "-run-command" "uwsm app -- {cmd}" ]; + "Mod+E".action.spawn = [ "pcmanfm-qt" ]; "Mod+T".action.spawn = [ "kitty" ]; "Mod+Y".action.spawn = [ "brave" "--restore-last-session" ]; "Mod+Return".action.spawn-sh = "ls ~/Projects | rofi -dmenu -p \"Open Project\" | xargs -I {} sh -c 'mkdir -p ~/Projects/\"{}\" && zeditor ~/Projects/\"{}\"'"; + + "Mod+M".action.spawn = [ "wlogout" ]; + "Mod+Tab".action.spawn = [ "pkill" "-SIGUSR1" "waybar" ]; + + "XF86Bluetooth".action.spawn = [ "blueman-manager" ]; + "XF86Display".action.spawn = [ "nwg-displays" ]; + "Ctrl+Alt+Delete".action.spawn = [ "wlogout" ]; + "Ctrl+Shift+Escape".action.spawn = [ "kitty" "btop" ]; + "Mod+Grave".action.spawn = [ "dunstctl" "set-paused" "toggle" ]; + + "Mod+N".action.spawn = [ "rofi-network-manager" ]; + "Mod+J".action.spawn-sh = "notify-send -u critical ${hostname} 'Caffein Mode' && notify-send '(SUPER+X to reset)' && systemctl --user stop hypridle"; + "Mod+Z".action.spawn = [ "dunstctl" "close-all" ]; + + "Mod+V".action.spawn = [ "rofi" "-modi" "clipboard:cliphist-rofi-img" "-show" "clipboard" "-show-icons" ]; + "Mod+A".action.spawn = [ "zeditor" ]; + "Mod+C".action.spawn = [ "kitty" "btop" ]; + "Mod+Shift+C".action.spawn = [ "kitty" "zsh" "-c" "fastfetch; exec zsh -i" ]; + "Mod+D".action.spawn = [ "steam" "steam://open/bigpicture" ]; + "Mod+Shift+D".action.spawn = [ "steam" ]; + + "Mod+L".action.spawn = [ "loginctl" "lock-session" ]; }; wayland.windowManager.hyprland = { diff --git a/modules/system/desktop.nix b/modules/system/desktop.nix index 933e8b7..04cb286 100644 --- a/modules/system/desktop.nix +++ b/modules/system/desktop.nix @@ -11,7 +11,10 @@ ]; programs = { - niri.enable = true; + niri = { + enable = true; + package = pkgs.niri-unstable; + }; hyprland = { enable = true; withUWSM = true; From 67df930504239c5deefa61e7dd8f16aa5ee6c87c Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 13:10:24 +0800 Subject: [PATCH 3/5] cleanup hyprlan specifics --- modules/home/rice/bar.nix | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/modules/home/rice/bar.nix b/modules/home/rice/bar.nix index 686523f..4360e9c 100644 --- a/modules/home/rice/bar.nix +++ b/modules/home/rice/bar.nix @@ -20,7 +20,6 @@ "custom/dunst" "clock" "tray" - # "hyprland/submap" ]; modules-right = if rice.bar.minimal then [ "tray" @@ -54,7 +53,7 @@ }; interval = 1; format = " {used:0.1f}GiB"; - on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop"; + on-click = "kitty btop"; }; "disk" = { states = { @@ -62,7 +61,7 @@ }; interval = 5; format = " {used}"; - on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop"; + on-click = "kitty btop"; on-click-right = "kitty sh -c 'sudo nix-collect-garbage -d; nix-collect-garbage -d; nix store optimise; sudo journalctl --rotate --vacuum-time=1s --vacuum-files=1; read'"; }; "network" = { @@ -81,7 +80,7 @@ critical-threshold = 80; format = " {temperatureC}°C"; interval = 1; - on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop"; + on-click = "kitty btop"; }; "power-profiles-daemon" = { format = "{icon} {profile}"; @@ -127,10 +126,6 @@ on-click-middle = "niri msg action close-window"; on-click = "niri msg action maximize-column"; }; - # "hyprland/submap" = { - # format = " {}"; - # on-click = "hyprctl dispatch submap reset"; - # }; "clock" = { format = "{:%b %d, %I:%M:%S %p}"; interval = 1; @@ -177,8 +172,7 @@ }; "custom/start" = { format = ""; - on-click-middle = "wlogout"; - on-click-right = "hyprctl dispatch togglespecialworkspace hidden"; + on-click-right = "wlogout"; on-click = "rofi -show drun -show-icons -display-drun '' -run-command \"uwsm app -- {cmd}\""; }; } @@ -221,8 +215,8 @@ border: ${toString rice.borders.size}px solid transparent; } - #window, #submap { padding: 0px 5px; } - #submap, #workspaces, #cpu, #memory, #disk, #clock, #window, #tray, #pulseaudio, #battery, #network, #temperature, #power-profiles-daemon, #custom-exit, #custom-start, #custom-dunst, #mpris { padding: 0px 5px; margin: 0px 5px; } + #window { padding: 0px 5px; } + #workspaces, #cpu, #memory, #disk, #clock, #window, #tray, #pulseaudio, #battery, #network, #temperature, #power-profiles-daemon, #custom-exit, #custom-start, #custom-dunst, #mpris { padding: 0px 5px; margin: 0px 5px; } #workspaces button { border-radius: 0px; @@ -241,7 +235,7 @@ background: @base; } - #workspaces button.active, #submap { + #workspaces button.active { background: @surface0; } From 02caf6655d919013412a9eee6484ca4232810582 Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 13:47:22 +0800 Subject: [PATCH 4/5] input tweak --- modules/home/rice/compositor.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/home/rice/compositor.nix b/modules/home/rice/compositor.nix index 04e0eb0..0b59e39 100644 --- a/modules/home/rice/compositor.nix +++ b/modules/home/rice/compositor.nix @@ -12,6 +12,13 @@ position = { x=0; y=0; }; scale = 1.0; }; + input = { + warp-mouse-to-focus.enable = true; + focus-follows-mouse = { + max-scroll-amount = "5%"; + enable = true; + }; + }; environment = { XCURSOR_SIZE = "24"; From 0b4bc2569aea4e145cba9b1079b8e2344e895faa Mon Sep 17 00:00:00 2001 From: satr14 Date: Tue, 7 Jul 2026 13:53:30 +0800 Subject: [PATCH 5/5] update modpack --- modules/system/homelab/mc/mc0-vanilla-plus.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/homelab/mc/mc0-vanilla-plus.nix b/modules/system/homelab/mc/mc0-vanilla-plus.nix index 2b93dd4..52b9608 100644 --- a/modules/system/homelab/mc/mc0-vanilla-plus.nix +++ b/modules/system/homelab/mc/mc0-vanilla-plus.nix @@ -5,10 +5,10 @@ rcon-pass = "howdy"; modpack = let useLatest = false; - commit = "bf95d65e758963899f9d5a4eba6b589c50faffc9"; + commit = "86bf13316ed1352a676d9056d284448ea5e5a079"; path = if !useLatest then "commit/${commit}" else "branch/main"; in pkgs.fetchPackwizModpack { - packHash = "sha256-4AbpwvbzndeQC18sCKbWkIo8npQRHTftOJ69au3AjXc="; + packHash = ""; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; }; in {