mirror of
https://github.com/HerrCraziDev/dotfiles.git
synced 2026-04-20 14:34:21 +02:00
15 lines
284 B
Bash
Executable File
15 lines
284 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if ! command -v playerctl; then
|
|
return 1
|
|
fi
|
|
|
|
playing=$(playerctl -a metadata --format='{{status}}:{{artist}} - {{title}}' | grep 'Playing' | sed -e "s/^Playing://")
|
|
|
|
if [ -n "$playing" ]; then
|
|
echo $playing | sed -E 's/(.{30})(.{1,})$/\1.../'
|
|
return 0
|
|
else
|
|
return 1
|
|
fi
|