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

stange problem with command (worked in 1.4) #444

Open
ghistes opened this issue Dec 11, 2020 · 1 comment
Open

stange problem with command (worked in 1.4) #444

ghistes opened this issue Dec 11, 2020 · 1 comment

Comments

@ghistes
Copy link

ghistes commented Dec 11, 2020

Hi,

this is my test-config:

separator_block_width=15   
markup=pango
separator=false

[shell]
command=echo shell
interval=60

[perl]
command=perl -e 'print "perl"'
interval=60

[python2]
command=python2 -c 'print("python2")'
interval=60

[python3]
command=python3 -c 'print("python3")'
interval=60

When I use this with version 1.4 I the strings "shell perl python2 python3" are display (as expected).

However with 1.5 the perl-output goes missing. Only "shell python2 python3" are displayed.

This boils down a problem I have with another perl-script that used to work in 1.4 but no longer.

What is going on here and how can I make perl work again (it's my main scripting language)?

Many thanks!

@ghistes
Copy link
Author

ghistes commented Dec 11, 2020

ok, I understand the problem now.

In the new (1.5) version the behaviour with regards to newlines has changed.

Now the script output MUST end with a newline otherwise it does not work, previously it also worked if a script only printed some characters without ending in a newline.

So in the above perl's print does not add a newline (but python's print does - that is the difference).

It can easly fixed with command=perl -e 'print "whatever\n"' but this behaviour came as a surprise to me as it seems to be a change from the previous version.

I hope this is documented well.

dllud pushed a commit to dllud/i3blocks that referenced this issue Jan 12, 2024
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

1 participant