Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check whether output is empty and exit before entering scrolling output #314

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scripts/playerctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ main() {
start=0
len=${#playerctl_playback}

# previously we have appended a space to playerctl_playback
# if there is no player, len sees only one space
# exit the script and output nothing if there is just that space
if [[ $len == 1 ]]; then
exit
fi

scrolling_text=""

for ((start = 0; start <= len; start++)); do
Expand Down