feat: add screenshot gallery, theme selector, and 4 new curated themes
- Add comprehensive screenshot gallery in README.md and docs/GALLERY.md showcasing all desktop features, menus, and control panels - Clean and sanitize screenshots (no private work projects or processes) - Add 4 curated themes with accurate color palettes and btop themes: * Pirna (Bernardo Bellotto classic art) * Nordic Frost (Arctic aurora and mountain cliff) * Monolith (Sci-fi alien coast and bioluminescent cyan) * Dragon Fire (Dark fantasy gothic siege and fiery coral embers) - Enhance theme selector in rice-theme and rice-menu with live grid thumbnails - Add super + shift + t shortcut for instant visual theme switching - Make wallpaper lookup robust across repo and user directories
This commit is contained in:
parent
7f41cf7a82
commit
95898b208c
37 changed files with 661 additions and 10 deletions
|
|
@ -102,9 +102,18 @@ case "${1:-main}" in
|
|||
theme)
|
||||
rice-theme list | while read -r t; do
|
||||
dir="$RICE_DIR/themes/$t"; [[ -d $dir ]] || dir="${XDG_CONFIG_HOME:-$HOME/.config}/rice/themes/$t"
|
||||
[[ -f $dir/colors.toml ]] || continue
|
||||
img="$dir/preview.png"
|
||||
[[ -f $img ]] || img="$RICE_DIR/wallpapers/$(sed -n 's/^wallpaper *= *"\(.*\)"/\1/p' "$dir/colors.toml")"
|
||||
printf '%s\t%s\t%s\n' "$(sed -n 's/^name *= *"\(.*\)"/\1/p' "$dir/colors.toml")" "$(rice-wallpaper thumb "$img")" "$t"
|
||||
if [[ ! -f $img ]]; then
|
||||
wp=$(sed -n 's/^wallpaper *= *"\(.*\)"/\1/p' "$dir/colors.toml")
|
||||
if [[ -f $wp ]]; then img="$wp"
|
||||
elif [[ -f $RICE_DIR/wallpapers/$wp ]]; then img="$RICE_DIR/wallpapers/$wp"
|
||||
elif [[ -f ${XDG_CONFIG_HOME:-$HOME/.config}/rice/wallpapers/$wp ]]; then img="${XDG_CONFIG_HOME:-$HOME/.config}/rice/wallpapers/$wp"
|
||||
elif [[ -f $HOME/Pictures/Wallpapers/$wp ]]; then img="$HOME/Pictures/Wallpapers/$wp"
|
||||
fi
|
||||
fi
|
||||
name=$(sed -n 's/^name *= *"\(.*\)"/\1/p' "$dir/colors.toml")
|
||||
printf '%s\t%s\t%s\n' "${name:-$t}" "$(rice-wallpaper thumb "$img")" "$t"
|
||||
done | grid "Theme" rice-theme-set
|
||||
;;
|
||||
wallpaper)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
# rice-theme - render and apply a colour theme to every surface of the rice.
|
||||
#
|
||||
# rice-theme set <name> render themes/<name> and reload everything
|
||||
# rice-theme select open the visual theme selector
|
||||
# rice-theme reload re-render the current theme (after editing a template)
|
||||
# rice-theme list available themes
|
||||
# rice-theme current name of the active theme
|
||||
|
|
@ -153,8 +154,14 @@ case "$cmd" in
|
|||
exec 9>"${XDG_RUNTIME_DIR:-/tmp}/rice-theme.lock"; flock 9
|
||||
render "$(cat "$STATE/theme.name" 2>/dev/null || echo sakura-line)"; apply
|
||||
;;
|
||||
select|picker|menu)
|
||||
command -v rice-menu >/dev/null && exec rice-menu theme || die "rice-menu not found"
|
||||
;;
|
||||
list)
|
||||
{ ls -1 "$RICE_DIR/themes"; ls -1 "${XDG_CONFIG_HOME:-$HOME/.config}/rice/themes" 2>/dev/null; } | sort -u
|
||||
{
|
||||
[[ -d $RICE_DIR/themes ]] && ls -1 "$RICE_DIR/themes" || true
|
||||
[[ -d ${XDG_CONFIG_HOME:-$HOME/.config}/rice/themes ]] && ls -1 "${XDG_CONFIG_HOME:-$HOME/.config}/rice/themes" || true
|
||||
} 2>/dev/null | sort -u
|
||||
;;
|
||||
current)
|
||||
cat "$STATE/theme.name" 2>/dev/null || echo sakura-line
|
||||
|
|
|
|||
|
|
@ -31,8 +31,13 @@ case "${1:-}" in
|
|||
if [[ -f $remembered && -f $(cat "$remembered") ]]; then apply "$(cat "$remembered")"; else "$0" theme-default; fi
|
||||
;;
|
||||
theme-default)
|
||||
name=$(rice-theme get wallpaper 2>/dev/null)
|
||||
[[ -n $name && -f $RICE_DIR/wallpapers/$name ]] && apply "$RICE_DIR/wallpapers/$name"
|
||||
name=$(rice-theme get wallpaper 2>/dev/null || true)
|
||||
[[ -z $name ]] && exit 0
|
||||
if [[ -f $name ]]; then apply "$name";
|
||||
elif [[ -f $RICE_DIR/wallpapers/$name ]]; then apply "$RICE_DIR/wallpapers/$name";
|
||||
elif [[ -f ${XDG_CONFIG_HOME:-$HOME/.config}/rice/wallpapers/$name ]]; then apply "${XDG_CONFIG_HOME:-$HOME/.config}/rice/wallpapers/$name";
|
||||
elif [[ -f $HOME/Pictures/Wallpapers/$name ]]; then apply "$HOME/Pictures/Wallpapers/$name";
|
||||
fi
|
||||
;;
|
||||
next)
|
||||
mapfile -t all < <(list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue