Files
arthur-os/bin/omarchy-plymouth-set-by-theme
d2a4cc0c4d Add omarchy CLI (#5477)
* Add omarchy CLI

* Remove outdated or internal

* Add bash completions for command

* Add omarchy command documentation

* Add missing docs

* Correct to what's now right

* Fix tests

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
2026-05-01 17:40:22 +02:00

27 lines
717 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Set the Plymouth boot theme from an Omarchy theme
# omarchy:args=<theme-name>
# omarchy:requires-sudo=true
# Resolve a theme by name and apply its unlock.png + colors.toml as the
# Plymouth boot screen via omarchy-plymouth-set.
if [[ $# -ne 1 ]]; then
echo "Usage: omarchy-plymouth-set-by-theme <theme-name>" >&2
exit 1
fi
theme=$1
if [[ -d ~/.config/omarchy/themes/$theme ]]; then
theme_dir=~/.config/omarchy/themes/$theme
else
theme_dir="$OMARCHY_PATH/themes/$theme"
fi
bg=$(awk -F'"' '/^background/{print $2}' "$theme_dir/colors.toml")
text=$(awk -F'"' '/^foreground/{print $2}' "$theme_dir/colors.toml")
exec omarchy-plymouth-set "$bg" "$text" "$theme_dir/unlock.png"