Conditionals the Luke Smith way!
This commit is contained in:
parent
41b8e38aff
commit
bb78f8d3d3
1 changed files with 1 additions and 3 deletions
|
@ -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)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue