river: Do not always restart kanshi with river

Kanshi used to be restarted every time river would be reloaded.
This is not desired however, as restarting river would also
kill the kanshi daemon, and subsequently reload it, reseting
any custom kanshi output layouts or options set.

With this commit kanshi only gets started if it is not already
running through river (i.e. on first boot most of the time).
This commit is contained in:
Marty Oehme 2023-10-02 19:07:58 +02:00
parent e98d527f5d
commit bad45b937d
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -242,6 +242,9 @@ done
setxkbmap -option "compose:menu"
# start dynamic display configuration
[ "$(pidof kanshi)" -eq 0 ] || riverctl spawn kanshi
# set a nice wallpaper
if exist swww; then
riverctl spawn "swww init"
@ -258,10 +261,6 @@ fi
killall waybar
riverctl spawn waybar
# start dynamic display configuration
killall kanshi
riverctl spawn kanshi
# start redshift-like sundown warming using current location or standard values
killall wlsunset
loc=$(curl ipinfo.io | grep -e '"loc": ' | sed -e 's/^.*"loc": "\(.*\)",$/\1/')