From 03c54fcbae1227ef298127f3f6af3521bff00768 Mon Sep 17 00:00:00 2001 From: Adam <56338480+adastx@users.noreply.github.com> Date: Mon, 25 Jul 2022 23:05:52 +0200 Subject: Use xidlehook for screensaver/suspend --- .config/X11/xinitrc | 1 + .local/bin/screensaver | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100755 .local/bin/screensaver diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc index 1974bd9..c69ca99 100755 --- a/.config/X11/xinitrc +++ b/.config/X11/xinitrc @@ -44,4 +44,5 @@ nextcloud --background & ~/.local/bin/picom-toggle & ~/.local/bin/no-rgb & ~/.local/bin/rate & +~/.local/bin/screensaver & exec i3 diff --git a/.local/bin/screensaver b/.local/bin/screensaver new file mode 100755 index 0000000..7ae5ca7 --- /dev/null +++ b/.local/bin/screensaver @@ -0,0 +1,9 @@ +#!/bin/sh + +xset -dpms +xset s off + +xidlehook \ + --detect-sleep --not-when-audio --not-when-fullscreen \ + --timer 600 'xset s activate' '' \ + --timer 600 'systemctl suspend' '' & -- cgit v1.2.3-70-g09d2