Determine screen number from $DISPLAY for restarts

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Hans Ulrich Niedermann 2008-03-09 20:37:52 +01:00 committed by Julien Danjou
parent f1e4ad09a1
commit 2d454a438a
1 changed files with 4 additions and 2 deletions

View File

@ -256,9 +256,11 @@ endif
# Presuming we are running awesome on this screen, and this is screen 0, ...
# ...we replace the running awesome instance by a freshly compiled one.
restart-uninstalled: awesome awesome-client
echo 0 exec "$${PWD}/awesome" | "$${PWD}/awesome-client"
screen=`echo "$${DISPLAY}" | sed 's/.*:[0-9]\.\([0-9]*\)$$/\1/; s/.*:\([0-9]*\)$$/0/'`; \
echo "$${screen}" exec "$${PWD}/awesome" | "$${PWD}/awesome-client"
# ...we replace the running awesome instance by the last installed one.
restart-installed:
echo 0 exec "$(DESTDIR)$(bindir)/awesome" | "$(DESTDIR)$(bindir)/awesome-client"
screen=`echo "$${DISPLAY}" | sed 's/.*:[0-9]\.\([0-9]*\)$$/\1/; s/.*:\([0-9]*\)$$/0/'`; \
echo "$${screen}" exec "$(DESTDIR)$(bindir)/awesome" | "$(DESTDIR)$(bindir)/awesome-client"