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

block freezing my status bar #463

Open
rodskin opened this issue May 24, 2022 · 2 comments
Open

block freezing my status bar #463

rodskin opened this issue May 24, 2022 · 2 comments

Comments

@rodskin
Copy link

rodskin commented May 24, 2022

Hi, when I try to create a block to get the number of docker started it freezes my status bar.
I don't know why this one has this behaviour, here is the code:

#!/bin/bash                                                                                                                                                              
DOCKER_COUNT=$(docker ps -q $1 | wc -l)
ICON="D"
COLOR=""
if [ "$DOCKER_COUNT" -gt 0 ]; then
    COLOR=' foreground="#0DB7ED"'
    ICON="D"
fi
echo "<span$COLOR>$ICON $DOCKER_COUNT</span>"
 
if [ ! -z "$BLOCK_BUTTON" ]; then
   if [ "$DOCKER_COUNT" -gt 0 ]; then
       rxvt --hold -e docker ps &
   fi
fi

Do anyone has an idea? :)

The script is working properly if I launch it in my term (except the button part of course)

@thiswillbeyourgithub
Copy link

Hi!

Have you figured out the issue? I have the same problem on a different script that counts the number of tmux session running.

@thiswillbeyourgithub
Copy link

Fixed it apparently!

I changed the "command" line as in #288 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants