Initial Ubuntu i3wm dotfiles

This commit is contained in:
2026-01-29 23:19:44 +05:30
commit 75a6027f67
40 changed files with 2261 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
MAXLEN=25
STATUS=$(playerctl status 2>/dev/null) # playing, paused, stopped
TITLE=$(playerctl metadata title 2>/dev/null)
# Decide emoji based on status
if [ "$STATUS" = "Playing" ]; then
EMOJI="▶"
elif [ "$STATUS" = "Paused" ]; then
EMOJI="⏸"
else
EMOJI="⏹"
fi
# If no song
if [ -z "$TITLE" ]; then
echo "🕊️ Chillin'"
else
# Truncate if too long
if [ ${#TITLE} -gt $MAXLEN ]; then
TITLE="${TITLE:0:MAXLEN}"
fi
# Underline with Polybar formatting and show emoji
echo "%{+u}%{F#8be9fd}$EMOJI $TITLE%{-u}%{F-}"
fi