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.
This commit is contained in:
parent
72d40a0936
commit
9b662e2609
9 changed files with 45 additions and 12 deletions
8
flameshot/.config/systemd/user/flameshot.service
Normal file
8
flameshot/.config/systemd/user/flameshot.service
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Flameshot
|
||||
|
||||
[Service]
|
||||
ExecStart=flameshot
|
||||
|
||||
[Install]
|
||||
WantedBy=wm.target
|
|
@ -253,3 +253,5 @@ if [ -d "${HOME}/.config/herbstluftwm/autostart.d" ]; then
|
|||
done
|
||||
unset f
|
||||
fi
|
||||
|
||||
systemctl --user start wm.target
|
||||
|
|
3
herbstluftwm/.config/systemd/user/wm.target
Normal file
3
herbstluftwm/.config/systemd/user/wm.target
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Unit]
|
||||
Description=Window Manager
|
||||
Wants=dunst.service
|
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=KDE Connect System Tray Icon
|
||||
|
||||
[Service]
|
||||
ExecStart=kdeconnect-indicator
|
||||
|
||||
[Install]
|
||||
WantedBy=wm.target
|
|
@ -1,2 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
pgrep polybar || { autohide-polybar.sh && polybar "$(hostname)" 2> /dev/null & }
|
8
polybar/.config/systemd/user/polybar.service
Normal file
8
polybar/.config/systemd/user/polybar.service
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Polybar
|
||||
|
||||
[Service]
|
||||
ExecStart=polybar %H
|
||||
|
||||
[Install]
|
||||
WantedBy=wm.target
|
8
syncthing/.config/systemd/user/syncthing-gtk.service
Normal file
8
syncthing/.config/systemd/user/syncthing-gtk.service
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Syncthing Gui
|
||||
|
||||
[Service]
|
||||
ExecStart=syncthing-gtk
|
||||
|
||||
[Install]
|
||||
WantedBy=wm.target
|
8
unclutter/.config/systemd/user/unclutter.service
Normal file
8
unclutter/.config/systemd/user/unclutter.service
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Unclutter: Hide the mouse while typing
|
||||
|
||||
[Service]
|
||||
ExecStart=unclutter
|
||||
|
||||
[Install]
|
||||
WantedBy=wm.target
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue