*: Wrap lines at 80 columns where appropriate
Wrap lines at 80 columns where appropriate and I had the energy to think about how/where to wrap. There are still lines longer than that, which I plan to wrap in the future. But that is enough for now.
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
|
||||
command -v playerctl >/dev/null 2>&1 || { printf "playerctl not found.\n" >&2; exit 1; }
|
||||
|
||||
# metadata="$(playerctl metadata --format '{{status}} {{artist}} - {{title}} ({{duration(position)}}|{{duration(mpris:length)}})')"
|
||||
metadata="$(playerctl metadata --format '{{status}} {{artist}}' 2>/dev/null)"
|
||||
title="$(playerctl metadata --format '{{title}}' 2>/dev/null)"
|
||||
duration="$(playerctl metadata --format '({{duration(position)}}|{{duration(mpris:length)}})' 2>/dev/null)"
|
||||
duration="$(2>/dev/null playerctl metadata \
|
||||
--format '({{duration(position)}}|{{duration(mpris:length)}})'
|
||||
)"
|
||||
|
||||
|
||||
if [ -n "$metadata" ] && [ "$metadata" != "No players found" ]; then
|
||||
|
||||
Reference in New Issue
Block a user