tmux-gspot/scripts/get_now_playing.sh

15 lines
178 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
song="$(gspot nowplaying)"
if [[ $song =~ ['⏸'] ]]; then
echo$song | sed 's/[⏸▶]//g'
else
echo $song | sed 's/[⏸▶]//g'
fi