Use systemd user unit for long-running stuff

This commit is contained in:
2018-08-20 18:45:35 +02:00
parent dc73231892
commit f0c44fe73b
6 changed files with 6 additions and 6 deletions

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash
dunst -config ~/.config/dunstrc &
systemd-run --remain-after-exit --user --setenv=DISPLAY=${DISPLAY} dunst -config ~/.config/dunstrc &

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
printf '%s\n' "start compton"
compton --backend xrender --vsync opengl &
systemd-run --remain-after-exit --user --setenv=DISPLAY=${DISPLAY} compton --backend xrender --vsync opengl &
printf '%s\n' "disable screen blanking"
xset -dpms &

View File

@@ -3,4 +3,4 @@
wallpaper="$LIBDIR/wallpaper/current"
printf '%s' "setting wallpaper"
feh --bg-scale "${wallpaper}"
systemd-run --remain-after-exit --user --setenv=DISPLAY=${DISPLAY} feh --bg-scale "${wallpaper}"

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
printf '%s' "starting network tray application"
nm-applet &
systemd-run --remain-after-exit --user --setenv=DISPLAY=${DISPLAY} nm-applet

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
printf '%s' "starting pasystray"
pasystray &
systemd-run --remain-after-exit --user --setenv=DISPLAY=${DISPLAY} pasystray

View File

@@ -5,5 +5,5 @@ redshift_lat_long="49.5:11"
redshift_colortemp="6000:3300"
printf '%s' "starting redshift-gtk"
redshift-gtk -b 1 -l "$redshift_lat_long" -t "$redshift_colortemp" &
systemd-run --remain-after-exit --user --setenv=DISPLAY=${DISPLAY} redshift-gtk -b 1 -l "$redshift_lat_long" -t "$redshift_colortemp"
printf '%s' $! > "$RUNDIR"/redshift.${XDG_SESSION_ID}.pid