services: Add desktop environment programs as user services
Added a runit-managed kanshi, swaybg, waybar, wl-paste and wlsunset service.
This commit is contained in:
parent
e08f88db9c
commit
a3f30cf228
11 changed files with 87 additions and 27 deletions
|
|
@ -303,39 +303,43 @@ done
|
|||
|
||||
setxkbmap -option "compose:menu"
|
||||
|
||||
# start dynamic display configuration
|
||||
should_start kanshi && riverctl spawn kanshi
|
||||
# We are not in voidlinux, so no nice turnstile user services will take care of us
|
||||
# have to start everything manually here.
|
||||
if ! cat /etc/*-release | grep -q '^NAME=.*Void'; then
|
||||
# start dynamic display configuration
|
||||
should_start kanshi && riverctl spawn kanshi
|
||||
|
||||
# set a nice wallpaper
|
||||
if exist swaybg; then
|
||||
killall swaybg
|
||||
riverctl spawn "swaybg \
|
||||
# set a nice wallpaper
|
||||
if command -v swaybg >/dev/null 2>&1; then
|
||||
killall swaybg
|
||||
riverctl spawn "swaybg \
|
||||
-o 'LG Electronics W2442 0x000574E1' -i pictures/wall_l.jpg \
|
||||
-o 'LG Electronics W2442 0x000574FD' -i pictures/wall_r.jpg \
|
||||
"
|
||||
elif exist swww; then
|
||||
riverctl spawn "swww-daemon"
|
||||
outputs=$(swww query | cut -d':' -f1)
|
||||
if [ "$(echo "$outputs" | grep -c -e '^DP')" -eq 2 ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
|
||||
swww img -o "$(echo "$outputs" | head -n1)" "$HOME/pictures/wall_l.jpg"
|
||||
swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_r.jpg"
|
||||
elif [ -e "$HOME/pictures/wall.jpg" ]; then
|
||||
swww img "$HOME/pictures/wall.jpg"
|
||||
elif command -v swww >/dev/null 2>&1; then
|
||||
riverctl spawn "swww-daemon"
|
||||
outputs=$(swww query | cut -d':' -f1)
|
||||
if [ "$(echo "$outputs" | grep -c -e '^DP')" -eq 2 ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
|
||||
swww img -o "$(echo "$outputs" | head -n1)" "$HOME/pictures/wall_l.jpg"
|
||||
swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_r.jpg"
|
||||
elif [ -e "$HOME/pictures/wall.jpg" ]; then
|
||||
swww img "$HOME/pictures/wall.jpg"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# start status bar
|
||||
should_start waybar && riverctl spawn waybar
|
||||
|
||||
# start redshift-like sundown warming using current location or standard values
|
||||
if should_start wlsunset; then
|
||||
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\""
|
||||
should_start waybar && riverctl spawn waybar
|
||||
#
|
||||
# start redshift-like sundown warming using current location or standard values
|
||||
if should_start wlsunset; then
|
||||
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
|
||||
fi
|
||||
unset loc
|
||||
|
||||
fi
|
||||
|
||||
# start screen idle locking/dimming/sleep tool
|
||||
|
|
@ -347,7 +351,6 @@ should_start swayidle && riverctl spawn "swayidle \
|
|||
after-resume \"wlopm --on '*'\" \
|
||||
before-sleep \"pidof waylock || lockscreen\" &"
|
||||
|
||||
should_start wl-paste && 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 &
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue