From bb78f8d3d3bab86c22c7818a2d3d0a30c1964bb9 Mon Sep 17 00:00:00 2001 From: Thomas Voss <57815710+Mango0x45@users.noreply.github.com> Date: Sun, 4 Oct 2020 18:09:26 +0200 Subject: [PATCH] Conditionals the Luke Smith way! --- .scripts/mpris.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.scripts/mpris.sh b/.scripts/mpris.sh index a768adc..d9532f7 100755 --- a/.scripts/mpris.sh +++ b/.scripts/mpris.sh @@ -42,9 +42,7 @@ options="$previous\n$play_pause\n$stop\n$next\n$tog_repeat\n$tog_random" # Get the current playing song current=$(mpc -f %title% current) # If mpd isn't running it will return an empty string, we don't want to display that -if [[ -z "$current" ]]; then - current="-" -fi +[[ -z "$current" ]] && current="-" # Spawn the mpd menu with the "Play / Pause" entry selected by default chosen="$(echo -e "$options" | $rofi_command -p " $current" -dmenu $active $urgent -selected-row 1)"