Add scale to Niri config

This commit is contained in:
Thomas Avé 2026-06-02 15:16:15 +07:00
parent 1b3613326f
commit d2aebddc26
Signed by: thomasave
SSH Key Fingerprint: SHA256:bvIbWy6TO9+PdMTPzWy6dqkRlVQ3eSky+vQcc9aRIiE
1 changed files with 130 additions and 119 deletions

View File

@ -1,4 +1,8 @@
{pkgs, scale ? null, ...}: let {
pkgs,
scale ? null,
...
}: let
terminal = "${pkgs.foot}/bin/footclient"; terminal = "${pkgs.foot}/bin/footclient";
nautilus = "${pkgs.nautilus}/bin/nautilus"; nautilus = "${pkgs.nautilus}/bin/nautilus";
playerctl = "${pkgs.playerctl}/bin/playerctl"; playerctl = "${pkgs.playerctl}/bin/playerctl";
@ -53,6 +57,9 @@
in { in {
# Since native Home Manager doesn't have a programs.niri module yet, # Since native Home Manager doesn't have a programs.niri module yet,
# we generate the KDL configuration file directly. # we generate the KDL configuration file directly.
home.packages = with pkgs; [
wl-clipboard
];
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
settings = { settings = {
@ -129,11 +136,15 @@ in {
focus-follows-mouse max-scroll-amount="10%" focus-follows-mouse max-scroll-amount="10%"
warp-mouse-to-focus warp-mouse-to-focus
} }
${if scale != null then '' ${
if scale != null
then ''
output "eDP-1" { output "eDP-1" {
scale ${toString scale} scale ${toString scale}
} }
'' else ""} window-rule { ''
else ""
} window-rule {
match app-id="vicinae" match app-id="vicinae"
open-floating true open-floating true
} }
@ -150,8 +161,8 @@ ${if scale != null then ''
Mod+Tab { toggle-overview; } Mod+Tab { toggle-overview; }
// Vicinae Binds // Vicinae Binds
Mod+C { spawn "vicinae" "vicinae://extensions/vicinae/clipboard/history"; } Mod+C { spawn "vicinae" "vicinae://launch/clipboard/history"; }
Mod+N { spawn "vicinae" "vicinae://extensions/vicinae/wm/switch-windows"; } Mod+N { spawn "vicinae" "vicinae://launch/wm/switch-windows"; }
Mod+Escape { spawn "vicinae" "open" "-q" "Power Management "; } Mod+Escape { spawn "vicinae" "open" "-q" "Power Management "; }
Mod+Space { spawn "vicinae" "toggle"; } Mod+Space { spawn "vicinae" "toggle"; }