omarchy/bin/omarchy-toggle-screensaver
Manuel 5381185121
Feature/screensaver toggle instead of launch (#784)
* sceensaver-toggle and run if enabled using state file

* replace commands in menu and hyperidle

* migration file

* sed corrections

* added backup of changed files in migration

* review comments implemented

* hypridle config restore

* Use normal path style

* Use nerdfont icon for notification

* Make executable

* Allow a force start of screensaver so it can run even when disabled when manually triggered

* Add screensaver to system menu now that the toggle actually means toggle

* Known path without expansion spaces

* It should be an error return when it doesn't start

---------

Co-authored-by: Manuel <manuel.ramsaier@gmail.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
2025-08-22 13:10:01 +02:00

13 lines
273 B
Bash
Executable File

#!/bin/bash
STATE_FILE=~/.local/state/omarchy/toggles/screensaver-off
if [[ -f $STATE_FILE ]]; then
rm -f $STATE_FILE
notify-send "󱄄 Screensaver enabled"
else
mkdir -p "$(dirname $STATE_FILE)"
touch $STATE_FILE
notify-send "󱄄 Screensaver disabled"
fi