blob: c2be8d7490c6eb1e59ed4062d8b4634c8310c3cb (
plain) (
tree)
|
|
#!/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}')
# Restore audio volume
mixer vol.volume=$(grep 'vol.volume=' ~/.cache/audio-volume | awk -F ':' '{print $2}')
mixer vol.mute=$(grep 'vol.mute=' ~/.cache/audio-volume | awk -F '=' '{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' &
|