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

piping scripts to foreground #249

Open
plushrib opened this issue Aug 11, 2024 · 3 comments
Open

piping scripts to foreground #249

plushrib opened this issue Aug 11, 2024 · 3 comments

Comments

@plushrib
Copy link

hello, i was wondering if there's a way to pipe lolcat into lemonbar?

@RobertZenz
Copy link

RobertZenz commented Aug 14, 2024

Lemonbar will exit if stdin is closed, so the process should not close. There are two possible solutions, one could keep repeating the command (might also be useful if the content might change):

while true; do lolcat; sleep 60s; done | lemonbar

Or you could use -p:

  -p Don't close after the data ends

However, I'm not sure how lemonbar handles multiline input.

@plushrib
Copy link
Author

plushrib commented Aug 15, 2024

lemon bar seems to handle multiline input (at least "do echo"), however their color tags system overrides lolcat for some reason.

lolcat also dosen't work being placed before the command, so i tried reverseing them

~/git/bar/lemonbar | while true; do lolcat; sleep 60s; done

(lemonbar command leads to output because i built it lol)

but it just outputs an empty black screen and outputs echo in terminal instead of the bar

when plugged into an echo command it echos on the terminal instead of the bar

~/git/bar/lemonbar | echo "fart" | while true; do lolcat; sleep 60s; done

@plushrib
Copy link
Author

Lolcat uses ansi escape codes to color text. Lemonbar dosent support escape codes, therefore it would be lolcat that would need the patch, not lemonbar.

If there's any way to convert ansi escape codes to hex codes or rgba then lmk.

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