Skip to content

Instantly share code, notes, and snippets.

@cpyxis
cpyxis / afterdark.sh
Created September 19, 2025 04:48 — forked from vdbsh/afterdark.sh
Old-school screensaver functionality for GNOME/Wayland desktops
#!/usr/bin/env bash
# afterdark.sh: Old-school screensaver functionality for GNOME/Wayland desktops
# This script will run arbitrary command after specified time period, if there is no inhibiting applications detected
# Started process will be terminated at the first sight of user activity
# You supposed to launch something like full-screen video or cmatrix :)
start_after=15 # minutes
cmd="mpv /home/test/Videos/after_dark.mp4 --fs --loop --no-osc"
lock_screen=false