This commit is contained in:
Rachel Lambda Samuelsson 2024-03-19 20:19:16 +01:00
commit ef0db0af87
4 changed files with 23 additions and 0 deletions

1
default Symbolic link
View File

@ -0,0 +1 @@
eyezoom.sh

1
eye Symbolic link
View File

@ -0,0 +1 @@
eyezoom.sh

20
eyezoom.sh Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
wmctrl=$(nix build --no-link --print-out-paths "nixpkgs#wmctrl")/bin/wmctrl
W=1600
H=1200
HFACTOR=8
WFACTOR=4
case "$0" in
*eye)
$wmctrl -r minecraft -e 0,0,$(( - (H * HFACTOR / 2) + (H / 2) )),$W,$((H*HFACTOR))
;;
*tiktok)
$wmctrl -r minecraft -e 0,$(( - ((W/WFACTOR)/2) + (W/2))),0,$((W/WFACTOR)),$H
;;
*)
$wmctrl -r minecraft -e 0,0,0,$W,$H
;;
esac

1
tiktok Symbolic link
View File

@ -0,0 +1 @@
eyezoom.sh