river: Fix startup procedure process spawning

This commit is contained in:
Marty Oehme 2023-01-07 15:01:12 +01:00
parent c193a90b40
commit 951365bd92
Signed by: Marty
GPG key ID: 73BA40D5AFAF49C9

View file

@ -231,47 +231,53 @@ done
setxkbmap -option "compose:menu"
# set a nice wallpaper
if exist wlopm && exist swww; then
exec swww init &
riverctl spawn "swww init"
if [ -e "$HOME/pictures/wall.jpg" ]; then
swww img "$HOME/pictures/wall.jpg" &
swww img "$HOME/pictures/wall.jpg"
fi
if wlopm | grep -q DP-5 && wlopm | grep -q DP-3 && [ -e "$HOME/pictures/wall_l.jpg" ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
swww img -o DP-5 "$HOME/pictures/wall_l.jpg" &
swww img -o DP-3 "$HOME/pictures/wall_r.jpg" &
swww img -o DP-5 "$HOME/pictures/wall_l.jpg"
swww img -o DP-3 "$HOME/pictures/wall_r.jpg"
fi
fi
# killall mako
# mako &
# start status bar
killall waybar
exec waybar &
riverctl spawn waybar
# start dynamic display configuration
killall kanshi
exec 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/')
if [ -n "$loc" ]; then
riverctl spawn "wlsunset -l \"$(echo "$loc" | cut -d, -f1)\" -L \"$(echo "$loc" | cut -d, -f2)\""
else
riverctl spawn "wlsunset -S \"09:00\" -s \"21:00\" -d \"3600\""
fi
unset loc
# start screen idle locking/dimming/sleep tool
killall swayidle
exec swayidle \
timeout "${time_to_lockscreen}" 'pidof waylock || lockscreen' \
timeout "${time_to_screendim}" 'wlopm --off "*"' \
timeout "${time_to_suspend}" 'systemctl suspend-then-hibernate' \
resume 'wlopm --on "*"' \
after-resume 'wlopm --on "*"' \
before-sleep 'pidof waylock || lockscreen' &
riverctl spawn "swayidle \
timeout ${time_to_lockscreen} 'pidof waylock || lockscreen' \
timeout ${time_to_screendim} 'wlopm --off \"*\"' \
timeout ${time_to_suspend} 'systemctl suspend-then-hibernate' \
resume 'wlopm --on \"*\"' \
after-resume 'wlopm --on \"*\"' \
before-sleep 'pidof waylock || lockscreen' &"
killall clipman
exec wl-paste -t text --watch clipman store &
riverctl spawn "wl-paste -t text --watch clipman store"
# bash ~/.config/bin/gtktheme # setting our gtk variables
# killall polkit-gnome-authentication-agent-1
# /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
# Set and exec into the default layout generator, rivercarro.
# River will send the process group of the init executable SIGTERM on exit.
riverctl default-layout rivercarro &
# start layouting engine
killall rivercarro
exec rivercarro -main-ratio 0.65 &
riverctl spawn "rivercarro -main-ratio 0.65"
# River will send the process group of the init executable SIGTERM on exit.
riverctl default-layout rivercarro
# exec rivercarro -main-ratio 0.65 -view-padding 6 -outer-padding 6 & # -> does not work with current rivercarro version (0.1.4)
brightnessctl set 70%