diff options
author | 2021-11-02 22:01:31 -0700 | |
---|---|---|
committer | 2021-11-02 22:06:32 -0700 | |
commit | 9b662e26095a237357f6294cf96d634bc99dcaa8 (patch) | |
tree | 291073bf905d2e0f66f7fac6ee391180743425e7 | |
parent | 72d40a093640b4ef0122c331989258e13fb94c7e (diff) | |
download | new-dotfiles-9b662e26095a237357f6294cf96d634bc99dcaa8.tar.gz new-dotfiles-9b662e26095a237357f6294cf96d634bc99dcaa8.zip |
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.
-rw-r--r-- | flameshot/.config/systemd/user/flameshot.service | 8 | ||||
-rwxr-xr-x | herbstluftwm/.config/herbstluftwm/autostart | 2 | ||||
-rw-r--r-- | herbstluftwm/.config/systemd/user/wm.target | 3 | ||||
-rw-r--r-- | kdeconnect/.config/systemd/user/kdeconnect-indicator.service | 8 | ||||
-rwxr-xr-x | polybar/.config/herbstluftwm/autostart.d/polybar.sh | 2 | ||||
-rw-r--r-- | polybar/.config/systemd/user/polybar.service | 8 | ||||
-rw-r--r-- | syncthing/.config/systemd/user/syncthing-gtk.service | 8 | ||||
-rw-r--r-- | unclutter/.config/systemd/user/unclutter.service | 8 | ||||
-rwxr-xr-x | x11/.xsession | 10 |
9 files changed, 45 insertions, 12 deletions
diff --git a/flameshot/.config/systemd/user/flameshot.service b/flameshot/.config/systemd/user/flameshot.service new file mode 100644 index 0000000..954718d --- /dev/null +++ b/flameshot/.config/systemd/user/flameshot.service @@ -0,0 +1,8 @@ +[Unit] +Description=Flameshot + +[Service] +ExecStart=flameshot + +[Install] +WantedBy=wm.target diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart index b1b00c3..bf011cd 100755 --- a/herbstluftwm/.config/herbstluftwm/autostart +++ b/herbstluftwm/.config/herbstluftwm/autostart @@ -253,3 +253,5 @@ if [ -d "${HOME}/.config/herbstluftwm/autostart.d" ]; then done unset f fi + +systemctl --user start wm.target diff --git a/herbstluftwm/.config/systemd/user/wm.target b/herbstluftwm/.config/systemd/user/wm.target new file mode 100644 index 0000000..5665e68 --- /dev/null +++ b/herbstluftwm/.config/systemd/user/wm.target @@ -0,0 +1,3 @@ +[Unit] +Description=Window Manager +Wants=dunst.service diff --git a/kdeconnect/.config/systemd/user/kdeconnect-indicator.service b/kdeconnect/.config/systemd/user/kdeconnect-indicator.service new file mode 100644 index 0000000..3166c7f --- /dev/null +++ b/kdeconnect/.config/systemd/user/kdeconnect-indicator.service @@ -0,0 +1,8 @@ +[Unit] +Description=KDE Connect System Tray Icon + +[Service] +ExecStart=kdeconnect-indicator + +[Install] +WantedBy=wm.target 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 diff --git a/syncthing/.config/systemd/user/syncthing-gtk.service b/syncthing/.config/systemd/user/syncthing-gtk.service new file mode 100644 index 0000000..305c184 --- /dev/null +++ b/syncthing/.config/systemd/user/syncthing-gtk.service @@ -0,0 +1,8 @@ +[Unit] +Description=Syncthing Gui + +[Service] +ExecStart=syncthing-gtk + +[Install] +WantedBy=wm.target diff --git a/unclutter/.config/systemd/user/unclutter.service b/unclutter/.config/systemd/user/unclutter.service new file mode 100644 index 0000000..78e0996 --- /dev/null +++ b/unclutter/.config/systemd/user/unclutter.service @@ -0,0 +1,8 @@ +[Unit] +Description=Unclutter: Hide the mouse while typing + +[Service] +ExecStart=unclutter + +[Install] +WantedBy=wm.target diff --git a/x11/.xsession b/x11/.xsession index 70efe31..58d40b1 100755 --- a/x11/.xsession +++ b/x11/.xsession @@ -8,13 +8,3 @@ xrdb -cpp m4 -merge "${HOME}/.config/X11/Xresources" \ load_machine_config ".config/X11/machines" load_config_directory ".config/X11/Xsession.d" - -command -v kdeconnect-indicator \ - && (pgrep kdeconnect-indicator \ - || { kdeconnect-indicator & }) - -command -v syncthing-gtk \ - && (pgrep syncthing-gtk \ - || { syncthing-gtk & }) - -command -v unclutter && (pgrep unclutter || unclutter --fork) |