Get human name of current background

This commit is contained in:
David Heinemeier Hansson
2026-05-16 10:05:42 +02:00
parent 0e446f70f2
commit c172ed264f
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
# omarchy:summary=Show current background
# omarchy:examples=omarchy theme bg current
BACKGROUND_PATH=$(readlink -f "$HOME/.config/omarchy/current/background" 2>/dev/null)
if [[ -n $BACKGROUND_PATH ]]; then
basename -- "$BACKGROUND_PATH" | perl -pe 's/\.[^.]+$//; s/^\d+-//; s/-/ /g; s/\b(\w)/\U$1/g'
else
echo "Unknown"
fi