Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bin/omarchy
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ GROUP_DESCRIPTIONS[remove]="Removal workflows"
GROUP_DESCRIPTIONS[restart]="Restart Omarchy components"
GROUP_DESCRIPTIONS[setup]="Interactive setup wizards"
GROUP_DESCRIPTIONS[shell]="Omarchy shell IPC helpers"
GROUP_DESCRIPTIONS[screensaver]="Screensaver branding and animation"
GROUP_DESCRIPTIONS[snapshot]="System snapshots"
GROUP_DESCRIPTIONS[sudo]="Sudo configuration helpers"
GROUP_DESCRIPTIONS[system]="System status, reboot, shutdown, logout, and lock"
Expand Down
14 changes: 7 additions & 7 deletions bin/omarchy-debug-idle
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ journalctl -t omarchy-shell -n "$lines" --no-pager --quiet 2>/dev/null || true

section "Relevant processes"
ps -eo pid=,args= \
| grep -E 'quickshell -n -p|omarchy-system-sleep-monitor|systemd-inhibit.*Lock screen before suspend|org\.omarchy\.screensaver|omarchy-screensaver|(^|/| )ttfx( |$)' \
| grep -E 'quickshell -n -p|omarchy-system-sleep-monitor|systemd-inhibit.*Lock screen before suspend|omarchy-screensaver' \
| grep -v grep || true

section "Sleep lock service"
systemctl --user status omarchy-sleep-lock.service --no-pager 2>/dev/null || true

section "Hyprland screensaver clients"
hyprctl clients -j 2>/dev/null \
| jq -r '.[] | select(.class == "org.omarchy.screensaver" or .initialClass == "org.omarchy.screensaver") | [.pid,.class,.initialClass,.title,.focusHistoryID] | @tsv' || true
section "Hyprland screensaver layers"
hyprctl layers -j 2>/dev/null \
| jq -r '.. | objects | select(.namespace? == "org.omarchy.screensaver") | [.pid,.namespace,.x,.y,.w,.h] | @tsv' || true

section "Idle inhibitors"
hyprctl clients -j 2>/dev/null \
| jq -r '.[] | select(.inhibitingIdle == true or ((.tags // []) | index("noidle"))) | [.pid,.class,.title,((.tags // []) | join(",")),.inhibitingIdle] | @tsv' || true

section "Screensaver detector"
if hyprctl clients -j 2>/dev/null | jq -e '.[] | select(.class == "org.omarchy.screensaver" or .initialClass == "org.omarchy.screensaver")' >/dev/null; then
echo "running-window"
elif pgrep -f '[o]rg.omarchy.screensaver' >/dev/null; then
if hyprctl layers -j 2>/dev/null | jq -e '[.. | objects | select(.namespace? == "org.omarchy.screensaver")] | length > 0' >/dev/null; then
echo "running-layer"
elif pgrep -f '[/]usr/lib/omarchy-screensaver/omarchy-screensaver' >/dev/null; then
echo "running-process"
elif omarchy-toggle-enabled screensaver-off; then
echo "disabled"
Expand Down
93 changes: 3 additions & 90 deletions bin/omarchy-launch-screensaver
Original file line number Diff line number Diff line change
@@ -1,93 +1,6 @@
#!/bin/bash

# omarchy:summary=Launch the Omarchy screensaver in the default terminal on the system with the correct font configuration.
# omarchy:summary=Launch the Omarchy screensaver on every display.
# omarchy:args=[force] [options]

# Exit early if screensaver is already running
pgrep -f '[o]rg.omarchy.screensaver' && exit 0

# Allow screensaver to be turned off but also force started
if omarchy-toggle-enabled screensaver-off && [[ $1 != "force" ]]; then
exit 1
fi

focused=$(omarchy-hyprland-monitor-focused)
terminal=$(xdg-terminal-exec --print-id)

case $terminal in
*Alacritty* | *ghostty* | *foot* | *kitty*) ;;
*)
omarchy-notification-send -g ✋ "$(omarchy-i18n screensaver.terminalOnly)"
exit 1
;;
esac

