hyprland: add zoom

This commit is contained in:
2026-03-22 05:30:17 +03:00
parent d5971d8876
commit eedd246c07
3 changed files with 29 additions and 1 deletions
+5
View File
@@ -39,6 +39,11 @@
''$mainMod, F2, exec, ${lib.getExe monitor-switcher} mirror'' ''$mainMod, F2, exec, ${lib.getExe monitor-switcher} mirror''
''$mainMod, F3, exec, ${lib.getExe monitor-switcher}'' ''$mainMod, F3, exec, ${lib.getExe monitor-switcher}''
]; ];
workspace = [
"2, layout:scrolling"
"4, layout:monocle"
];
}; };
}; };
} }
+3 -1
View File
@@ -2,7 +2,9 @@
optImport = path: lib.optional (builtins.pathExists path) path; optImport = path: lib.optional (builtins.pathExists path) path;
hostname = osConfig.networking.hostName; hostname = osConfig.networking.hostName;
in { in {
imports = imports = [
./hyprland/zoom.nix
] ++
optImport ../../host/${hostname}/modules/hyprland.nix ++ optImport ../../host/${hostname}/modules/hyprland.nix ++
optImport ../../user/${username}/modules/hyprland.nix; optImport ../../user/${username}/modules/hyprland.nix;
+21
View File
@@ -0,0 +1,21 @@
{
wayland.windowManager.hyprland.settings = {
bind = [
# "$mainMod, mouse_down, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')"
# "$mainMod, mouse_up , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')"
"$mainMod SHIFT, mouse_up , exec, hyprctl -q keyword cursor:zoom_factor 1"
"$mainMod SHIFT, mouse_down , exec, hyprctl -q keyword cursor:zoom_factor 1"
"$mainMod SHIFT, minus , exec, hyprctl -q keyword cursor:zoom_factor 1"
"$mainMod SHIFT, KP_SUBTRACT, exec, hyprctl -q keyword cursor:zoom_factor 1"
"$mainMod SHIFT, 0 , exec, hyprctl -q keyword cursor:zoom_factor 1"
];
binde = [
"$mainMod, equal , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')"
"$mainMod, minus , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')"
"$mainMod, KP_ADD , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')"
"$mainMod, KP_SUBTRACT, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')"
];
};
}