resizing generalized
This commit is contained in:
parent
eec0d7e3b7
commit
374ff56179
|
@ -1,17 +1,23 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
pkgs.writeScript "eyezoom" ''
|
pkgs.writeScript "eyezoom" ''
|
||||||
W=1920
|
arg="$1"
|
||||||
H=1080
|
|
||||||
|
|
||||||
offx=1600
|
set -- $(
|
||||||
offy=0
|
${pkgs.xorg.xrandr}/bin/xrandr |
|
||||||
|
${pkgs.gawk}/bin/awk -F "[x+ ]" '/primary/ { print $4" "$5" "$6" "$7 }'
|
||||||
|
)
|
||||||
|
|
||||||
|
W="$1"
|
||||||
|
H="$2"
|
||||||
|
offx="$3"
|
||||||
|
offy="$4"
|
||||||
|
|
||||||
HFACTOR=10
|
HFACTOR=10
|
||||||
WFACTOR=4
|
WFACTOR=4
|
||||||
|
|
||||||
WIDEDIV=2
|
WIDEDIV=2
|
||||||
|
|
||||||
case "$1" in
|
case "$arg" in
|
||||||
eye)
|
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,$(( offy - (H * HFACTOR / 2) + (H / 2) )),$W,$((H*HFACTOR))
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user