From 04ad12241d3555d82b1a9265400ec0b8a7138ca2 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 16 Jun 2024 11:06:30 -0300 Subject: Simplify code used by xmobar Remove the endless loop, and stop polling the system while doing nothing. --- bin/player | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bin') diff --git a/bin/player b/bin/player index fd7d11b..9baa2d0 100755 --- a/bin/player +++ b/bin/player @@ -24,6 +24,7 @@ help() { - play-pause: play/pause - rotate: rotate across available MPRIS players - synopsis: show the current MPRIS player and title + - synopsis-f: show the current MPRIS player and title Manipulate the MPRIS audio player. @@ -156,6 +157,9 @@ case "$ACTION" in "$(printf '%s\n' "$CURRENT_PLAYER" | format_player_name)" \ "$(formatted_player_title)" ;; + synopsis-f) + tail -f "$CURRENT_PLAYER_PATH" 2>/dev/null | format_player_name + ;; *) printf 'Bad ACTION: "%s".\n\n' "$ACTION" >&2 usage >&2 -- cgit v1.2.3