eyezoom/eyezoom.sh

21 lines
399 B
Bash
Executable File

#!/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