diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2012-09-10 23:59:29 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2012-09-10 23:59:29 +0200 |
commit | 878b439fb9dda53e3159ae6e21775d1c22f8643d (patch) | |
tree | 95880e642305a5b2dd1f605ba79694c8e5dc315a /play.sh | |
parent | 57120b3a90eaccd38b2c94dd16efee8c5eac05e1 (diff) | |
download | play-878b439fb9dda53e3159ae6e21775d1c22f8643d.tar.gz play-878b439fb9dda53e3159ae6e21775d1c22f8643d.tar.bz2 play-878b439fb9dda53e3159ae6e21775d1c22f8643d.zip |
Split 'prepare' in setupX and prepare -- this allows to cleanup even after killing X
Diffstat (limited to 'play.sh')
-rwxr-xr-x | play.sh | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -149,13 +149,13 @@ ENV[DISPLAY]=":1" # phase functions {{{1 # Array of phases -PHASES=(startX setenv run prepare cleanup) +PHASES=(setenv prepare setupX startX run cleanup) declare -r PHASES # starts a new X # if overridden, this MUST call `$BIN --in-X` play_startX () { - exc -e startx $BIN --in-X $GAME -- $DISPLAY -ac -br -quiet ${=EXARGS} + exc startx $BIN --in-X $GAME -- $DISPLAY -ac -br -quiet ${=EXARGS} } # populate the environment @@ -189,12 +189,16 @@ play_run () { exc wineserver -w } -# prepare things for the game, e.g. mount ISOs -play_prepare () { +# manipulate the newly created X instance +play_setupX () { # set display size [[ -n $SIZE ]] && exc xrandr -s $SIZE } +# prepare things for the game, e.g. mount ISOs +play_prepare () { +} + # cleanup after yourself play_cleanup () { } @@ -262,9 +266,8 @@ EOF _continue_in_X () { # {{{2 _load - prepare + setupX run - cleanup } _run () { #{{{2 @@ -282,7 +285,9 @@ _run () { #{{{2 out "Launching '$GAME'" _load setenv + prepare startX + cleanup fi } |