#!/bin/bash
trunc=30
sample=$(playerctl metadata --format '{{ title }} - {{ artist }}')

#echo ${sample}

if [ ${#sample} -gt $trunc ]; then
	echo $sample | head -c $trunc | sed 's/$/.../'
else
	if [ ${#sample} -ne 0 ]; then
		echo ${sample}
	else
		echo None
	fi
fi

#hyprctl activewindow | grep title: | awk -F: '{print $2}' | head -c $trunc | sed 's/$/.../'

