From 36051b5970db536e895c2e7442aa83b9e6d4ddcf Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Wed, 21 Jan 2026 11:04:47 +0100 Subject: [PATCH] use hyprland's built-in animation for zooming --- dots/.config/hypr/hyprland/general.conf | 3 +++ dots/.config/hypr/hyprland/keybinds.conf | 6 ++---- dots/.config/quickshell/ii/GlobalStates.qml | 20 -------------------- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/dots/.config/hypr/hyprland/general.conf b/dots/.config/hypr/hyprland/general.conf index aedba4578..44160ed0d 100644 --- a/dots/.config/hypr/hyprland/general.conf +++ b/dots/.config/hypr/hyprland/general.conf @@ -115,6 +115,8 @@ animations { ## specialWorkspace animation = specialWorkspaceIn, 1, 2.8, emphasizedDecel, slidevert animation = specialWorkspaceOut, 1, 1.2, emphasizedAccel, slidevert + # zoom + animation = zoomFactor, 1, 3, emphasizedDecel } input { @@ -160,6 +162,7 @@ binds { cursor { zoom_factor = 1 zoom_rigid = false + zoom_disable_aa = true hotspot_padding = 1 } diff --git a/dots/.config/hypr/hyprland/keybinds.conf b/dots/.config/hypr/hyprland/keybinds.conf index 0cca263f1..8afb00457 100644 --- a/dots/.config/hypr/hyprland/keybinds.conf +++ b/dots/.config/hypr/hyprland/keybinds.conf @@ -230,10 +230,8 @@ bindd = Ctrl+Shift+Alt+Super, Delete, Shutdown, exec, systemctl poweroff || logi ##! Screen # Zoom -binde = Super, Minus, exec, qs -c $qsConfig ipc call zoom zoomOut # Zoom out -binde = Super, Equal, exec, qs -c $qsConfig ipc call zoom zoomIn # Zoom in -binde = Super, Minus, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.1 # [hidden] Zoom out -binde = Super, Equal, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.1 # [hidden] Zoom in +binde = Super, Minus, exec, ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.3 # [hidden] Zoom out +binde = Super, Equal, exec, ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.3 # [hidden] Zoom in # Zoom with keypad binde = Super, code:82, exec, qs -c $qsConfig ipc call zoom zoomOut # [hidden] Zoom out binde = Super, code:86, exec, qs -c $qsConfig ipc call zoom zoomIn # [hidden] Zoom in diff --git a/dots/.config/quickshell/ii/GlobalStates.qml b/dots/.config/quickshell/ii/GlobalStates.qml index 85a0414d6..ba680220b 100644 --- a/dots/.config/quickshell/ii/GlobalStates.qml +++ b/dots/.config/quickshell/ii/GlobalStates.qml @@ -37,14 +37,6 @@ Singleton { } } - property real screenZoom: 1 - onScreenZoomChanged: { - Quickshell.execDetached(["hyprctl", "keyword", "cursor:zoom_factor", root.screenZoom.toString()]); - } - Behavior on screenZoom { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - GlobalShortcut { name: "workspaceNumber" description: "Hold to show workspace numbers, release to show icons" @@ -56,16 +48,4 @@ Singleton { root.superDown = false } } - - IpcHandler { - target: "zoom" - - function zoomIn() { - screenZoom = Math.min(screenZoom + 0.4, 3.0) - } - - function zoomOut() { - screenZoom = Math.max(screenZoom - 0.4, 1) - } - } } \ No newline at end of file