eww replacement of waybar
This commit is contained in:
14
eww/scripts/get-theme.sh
Normal file
14
eww/scripts/get-theme.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# Wraps your existing theme-cycle.sh to extract a display icon for eww.
|
||||
# theme-cycle.sh status returns JSON like: {"text":"...","class":"...","tooltip":"..."}
|
||||
# We parse the "text" field and emit it directly.
|
||||
|
||||
RAW=$(bash "$HOME/.config/hypr/theme-cycle.sh" status 2>/dev/null)
|
||||
|
||||
# If it's JSON, extract text field
|
||||
if echo "$RAW" | jq -e . >/dev/null 2>&1; then
|
||||
echo "$RAW" | jq -r '.text // ""'
|
||||
else
|
||||
# Plain text fallback
|
||||
echo "${RAW:-}"
|
||||
fi
|
||||
Reference in New Issue
Block a user