mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
* improve: uniquely identify btop when launched from waybar. * align btop app id * add migration to uniquely identify btop * also add unique app ids to lazydocker and terminal editor * introduce new omarchy-launch-tui that sets class. * align all the tuis and behaviour in waybar * update migration accordingly * fixes * separate terminal from tui * fix: double setsid uswm-app -- * Standardize namespace on org.omarchy and lowercase --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
30 lines
815 B
Bash
Executable File
30 lines
815 B
Bash
Executable File
#!/bin/bash
|
|
|
|
screensaver_in_focus() {
|
|
hyprctl activewindow -j | jq -e '.class == "org.omarchy.screensaver"' >/dev/null 2>&1
|
|
}
|
|
|
|
exit_screensaver() {
|
|
hyprctl keyword cursor:invisible false
|
|
pkill -x tte 2>/dev/null
|
|
pkill -f org.omarchy.screensaver 2>/dev/null
|
|
exit 0
|
|
}
|
|
|
|
trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT
|
|
|
|
hyprctl keyword cursor:invisible true &>/dev/null
|
|
|
|
while true; do
|
|
effect=$(tte 2>&1 | grep -oP '{\K[^}]+' | tr ',' ' ' | tr ' ' '\n' | sed -n '/^beams$/,$p' | sort -u | shuf -n1)
|
|
tte -i ~/.config/omarchy/branding/screensaver.txt \
|
|
--frame-rate 240 --canvas-width 0 --canvas-height 0 --anchor-canvas c --anchor-text c --no-eol \
|
|
"$effect" &
|
|
|
|
while pgrep -x tte >/dev/null; do
|
|
if read -n 1 -t 3 || ! screensaver_in_focus; then
|
|
exit_screensaver
|
|
fi
|
|
done
|
|
done
|