#!/bin/bash title=$(playerctl metadata --format '{{ title }}') count=$(echo -n "$title" | wc -c) if [ -z "$title" ]; then echo "Nothing Playing..."; else if [ "$count" -le 18 ]; then echo $title else echo $(playerctl metadata --format '{{ title }}' | cut -c-18)... fi fi