From 3c156a51be582ff085ea439ef725538a5ae3bd03 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 9 Mar 2008 20:37:52 +0100 Subject: [PATCH] Determine screen number from $DISPLAY for restarts --- Makefile.am | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index ac4bf48..2c8d90d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -260,9 +260,11 @@ built-sources: $(BUILT_SOURCES) # 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" -- 1.5.4.1