From fd1bf99e60ef3f75e4b836473daee3a20096ab7a Mon Sep 17 00:00:00 2001 From: depsterr Date: Sun, 13 Oct 2024 21:04:23 +0200 Subject: [PATCH] eyezoom res --- pkgs/eyezoom.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/eyezoom.nix b/pkgs/eyezoom.nix index 0403171..81d4b7a 100644 --- a/pkgs/eyezoom.nix +++ b/pkgs/eyezoom.nix @@ -12,8 +12,10 @@ H="$2" offx="$3" offy="$4" -HFACTOR=10 -WFACTOR=4 +ZH=16384 +ZW=320 + +WDIV=4 WIDEDIV=2 @@ -23,11 +25,11 @@ zoomaccel=-0.9 case "$arg" in eye) - ${pkgs.wmctrl}/bin/wmctrl -R ':ACTIVE:' -e 0,$offx,$(( offy - (H * HFACTOR / 2) + (H / 2) )),$W,$((H*HFACTOR)) + ${pkgs.wmctrl}/bin/wmctrl -R ':ACTIVE:' -e 0,$(( offx - (ZW / 2) + (W / 2) )),$(( offy - (ZH / 2) + (H / 2) )),$ZW,$((ZH)) xinput set-prop "pointer:Logitech MX Vertical" "libinput Accel Speed" $zoomaccel ;; tiktok) - ${pkgs.wmctrl}/bin/wmctrl -R ':ACTIVE:' -e 0,$(( offx - ((W/WFACTOR)/2) + (W/2))),$offy,$((W/WFACTOR)),$H + ${pkgs.wmctrl}/bin/wmctrl -R ':ACTIVE:' -e 0,$(( offx - ((W/WDIV)/2) + (W/2))),$offy,$((W/WDIV)),$H xinput set-prop "pointer:Logitech MX Vertical" "libinput Accel Speed" $normalaccel ;; wide)