#!/bin/sh # # I find this handy for demos where I can magnify as much of the origonal # screen as possible to the full screen size and specified magnification. # License: LGPLv2 # Note this only allows for the xmag menu on the fullscreen display. # So you should make xmag fullscreen, ie remove titlebar etc (shift+F11 in gnome). test ! -z $1 && setglobal mag = $1 || setglobal mag = '2' proc fullscreen_xmag_source { #could also do: geometry=`xdpyinfo | grep dimensions | tr -s ' ' | cut -d' ' -f3` setglobal geometry = $[xwininfo -root | grep -E "geometry" | sed 's/.* \([0-9]*x[0-9]*\).*/\1/] setglobal width = $[echo $geometry | cut -dx -f1] setglobal height = $[echo $geometry | cut -dx -f2] setglobal xmag_menu = '20' echo $[expr $width / $mag]x$[expr '(' $height - $xmag_menu ')' / $mag] } xmag -source $[fullscreen_xmag_source] -mag $mag