Restore Unlock screen selection to the Style menu
Bring back per-theme Plymouth unlock theming, dropped when walker + elephant were removed. Selection now uses the same image carousel as the theme and background switchers instead of a name list. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
c544440469
commit
d411c90a2a
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Show which theme is styling the Plymouth boot screen
|
||||
# omarchy:examples=omarchy plymouth current
|
||||
|
||||
# omarchy-plymouth-set installs the theme's unlock.png as a byte-for-byte
|
||||
# copy of logo.png, so matching it back identifies the current theme.
|
||||
installed_logo=/usr/share/plymouth/themes/omarchy/logo.png
|
||||
|
||||
if cmp -s "$OMARCHY_PATH/default/plymouth/logo.png" "$installed_logo"; then
|
||||
echo default
|
||||
exit
|
||||
fi
|
||||
|
||||
omarchy-plymouth-list | while read -r name; do
|
||||
if [[ -d ~/.config/omarchy/themes/$name ]]; then
|
||||
theme_dir=~/.config/omarchy/themes/$name
|
||||
else
|
||||
theme_dir="$OMARCHY_PATH/themes/$name"
|
||||
fi
|
||||
|
||||
if cmp -s "$theme_dir/unlock.png" "$installed_logo"; then
|
||||
echo "$name"
|
||||
exit
|
||||
fi
|
||||
done
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=List themes that can style the Plymouth boot screen
|
||||
# omarchy:examples=omarchy plymouth list
|
||||
|
||||
{
|
||||
find ~/.config/omarchy/themes/ -mindepth 1 -maxdepth 1 \( -type d -o -type l \) -printf '%f\n' 2>/dev/null
|
||||
find "$OMARCHY_PATH/themes/" -mindepth 1 -maxdepth 1 -type d -printf '%f\n'
|
||||
} | sort -u | while read -r name; do
|
||||
if [[ -d ~/.config/omarchy/themes/$name ]]; then
|
||||
theme_dir=~/.config/omarchy/themes/$name
|
||||
else
|
||||
theme_dir="$OMARCHY_PATH/themes/$name"
|
||||
fi
|
||||
|
||||
if [[ -f $theme_dir/preview-unlock.png ]]; then
|
||||
echo "$name"
|
||||
fi
|
||||
done
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Open the Plymouth unlock screen switcher
|
||||
|
||||
preview_dir="${XDG_CACHE_HOME:-$HOME/.cache}/omarchy/unlock-selector/previews"
|
||||
|
||||
rm -rf "$preview_dir"
|
||||
mkdir -p "$preview_dir"
|
||||
|
||||
ln -s "$OMARCHY_PATH/default/plymouth/preview-unlock.png" "$preview_dir/default.png"
|
||||
|
||||
omarchy-plymouth-list | while read -r name; do
|
||||
if [[ -d ~/.config/omarchy/themes/$name ]]; then
|
||||
theme_dir=~/.config/omarchy/themes/$name
|
||||
else
|
||||
theme_dir="$OMARCHY_PATH/themes/$name"
|
||||
fi
|
||||
|
||||
ln -s "$theme_dir/preview-unlock.png" "$preview_dir/$name.png" 2>/dev/null
|
||||
done
|
||||
|
||||
current=$(omarchy-plymouth-current)
|
||||
selected=""
|
||||
[[ -n $current && -e $preview_dir/$current.png ]] && selected="$preview_dir/$current.png"
|
||||
|
||||
exec omarchy-menu-images --print-name --show-labels --selected "$selected" "$preview_dir"
|
||||
@@ -85,7 +85,8 @@
|
||||
"trigger.toggle.one-window-ratio": {"icon":"","label":"1-Window Ratio","action":"omarchy-hyprland-window-single-square-aspect-toggle"},
|
||||
|
||||
// Style
|
||||
"style.theme": {"icon":"","label":"Theme","aliases":["theme","themes"],"action":"theme=$(omarchy-theme-switcher); [[ -n $theme ]] && omarchy-theme-set \"$theme\""},
|
||||
"style.theme": {"icon":"","label":"Theme","aliases":["theme","themes"],"keywords":"colors","action":"theme=$(omarchy-theme-switcher); [[ -n $theme ]] && omarchy-theme-set \"$theme\""},
|
||||
"style.unlock": {"icon":"","label":"Unlock","aliases":["unlock"],"keywords":"plymouth boot screen","action":"unlock=$(omarchy-plymouth-switcher); if [[ $unlock == default ]]; then omarchy-launch-floating-terminal-with-presentation omarchy-plymouth-reset; elif [[ -n $unlock ]]; then omarchy-launch-floating-terminal-with-presentation \"omarchy-plymouth-set-by-theme '$unlock'\"; fi"},
|
||||
"style.background": {"icon":"","label":"Background","aliases":["background","wallpaper"],"action":"background=$(omarchy-theme-bg-switcher); [[ -n $background ]] && omarchy-theme-bg-set \"$background\""},
|
||||
"style.font": {"icon":"","label":"Font","provider":"fonts"},
|
||||
"style.bar": {"icon":"","label":"Menu Bar"},
|
||||
|
||||
Reference in New Issue
Block a user