z_mirror/dotfiles

git clone https://git.raiguard.me/z_mirror/dotfiles

Caleb Heuerswayidle: Use chayang to dim the screen prior to blankingef8a9d5

trunk
480 B13 linesraw
1#!/bin/sh
2
3# Blank screen after 5 minutes
4# Lock after 10 minutes
5# Suspend after 15 minutes
6# Disconnect all bluetooth devices before sleeping (temporary fix for instant resume)
7/usr/bin/swayidle -w \
8    timeout 300 'chayang && swaymsg "output * power off"' \
9    resume 'swaymsg "output * power on"' \
10    timeout 600 'swaylock -f' \
11    timeout 900 'systemctl suspend' \
12    before-sleep 'bluetoothctl disconnect; swaylock -f' \
13    after-resume 'swaymsg "output * power on"'