aboutsummaryrefslogtreecommitdiff
path: root/.config/river/autostart.sh
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2023-10-11 18:21:52 +0100
committerJustine Smithies <justine@smithies.me.uk>2023-10-11 18:21:52 +0100
commit786f9c22fab19de866566de4c7933aef416a1462 (patch)
tree512c3563b43a511171979604d6a2a09a4b68c50a /.config/river/autostart.sh
parentba6e0a870faa3306b1e15bd03460b2faa30ceb37 (diff)
Switched to River
Diffstat (limited to '.config/river/autostart.sh')
-rwxr-xr-x.config/river/autostart.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/.config/river/autostart.sh b/.config/river/autostart.sh
new file mode 100755
index 0000000..758fefa
--- /dev/null
+++ b/.config/river/autostart.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# Authentication dialog
+
+pkill -f /usr/libexec/polkit-gnome-authentication-agent-1
+/usr/libexec/polkit-gnome-authentication-agent-1 &
+
+# Kill any existing pipewire / wireplumber daemons and only then try to start a new set.
+
+pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
+dbus-run-session pipewire &> /dev/null &
+
+# Start xdg-desktop-portal-wlr
+
+pkill -f /usr/libexec/xdg-desktop-portal-wlr
+/usr/libexec/xdg-desktop-portal-wlr &
+
+# Start Kanshi which also starts Yambar
+pkill -f kanshi
+kanshi &
+
+pkill -f swaybg
+swaybg -m fill -i ~/.cache/wallpaper &
+
+pkill -f dunst
+dunst &
+
+pkill -f wlsunset
+wlsunset -l 57.4 -L -1.9 &
+
+export wallpaper='~/.cache/wallpaper'
+
+pkill -f swayidle
+swayidle -w \
+ timeout 300 'swaylock -f -i $wallpaper' \
+ timeout 600 'wlopm --off \*;swaylock -F -i ~/.cache/wallpaper' resume 'wlopm --on \*' \
+ before-sleep 'swaylock -f -i $wallpaper' &