resizing generalized
This commit is contained in:
parent
eec0d7e3b7
commit
374ff56179
|
@ -1,17 +1,23 @@
|
|||
{ pkgs, ... }:
|
||||
pkgs.writeScript "eyezoom" ''
|
||||
W=1920
|
||||
H=1080
|
||||
arg="$1"
|
||||
|
||||
offx=1600
|
||||
offy=0
|
||||
set -- $(
|
||||
${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
|
||||
WFACTOR=4
|
||||
|
||||
WIDEDIV=2
|
||||
|
||||
case "$1" in
|
||||
case "$arg" in
|
||||
eye)
|
||||
${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