aboutsummaryrefslogblamecommitdiff
path: root/.config/river/autostart.sh
blob: 8cc130fc7982553097e63a778e3a5c8688746285 (plain) (tree)
1
2
3
4
5
6
7



                       
                                                         
                                                 
 








                                            
                                    
               
                                
 

             



                          


                                                                                    
                                    



                                                 
                                                                                       
                                                  
#!/bin/bash

# Authentication dialog

pkill -f /usr/libexec/polkit-gnome-authentication-agent-1
/usr/libexec/polkit-mate-authentication-agent-1 &

# 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 &

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
brightnessctl s $(grep 'Current brightness:' ~/.cache/brightness | awk '{print $3}')

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' &