summaryrefslogblamecommitdiff
path: root/.config/wayland/winit
blob: 1423d45b8a17a994fd0c1f3cc5953f247fb4c1d6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                               
                        
 




                                                        
             

                                             
          
                                                                                   
                                          
                                                                         
                                                                          
#!/bin/sh

# background
swaybg -m fill -i "${XDG_DATA_HOME:-$HOME/.local/share}/wall" &

# notification deamon
mako &

# audio
pipewire &
pipewire-pulse &
sleep 1 && wireplumber &

# wob
wobpipe="${XDG_RUNTIME_DIR:-${TMPDIR:-/tmp}}/wobpipe" &&
mkfifo "$wobpipe" &&
tail -f "$wobpipe" | wob &

# screen lock
disp="$(wlr-randr  | grep  -om1 '^[^ ]*')" &&
timeout=60 && # seconds >5
swayidle \
	timeout "$((timeout - 5))" "brightnessctl --save; brightnessctl set 10%-" \
	resume "brightnessctl --restore" \
	timeout "$timeout" "wlr-randr --output ${disp} --off; swaylock" \
	resume "wlr-randr --output ${disp} --on --adaptive-sync enabled" &