mirror of
https://github.com/0intro/wmii
synced 2025-02-20 00:04:37 +03:00
22 lines
507 B
Plaintext
22 lines
507 B
Plaintext
![]() |
MKSHELL=rc
|
||
|
path=$PLAN9/bin $path
|
||
|
|
||
|
eps = wmii.eps
|
||
|
|
||
|
epsbox = `{sed -n '/^%%BoundingBox:/{s/.*://p; q;}' $eps}
|
||
|
iconwidth = 32
|
||
|
iconscale = `{*=$epsbox; hoc -e $iconwidth/'('$3-' '$1')'}
|
||
|
iconheight = `{*=$epsbox; hoc -e '('$4-' '$2')*'$iconscale}
|
||
|
|
||
|
icon.png: $eps
|
||
|
x = `{hoc -e -'('$epsbox(1)^')'}
|
||
|
y = `{hoc -e -'('$epsbox(2)^')'}
|
||
|
gs -q -dBATCH -dNOPAUSE -sDEVICE=pngalpha -sOutputFile=$target -g^$iconwidth^x^$iconheight - <<!
|
||
|
$iconscale $iconscale scale
|
||
|
$x $y translate
|
||
|
($eps) run
|
||
|
showpage
|
||
|
quit
|
||
|
!
|
||
|
|