Use systemd user unit for long-running stuff
This commit is contained in:
@@ -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 &
|
||||
|
||||
@@ -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 &
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
printf '%s' "starting pasystray"
|
||||
pasystray &
|
||||
systemd-run --remain-after-exit --user --setenv=DISPLAY=${DISPLAY} pasystray
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user