summaryrefslogtreecommitdiff
path: root/.config/wayland/winit
blob: 9a6423b2e68b1fa704a0294473d730750131ef02 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

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

# notification deamon
mako &

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

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