Units for Steam - big picture mode.
authorAuke Kok <auke-jan.h.kok@intel.com>
Mon, 25 Mar 2013 19:37:41 +0000 (12:37 -0700)
committerAuke Kok <auke-jan.h.kok@intel.com>
Mon, 25 Mar 2013 19:40:10 +0000 (12:40 -0700)
These are useful for folks making a "steambox", or just to
close all your other appps while gaming. You can of course

   systemctl --user isolate steam.target

to switch to this.

Note that you probably should still run a window manager by
linking e.g. xfwm4.service into steam.target.wants.

Makefile.am
configure.ac
units/user/steam.service.in [new file with mode: 0644]
units/user/steam.target.in [new file with mode: 0644]

index 77df586..09b34d2 100644 (file)
@@ -50,6 +50,11 @@ systemduserunit_DATA += \
        units/user/openbox.target \
        units/user/openbox.service
 endif
+if HAVE_STEAM
+systemduserunit_DATA += \
+       units/user/steam.target \
+       units/user/steam.service
+endif
 
 
 
@@ -85,4 +90,8 @@ if HAVE_OPENBOX
        $(mkinstalldirs) $(DESTDIR)$(SYSTEMDUSERUNITDIR)/openbox.target.wants
        ln -sf ../openbox.service $(DESTDIR)$(SYSTEMDUSERUNITDIR)/openbox.target.wants/
 endif
+if HAVE_STEAM
+       $(mkinstalldirs) $(DESTDIR)$(SYSTEMDUSERUNITDIR)/steam.target.wants
+       ln -sf ../steam.service $(DESTDIR)$(SYSTEMDUSERUNITDIR)/steam.target.wants/
+endif
 
index 5c72617..b857f8f 100644 (file)
@@ -64,6 +64,10 @@ AC_CHECK_PROG([OPENBOX_PROG], [openbox], [`which openbox`], [], [], [])
 AC_SUBST(OPENBOX_PROG)
 AM_CONDITIONAL([HAVE_OPENBOX], [test -n "$OPENBOX_PROG"])
 
+AC_CHECK_PROG([STEAM_PROG], [steam], [`which steam`], [], [], [])
+AC_SUBST(STEAM_PROG)
+AM_CONDITIONAL([HAVE_STEAM], [test -n "$STEAM_PROG"])
+
 AC_OUTPUT([
 units/system/user-session@.service
 units/system/systemd-stop-user-sessions.service
@@ -84,4 +88,6 @@ units/user/mythtv.target
 units/user/mythfrontend.service
 units/user/openbox.target
 units/user/openbox.service
+units/user/steam.target
+units/user/steam.service
 ])
diff --git a/units/user/steam.service.in b/units/user/steam.service.in
new file mode 100644 (file)
index 0000000..b11be89
--- /dev/null
@@ -0,0 +1,11 @@
+
+[Unit]
+Description=Steam - Big Picture mode
+After=xorg.target
+Requires=dbus.socket
+
+[Service]
+ExecStart=@STEAM_PROG@ steam://open/bigpicture
+
+[Install]
+WantedBy=steam.target
diff --git a/units/user/steam.target.in b/units/user/steam.target.in
new file mode 100644 (file)
index 0000000..bf64d8f
--- /dev/null
@@ -0,0 +1,6 @@
+
+[Unit]
+Description=Steam fullscreen Desktop Environment
+Wants=xorg.target
+Requires=dbus.socket
+AllowIsolate=true