hypr_focus_monitor() {
hyprctl dispatch "hl.dsp.focus({ monitor = \"$1\" })" >/dev/null 2>&1 || hyprctl dispatch focusmonitor "$1" >/dev/null
}

hypr_exec() {
local command
printf -v command '%q ' "$@"

hyprctl dispatch "hl.dsp.exec_cmd([[[workspace $workspace] $command]])" >/dev/null 2>&1 ||
hyprctl dispatch exec -- "[workspace $workspace]" bash -lc "$command" >/dev/null
}

SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"

# Focusing each monitor moves the pointer, so the screensavers ignore pointer
# movement while this marker exists.
launching="$XDG_RUNTIME_DIR/omarchy-screensaver-launching"
touch "$launching"
trap 'rm -f "$launching"' EXIT

# Open Hyprland's event stream before spawning anything, so a terminal that maps
# quickly can't emit its openwindow event before we are listening for it.
exec {events}< <(socat -U - "UNIX-CONNECT:$SOCKET")

# hypr_exec is async and a new window maps on whatever monitor is focused at that
# moment. Block until this monitor's screensaver actually opens before moving
# focus on -- otherwise slow-starting terminals all pile onto the last monitor.
# The deadline is a safety net in case the window never appears.
wait_for_screensaver_window() {
local line deadline=$((SECONDS + 5))
while ((SECONDS < deadline)) && IFS= read -r -t $((deadline - SECONDS)) -u "$events" line; do
[[ $line == openwindow\>\>*,org.omarchy.screensaver,* ]] && return 0
done
}

while read -r m special; do
hypr_focus_monitor "$m"
# Share a special workspace that is already showing, like the scratchpad, so it is still open afterwards.
workspace=${special:-special:screensaver-$m}

case $terminal in
*Alacritty*)
hypr_exec alacritty --class=org.omarchy.screensaver --config-file "$OMARCHY_PATH/default/alacritty/screensaver.toml" -e omarchy-screensaver
;;
*ghostty*)
hypr_exec ghostty --class=org.omarchy.screensaver --config-file="$OMARCHY_PATH/default/ghostty/screensaver" --font-size=18 -e omarchy-screensaver
;;
*foot*)
hypr_exec foot --app-id=org.omarchy.screensaver --config="$OMARCHY_PATH/default/foot/screensaver.ini" -e omarchy-screensaver
;;
*kitty*)
hypr_exec kitty --class=org.omarchy.screensaver --override font_size=18 --override window_padding_width=0 -e omarchy-screensaver
;;
esac

wait_for_screensaver_window
done < <(hyprctl monitors -j | jq -r '.[] | "\(.name) \(.specialWorkspace.name)"')

hypr_focus_monitor "$focused"
rm -f "$launching"

# Emptying a special workspace focuses its monitor, so the last screensaver to close would take focus
# with it. Hand focus back to the monitor that had it once they are all gone.
# The class goes through the environment, since in argv the screensaver's pgrep and pkill would match it.
(
while hyprctl clients -j | SCREENSAVER=org.omarchy.screensaver jq -e 'any(.[]; .mapped and .class == env.SCREENSAVER)' >/dev/null; do
IFS= read -r -u "$events" line || exit
done
hypr_focus_monitor "$focused"
) >/dev/null 2>&1 &
exec /usr/lib/omarchy-screensaver/omarchy-screensaver "$@"
69 changes: 0 additions & 69 deletions bin/omarchy-screensaver

This file was deleted.

10 changes: 6 additions & 4 deletions bin/omarchy-system-lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ if pgrep -x "1password" >/dev/null && omarchy-cmd-present 1password; then
fi

# Avoid running screensaver when locked
pkill -x ttfx 2>/dev/null || true
# ttfx handles SIGTERM asynchronously, so keep its terminal alive until it exits.
timeout 1s pidwait -x ttfx 2>/dev/null || true
pkill -f '[o]rg.omarchy.screensaver' 2>/dev/null || true
screensaver='[/]usr/lib/omarchy-screensaver/omarchy-screensaver'
if pkill -f "$screensaver" 2>/dev/null; then
timeout 1s pidwait -f "$screensaver" 2>/dev/null || pkill -KILL -f "$screensaver" 2>/dev/null || true
# It hid the cursor, and a killed or failed exit leaves it hidden.
hyprctl eval 'hl.config({ cursor = { invisible = false } })' >/dev/null 2>&1 || hyprctl keyword cursor:invisible false >/dev/null 2>&1 || true
fi
11 changes: 0 additions & 11 deletions default/alacritty/screensaver.toml

