From 9b662e26095a237357f6294cf96d634bc99dcaa8 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 2 Nov 2021 22:01:31 -0700 Subject: Add systemd services for some background tasks Add a ‘wm.target’ file that services can hook into and that Herbstluftwm starts at the end of its startup script. This way different services can be sure that the window manager itself has started up, and can be dependent on one another. Hopefully this makes managing these background processes easier. --- polybar/.config/herbstluftwm/autostart.d/polybar.sh | 2 -- polybar/.config/systemd/user/polybar.service | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) delete mode 100755 polybar/.config/herbstluftwm/autostart.d/polybar.sh create mode 100644 polybar/.config/systemd/user/polybar.service (limited to 'polybar') diff --git a/polybar/.config/herbstluftwm/autostart.d/polybar.sh b/polybar/.config/herbstluftwm/autostart.d/polybar.sh deleted file mode 100755 index 3dd29ab..0000000 --- a/polybar/.config/herbstluftwm/autostart.d/polybar.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -pgrep polybar || { autohide-polybar.sh && polybar "$(hostname)" 2> /dev/null & } diff --git a/polybar/.config/systemd/user/polybar.service b/polybar/.config/systemd/user/polybar.service new file mode 100644 index 0000000..3e29f3f --- /dev/null +++ b/polybar/.config/systemd/user/polybar.service @@ -0,0 +1,8 @@ +[Unit] +Description=Polybar + +[Service] +ExecStart=polybar %H + +[Install] +WantedBy=wm.target -- cgit v1.2.3-54-g00ecf