From 9786e03de9c14445769c4d04130f6512f16fbb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Tue, 15 Jun 2010 01:53:30 +0200 Subject: Moved to the ebuild-like way --- default | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 default (limited to 'default') diff --git a/default b/default new file mode 100644 index 0000000..29f24c0 --- /dev/null +++ b/default @@ -0,0 +1,39 @@ +# exporting variables +EENV[WINEPREFIX]='eval echo $PREFIX' +ENV[WINEDEBUG]="-all" +ENV[DISPLAY]=":1" + +PREFIX="~/.wine" + +default_execute () { + exc -f startx $BIN -x $GAME -- :1 -ac -br -quiet ${=EXARGS} +} + +default_prepare () { + nvidia-settings -l + + # set display size + [[ -n $SIZE ]] && xrandr -s $SIZE +} + +default_setenv () { + for e v in ${(kv)ENV}; do + exp $e $v + done + + for e v in ${(kv)EENV}; do + exp $e `eval $v` + done +} + +default_run () { + # start game + exc wine start $GPATH "$ARGS" + + # wait for wine to shutdown + exc wineserver -w +} + +EXPORT default execute prepare setenv run + +# vim:ft=zsh -- cgit v1.2.3