This file was deleted.

7 changes: 0 additions & 7 deletions default/foot/screensaver.ini

This file was deleted.

3 changes: 0 additions & 3 deletions default/ghostty/screensaver

This file was deleted.

8 changes: 0 additions & 8 deletions default/hypr/apps/system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ o.window("org.omarchy.about", { size = { 920, 480 } })

o.window("omacalc", { float = true })

-- Fullscreen screensaver.
o.window("org.omarchy.screensaver", { fullscreen = true })
o.window("org.omarchy.screensaver", { float = true })
o.window("org.omarchy.screensaver", { animation = "slide" })
-- The launcher picks each screensaver's workspace. A terminal mapped again as it closes lands out of sight instead,
-- where its fullscreen rule cannot take fullscreen from a window.
o.window("org.omarchy.screensaver", { workspace = "special:screensaver silent" })

-- Popped window rounding.
o.window({ tag = "pop" }, { rounding = 8 })

Expand Down
1 change: 0 additions & 1 deletion default/i18n/ar/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@
"reset.willErase": "سيؤدي هذا إلى مسح ما يلي نهائيًا:",
"screensaver.disabled": "عُطّلت شاشة التوقف",
"screensaver.enabled": "فُعّلت شاشة التوقف",
"screensaver.terminalOnly": "تعمل شاشة التوقف فقط في Alacritty، Foot، Ghostty، أو Kitty",
"setupForm.confirmPlaceholder": "يجب أن تطابق كلمة المرور التي كتبتها للتو",
"setupForm.confirmPrompt": "تأكيد> ",
"setupForm.hostnameInvalid": "يجب أن يتكون اسم المضيف من 1-63 حرفًا أو رقمًا أو شرطة، ولا يمكن أن يبدأ أو ينتهي بشرطة",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/bg/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"reset.willErase": "Това ще изтрие завинаги:",
"screensaver.disabled": "Скрийнсейвърът е изключен",
"screensaver.enabled": "Скрийнсейвърът е включен",
"screensaver.terminalOnly": "Скрийнсейвърът работи само в Alacritty, Foot, Ghostty или Kitty",
"setupForm.confirmPlaceholder": "Трябва да съвпада с току-що въведената парола",
"setupForm.confirmPrompt": "Потвърди> ",
"setupForm.hostnameInvalid": "Името трябва да е 1–63 букви, цифри или тирета, без тире в началото или края",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/bn/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"reset.willErase": "এতে স্থায়ীভাবে মুছে যাবে:",
"screensaver.disabled": "স্ক্রিনসেভার বন্ধ",
"screensaver.enabled": "স্ক্রিনসেভার চালু",
"screensaver.terminalOnly": "স্ক্রিনসেভার শুধু Alacritty, Foot, Ghostty, বা Kitty-তে চলে",
"setupForm.confirmPlaceholder": "এইমাত্র টাইপ করা পাসওয়ার্ডের সঙ্গে মিলতে হবে",
"setupForm.confirmPrompt": "নিশ্চিত করুন> ",
"setupForm.hostnameInvalid": "হোস্টনাম 1-63টি অক্ষর, সংখ্যা বা ড্যাশের হতে হবে, এবং শুরু বা শেষে ড্যাশ থাকতে পারবে না",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/ca/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@
"reset.willErase": "Això esborrarà permanentment:",
"screensaver.disabled": "Salvapantalles desactivat",
"screensaver.enabled": "Salvapantalles activat",
"screensaver.terminalOnly": "El salvapantalles només funciona a Alacritty, Foot, Ghostty o Kitty",
"setupForm.confirmPlaceholder": "Ha de coincidir amb la contrasenya que has escrit",
"setupForm.confirmPrompt": "Confirma> ",
"setupForm.hostnameInvalid": "El nom ha de tenir d'1 a 63 lletres, xifres o guions, sense guió al principi ni al final",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/cs/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@
"reset.willErase": "Tím se natrvalo vymaže:",
"screensaver.disabled": "Spořič obrazovky vypnut",
"screensaver.enabled": "Spořič obrazovky zapnut",
"screensaver.terminalOnly": "Spořič běží jen v Alacritty, Foot, Ghostty nebo Kitty",
"setupForm.confirmPlaceholder": "Zadejte stejné heslo ještě jednou",
"setupForm.confirmPrompt": "Potvrzení> ",
"setupForm.hostnameInvalid": "Název: 1-63 písmen, číslic nebo pomlček, nesmí začínat ani končit pomlčkou",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/da/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"reset.willErase": "Dette sletter permanent:",
"screensaver.disabled": "Pauseskærm deaktiveret",
"screensaver.enabled": "Pauseskærm aktiveret",
"screensaver.terminalOnly": "Pauseskærmen kører kun i Alacritty, Foot, Ghostty eller Kitty",
"setupForm.confirmPlaceholder": "Skal matche den adgangskode, du lige har skrevet",
"setupForm.confirmPrompt": "Bekræft> ",
"setupForm.hostnameInvalid": "Værtsnavn: 1-63 bogstaver, tal eller bindestreger, ikke bindestreg først eller sidst",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/de/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"reset.willErase": "Folgendes wird dauerhaft gelöscht:",
"screensaver.disabled": "Bildschirmschoner deaktiviert",
"screensaver.enabled": "Bildschirmschoner aktiviert",
"screensaver.terminalOnly": "Bildschirmschoner läuft nur in Alacritty, Foot, Ghostty oder Kitty",
"setupForm.confirmPlaceholder": "Muss mit dem eben eingegebenen Passwort übereinstimmen",
"setupForm.confirmPrompt": "Bestätigen> ",
"setupForm.hostnameInvalid": "Hostname: 1-63 Buchstaben, Ziffern oder Bindestriche, kein Bindestrich am Anfang oder Ende",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/el/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"reset.willErase": "Αυτό θα διαγράψει οριστικά:",
"screensaver.disabled": "Η προφύλαξη οθόνης απενεργοποιήθηκε",
"screensaver.enabled": "Η προφύλαξη οθόνης ενεργοποιήθηκε",
"screensaver.terminalOnly": "Η προφύλαξη οθόνης λειτουργεί μόνο σε Alacritty, Foot, Ghostty ή Kitty",
"setupForm.confirmPlaceholder": "Πρέπει να ταιριάζει με τον κωδικό που μόλις έγραψες",
"setupForm.confirmPrompt": "Επιβεβαίωση> ",
"setupForm.hostnameInvalid": "1-63 γράμματα, αριθμοί ή παύλες, χωρίς παύλα στην αρχή ή στο τέλος",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/en/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"reset.willErase": "This will permanently erase:",
"screensaver.disabled": "Screensaver disabled",
"screensaver.enabled": "Screensaver enabled",
"screensaver.terminalOnly": "Screensaver only runs in Alacritty, Foot, Ghostty, or Kitty",
"setupForm.confirmPlaceholder": "Must match the password you just typed",
"setupForm.confirmPrompt": "Confirm> ",
"setupForm.hostnameInvalid": "Hostname must be 1-63 letters, digits, or dashes, and cannot start or end with a dash",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/es-MX/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@
"reset.willErase": "Esto borrará permanentemente:",
"screensaver.disabled": "Protector de pantalla desactivado",
"screensaver.enabled": "Protector de pantalla activado",
"screensaver.terminalOnly": "El protector de pantalla solo funciona en Alacritty, Foot, Ghostty o Kitty",
"setupForm.confirmPlaceholder": "Debe coincidir con la contraseña que escribiste",
"setupForm.confirmPrompt": "Confirmar> ",
"setupForm.hostnameInvalid": "El nombre debe tener de 1 a 63 letras, números o guiones, sin guion al inicio ni al final",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/et/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"reset.willErase": "See kustutab jäädavalt:",
"screensaver.disabled": "Ekraanisäästja keelatud",
"screensaver.enabled": "Ekraanisäästja lubatud",
"screensaver.terminalOnly": "Ekraanisäästja töötab ainult Alacritty, Foot, Ghostty või Kitty terminalis",
"setupForm.confirmPlaceholder": "Peab kattuma äsja sisestatud parooliga",
"setupForm.confirmPrompt": "Kinnita> ",
"setupForm.hostnameInvalid": "Hostinimi: 1-63 tähte, numbrit või sidekriipsu, mitte sidekriips alguses ega lõpus",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/fa/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"reset.willErase": "این موارد برای همیشه پاک خواهند شد:",
"screensaver.disabled": "محافظ صفحه غیرفعال شد",
"screensaver.enabled": "محافظ صفحه فعال شد",
"screensaver.terminalOnly": "محافظ صفحه فقط در Alacritty، Foot، Ghostty یا Kitty اجرا می‌شود",
"setupForm.confirmPlaceholder": "باید با گذرواژه‌ای که تازه وارد کردید مطابقت داشته باشد",
"setupForm.confirmPrompt": "تأیید> ",
"setupForm.hostnameInvalid": "نام میزبان باید 1-63 حرف، رقم یا خط تیره باشد و نمی‌تواند با خط تیره شروع یا تمام شود",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/fi/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"reset.willErase": "Tämä poistaa pysyvästi:",
"screensaver.disabled": "Näytönsäästäjä pois käytöstä",
"screensaver.enabled": "Näytönsäästäjä käytössä",
"screensaver.terminalOnly": "Näytönsäästäjä toimii vain päätteissä Alacritty, Foot, Ghostty tai Kitty",
"setupForm.confirmPlaceholder": "Kirjoita sama salasana uudelleen",
"setupForm.confirmPrompt": "Vahvista> ",
"setupForm.hostnameInvalid": "Koneen nimi: 1-63 kirjainta, numeroa tai yhdysmerkkiä, ei yhdysmerkkiä alussa tai lopussa",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/fil/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"reset.willErase": "Permanente nitong buburahin:",
"screensaver.disabled": "Naka-disable ang screensaver",
"screensaver.enabled": "Naka-enable ang screensaver",
"screensaver.terminalOnly": "Gumagana lang ang screensaver sa Alacritty, Foot, Ghostty, o Kitty",
"setupForm.confirmPlaceholder": "Dapat tugma sa password na kaka-type mo lang",
"setupForm.confirmPrompt": "Kumpirmahin> ",
"setupForm.hostnameInvalid": "Dapat 1-63 titik, numero, o gitling ang hostname, at hindi nagsisimula o nagtatapos sa gitling",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/fr/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@
"reset.willErase": "Ceci effacera définitivement :",
"screensaver.disabled": "Écran de veille désactivé",
"screensaver.enabled": "Écran de veille activé",
"screensaver.terminalOnly": "L'écran de veille ne fonctionne que dans Alacritty, Foot, Ghostty ou Kitty",
"setupForm.confirmPlaceholder": "Doit correspondre au mot de passe saisi",
"setupForm.confirmPrompt": "Confirmer> ",
"setupForm.hostnameInvalid": "Le nom d'hôte doit faire 1 à 63 lettres, chiffres ou tirets, sans tiret au début ni à la fin",
Expand Down
1 change: 0 additions & 1 deletion default/i18n/ga/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@
"reset.willErase": "Scriosfaidh sé seo go buan:",
"screensaver.disabled": "Coigilteoir scáileáin díchumasaithe",
"screensaver.enabled": "Coigilteoir scáileáin cumasaithe",
"screensaver.terminalOnly": "Ní ritheann an coigilteoir scáileáin ach in Alacritty, Foot, Ghostty, nó Kitty",
"setupForm.confirmPlaceholder": "Caithfidh sé a bheith mar an gcéanna leis an bpasfhocal",
"setupForm.confirmPrompt": "Deimhnigh> ",
"setupForm.hostnameInvalid": "1-63 litir, digit nó fleiscín, gan fleiscín ag an tús ná ag an deireadh",
Expand Down
Loading
Loading