summaryrefslogtreecommitdiff
path: root/.config/wayland/winit
diff options
context:
space:
mode:
authorsinanmohd <sinan@firemail.cc>2023-04-01 21:38:15 +0530
committersinanmohd <sinan@firemail.cc>2023-04-01 21:38:15 +0530
commitc1a7fd7bc4fb76589cb843af68d7b5a2d15023ad (patch)
tree8dd12031c726d3827a3ca77af9010f753eb77a56 /.config/wayland/winit
parente9b4421cfb4c642f6a542d14ab434aa61de49567 (diff)
wayland/winit: initial commit
Diffstat (limited to '.config/wayland/winit')
-rwxr-xr-x.config/wayland/winit21
1 files changed, 21 insertions, 0 deletions
diff --git a/.config/wayland/winit b/.config/wayland/winit
new file mode 100755
index 0000000..96d1b7f
--- /dev/null
+++ b/.config/wayland/winit
@@ -0,0 +1,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 && waylock -init-color 0x000000" \
+ resume "wlr-randr --output ${disp} --on && wlr-randr --output ${disp} --adaptive-sync enabled" &