mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
29 lines
931 B
Bash
Executable File
29 lines
931 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Edit, set, or reset screensaver branding
|
|
# omarchy:group=branding
|
|
# omarchy:name=screensaver
|
|
# omarchy:args=<image|text|reset>
|
|
# omarchy:examples=omarchy branding screensaver image | omarchy branding screensaver text | omarchy branding screensaver reset
|
|
|
|
set -euo pipefail
|
|
|
|
case "${1:-}" in
|
|
image)
|
|
image=$(omarchy-menu-file "Logo image" "$HOME" "svg png")
|
|
if [[ -n $image ]] && omarchy-transcode-ascii "$image" ~/.config/omarchy/branding/screensaver.txt; then
|
|
omarchy-launch-screensaver force >/dev/null 2>&1
|
|
fi
|
|
;;
|
|
text)
|
|
omarchy-launch-editor ~/.config/omarchy/branding/screensaver.txt >/dev/null 2>&1 && omarchy-launch-screensaver force >/dev/null 2>&1
|
|
;;
|
|
reset)
|
|
cp "$OMARCHY_PATH/logo.txt" ~/.config/omarchy/branding/screensaver.txt && omarchy-launch-screensaver force >/dev/null 2>&1
|
|
;;
|
|
*)
|
|
echo "Usage: omarchy-branding-screensaver <image|text|reset>" >&2
|
|
exit 1
|
|
;;
|
|
esac
|