Merge pull request #2 from Mango0x45/patch-2
Conditionals the Luke Smith way!
This commit is contained in:
commit
003872a6e2
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
|
# Get the current playing song
|
||||||
current=$(mpc -f %title% current)
|
current=$(mpc -f %title% current)
|
||||||
# If mpd isn't running it will return an empty string, we don't want to display that
|
# If mpd isn't running it will return an empty string, we don't want to display that
|
||||||
if [[ -z "$current" ]]; then
|
[[ -z "$current" ]] && current="-"
|
||||||
current="-"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Spawn the mpd menu with the "Play / Pause" entry selected by default
|
# 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)"
|
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