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)