initial commit x2
This commit is contained in:
15
old_rach/eww/music.sh
Executable file
15
old_rach/eww/music.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
music=$(playerctl metadata --format "{{title}}" 2>/dev/null)
|
||||
|
||||
max_length=15
|
||||
|
||||
if [ -z "$music" ]; then
|
||||
echo ":: No playing ::"
|
||||
else
|
||||
if [ ${#music} -gt $max_length ]; then
|
||||
echo "${music:0:$max_length}..."
|
||||
else
|
||||
echo "$music"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user