dotfiles

My PC Dotfiles & Website
commit 3c03b08a7d9d2c7250d8348e1fde447bcfa7f806
parent cff08c9117bfc008b48a02197038d7910c05d4ac
Author: maydayv7 <maydayv7@gmail.com>
Date:   Mon, 29 Dec 2025 00:48:55 +0530

feat: Niri Updates

- Update to v25.11 and use UWSM
- Also use `pwvucontrol` instead of `pavucontrol`

Diffstat:

MCHANGELOG.md | 4++++
MREADME.md | 1+
Mflake.lock | 50+++++++++++---------------------------------------
Mflake.nix | 8+++++++-
Mmodules/gui/desktop/_shared/panel.nix | 2+-
Mmodules/gui/desktop/_shared/utilities.nix | 2+-
Mmodules/gui/desktop/hyprland/settings/apps.nix | 8++++----
Mmodules/gui/desktop/niri/default.nix | 22++++++++++++++++++----
Mmodules/gui/desktop/niri/settings/apps.nix | 33++++++++++++++++++++++-----------
Mmodules/gui/desktop/niri/settings/default.nix | 28+++++++++++++++++++++++++++-
Mmodules/gui/desktop/niri/settings/keybinds.nix | 2+-
11 files changed, 97 insertions(+), 63 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -2,6 +2,10 @@ ### December +- Niri Updates + - Update to v25.11 + - Use UWSM +- Use `pwvucontrol` instead of `pavucontrol` - Patch `nom` rendering - Add an AppImage manager - Add a LaTeX Editor diff --git a/README.md b/README.md @@ -498,6 +498,7 @@ _Thanks a lot! ;)_ ### To Do - Remove `pkgs.custom.copyous` after [merge](https://github.com/NixOS/nixpkgs/pull/469919) +- Update Niri Configuration after [merge](https://github.com/sodiboo/niri-flake/pull/1548) - Inputs: - Update `minecraft` after [merge](https://github.com/Infinidoge/nix-minecraft/pull/161) - Update `catppuccin` after release branch-off diff --git a/flake.lock b/flake.lock @@ -457,21 +457,25 @@ "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_2", - "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs": [ + "unstable" + ], + "nixpkgs-stable": [ + "stable" + ], "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1766765523, - "narHash": "sha256-DCk3GKdKZNjpvNuDy9ZVfVwCy3tlm96/UZnYkJO7N44=", - "owner": "sodiboo", + "lastModified": 1766933753, + "narHash": "sha256-y3n6F2uKE9UTO8ue0BAPw7LEbGHYxIX8XboctP64p3I=", + "owner": "maydayv7", "repo": "niri-flake", - "rev": "a3e638c75d07de759421e6f34bd69c3f9a0a3567", + "rev": "12ead9f3c8ccb77b4cabf8795f8d42f3551c9c51", "type": "github" }, "original": { - "owner": "sodiboo", + "owner": "maydayv7", "repo": "niri-flake", "type": "github" } @@ -549,38 +553,6 @@ "type": "github" } }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1766736597, - "narHash": "sha256-BASnpCLodmgiVn0M1MU2Pqyoz0aHwar/0qLkp7CjvSQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f560ccec6b1116b22e6ed15f4c510997d99d5852", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1766651565, - "narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nur": { "inputs": { "flake-parts": [ diff --git a/flake.nix b/flake.nix @@ -176,7 +176,13 @@ }; ## Niri - niri.url = "github:sodiboo/niri-flake"; + niri = { + url = "github:maydayv7/niri-flake"; + inputs = { + nixpkgs.follows = "unstable"; + nixpkgs-stable.follows = "stable"; + }; + }; }; ## Configuration ## diff --git a/modules/gui/desktop/_shared/panel.nix b/modules/gui/desktop/_shared/panel.nix @@ -144,7 +144,7 @@ in "󰕾" ]; format-muted = ""; - on-click = "pavucontrol"; + on-click = "pwvucontrol"; }; mpris = { diff --git a/modules/gui/desktop/_shared/utilities.nix b/modules/gui/desktop/_shared/utilities.nix @@ -26,7 +26,7 @@ in # Utilities custom.sysutils hyprpicker - pavucontrol + pwvucontrol wev wl-clipboard wl-screenrec diff --git a/modules/gui/desktop/hyprland/settings/apps.nix b/modules/gui/desktop/hyprland/settings/apps.nix @@ -32,7 +32,6 @@ in ## Autostart exec-once = [ - "uwsm finalize" "hyprctl setcursor ${cursor} ${toString cursors.size}" ] ++ (map (app: "uwsm app -t service -u ${util.build.until " " app}.service -- " + app) [ @@ -46,7 +45,8 @@ in # Desktop Icons "pcmanfm-qt --desktop" - ]); + ]) + ++ [ "uwsm finalize" ]; ## Shortcuts bind = @@ -69,7 +69,7 @@ in "$mod SHIFT, C, exec, ${runOnce "hyprpicker"} -arf hex" "$mod SHIFT, B, exec, ${runOnce "overskride"}" "$mod, D, exec, ${runOnce "nwg-displays"}" - "$mod SHIFT, P, exec, pavucontrol" + "$mod SHIFT, P, exec, pwvucontrol" "$mod SHIFT, N, exec, sh -c 'env XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi'" "$mod, Escape, exec, ${toggle "wlogout"} -p layer-shell" @@ -154,9 +154,9 @@ in "persistentsize, class:^(${class})" ]) [ + "com.saivert.pwvucontrol" "io.github.kaii_lb.Overskride" "nwg-displays" - "org.pulseaudio.pavucontrol" "gnome-control-center" "org.gnome.Settings" ] diff --git a/modules/gui/desktop/niri/default.nix b/modules/gui/desktop/niri/default.nix @@ -16,10 +16,24 @@ ++ [ ## Environment Setup { - # WM - programs.niri = { - enable = true; - package = pkgs.niri-stable; + programs = { + # WM + niri = { + enable = true; + package = pkgs.niri-unstable; + }; + + # Session + uwsm = { + enable = true; + waylandCompositors = { + niri = { + prettyName = "Niri"; + comment = "Niri compositor managed by UWSM"; + binPath = "/run/current-system/sw/bin/niri"; + }; + }; + }; }; # Settings diff --git a/modules/gui/desktop/niri/settings/apps.nix b/modules/gui/desktop/niri/settings/apps.nix @@ -4,20 +4,29 @@ ## Autostart spawn-at-startup = let - sh = command: [ - "sh" - "-c" - command - ]; + exec = + app: args: + [ + "uwsm" + "app" + "-t" + "service" + "-u" + "${app}.service" + "--" + app + ] + ++ args; in [ + { command = exec "pcmanfm-qt" [ "--desktop" ]; } + { command = exec "nwg-drawer" [ "-r" ]; } { command = [ - "pcmanfm-qt" - "--desktop" + "uwsm" + "finalize" ]; } - { command = sh "nwg-drawer -r"; } ]; ## Keybindings @@ -25,8 +34,8 @@ with config.lib.niri.actions; let sh = spawn "sh" "-c"; - toggle = app: args: sh "pkill ${app} || ${app} ${args}"; - runOnce = app: args: sh "pgrep ${app} || ${app} ${args}"; + toggle = app: args: sh "pkill ${app} || uwsm app -u ${app}.scope -- ${app} ${args}"; + runOnce = app: args: sh "pgrep ${app} || uwsm app -u ${app}.scope -- ${app} ${args}"; in { # Applications @@ -92,7 +101,7 @@ }; "Super+Shift+P" = { - action = spawn "pavucontrol"; + action = spawn "pwvucontrol"; hotkey-overlay.title = "Audio Settings"; }; @@ -110,6 +119,8 @@ { app-id = "qalculate-gtk"; } ]; open-floating = true; + default-column-width.proportion = 0.5; + default-window-height.proportion = 0.9; default-floating-position = { relative-to = "right"; x = 5; diff --git a/modules/gui/desktop/niri/settings/default.nix b/modules/gui/desktop/niri/settings/default.nix @@ -1,4 +1,5 @@ -{ util, ... }: +{ sys, util, ... }: +with sys.lib.stylix.colors; { imports = util.map.modules.list ./.; programs.niri.settings = { @@ -39,4 +40,29 @@ ]; }; }; + + programs.niri.extraConfig = '' + recent-windows { + open-delay-ms 150 + + binds { + Alt+Tab { next-window; } + Alt+Shift+Tab { previous-window; } + Alt+grave { next-window filter="app-id"; } + Alt+Shift+grave { previous-window filter="app-id"; } + } + + highlight { + active-color "#${base04}" + urgent-color "#${base08}" + padding 30 + corner-radius 7 + } + + previews { + max-height 480 + max-scale 0.5 + } + } + ''; } diff --git a/modules/gui/desktop/niri/settings/keybinds.nix b/modules/gui/desktop/niri/settings/keybinds.nix @@ -20,7 +20,7 @@ in "Super+slash".action = show-hotkey-overlay; "Super+Q".action = close-window; "Super+C".action = center-window; - "Super+Shift+E".action = fullscreen-window; + "Super+Shift+F".action = fullscreen-window; "Super+equal".action = switch-preset-column-width; "Super+minus".action = switch-preset-window-height; "Super+Shift+equal".action = maximize-column;