Files
Nomarchy/bin/utils/nomarchy-cmd-screensaver
Bernardo Magri 64c1dc937d chore(branding): update fastfetch ASCII icon and fix branding typos
- Optimized assets/branding/icon.txt with multi-color placeholders for fastfetch.
- Updated config/fastfetch/config.jsonc to use the new multi-colored icon.
- Added icon and svg branding assets to modules/home/theme-files.nix.
- Fixed 'Nnomarchy' typo to 'Nomarchy' and updated branding paths in several scripts.
- Corrected screensaver and welcome scripts to use the centralized branding assets.
2026-04-05 11:06:42 +01:00

37 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
# Run the Nomarchy screensaver using random effects from TTE.
screensaver_in_focus() {
hyprctl activewindow -j | jq -e '.class == "org.nomarchy.screensaver"' >/dev/null 2>&1
}
exit_screensaver() {
hyprctl keyword cursor:invisible false &>/dev/null || true
pkill -x tte 2>/dev/null
pkill -f org.nomarchy.screensaver 2>/dev/null
exit 0
}
# Exit the screensaver on signals and input from keyboard and mouse
trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT
printf '\033]11;rgb:00/00/00\007' # Set background color to black
hyprctl keyword cursor:invisible true &>/dev/null
tty=$(tty 2>/dev/null)
while true; do
tte -i ~/.config/nomarchy/branding/logo.txt \
--frame-rate 120 --canvas-width 0 --canvas-height 0 --reuse-canvas --anchor-canvas c --anchor-text c\
--random-effect --exclude-effects dev_worm \
--no-eol --no-restore-cursor &
while pgrep -t "${tty#/dev/}" -x tte >/dev/null; do
if read -n1 -t 1 || ! screensaver_in_focus; then
exit_screensaver
fi
done
done