aboutsummaryrefslogtreecommitdiff
path: root/.config/river/autostart.sh
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2024-11-08 20:48:58 +0000
committerJustine Smithies <justine@smithies.me.uk>2024-11-08 20:48:58 +0000
commitc2fbc4d1717864a0055592e0b73d71c010e8686c (patch)
tree76e5bf50cc0f9c1b83f474740a8015d7f4e0ef26 /.config/river/autostart.sh
parentb9d24b3b6bdaed04fab07d9150c51d4f0f7a5c7d (diff)
Initial commit
Diffstat (limited to '.config/river/autostart.sh')
-rwxr-xr-x.config/river/autostart.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/.config/river/autostart.sh b/.config/river/autostart.sh
new file mode 100755
index 0000000..00ea0a5
--- /dev/null
+++ b/.config/river/autostart.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+
+# Authentication dialog
+
+pkill -f /usr/local/libexec/polkit-gnome-authentication-agent-1
+/usr/local/libexec/polkit-gnome-authentication-agent-1 &
+
+# Start xdg-desktop-portal-wlr
+
+pkill -f /usr/local/libexec/xdg-desktop-portal-wlr
+/usr/local/libexec/xdg-desktop-portal-wlr &
+
+# Start Kanshi which also starts Yambar
+pkill -f kanshi
+kanshi &
+
+read -r wallpaper<~/.cache/wallpaper
+pkill -f swaybg
+swaybg -m fill -i "$wallpaper" &
+
+pkill -f mako
+mako &
+
+pkill -f wlsunset
+wlsunset -l 57.4 -L -1.9 &
+
+# Restore previous brightness
+backlight $(grep 'brightness:' ~/.cache/brightness | awk '{print $2}')
+
+export wallpaper=$( echo $wallpaper)
+
+pkill -f swayidle
+swayidle -w \
+ timeout 300 'swaylock -f -i $wallpaper' \
+ timeout 600 'wlopm --off \*;swaylock -F -i $wallpaper' resume 'wlopm --on \*' \
+ before-sleep 'swaylock -f -i $wallpaper' &