vivien / i3blocks-contrib

Official repository for community contributed blocklets

Home Page:https://github.com/vivien/i3blocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

key_layout doesn't work because it doesn't output a \n at the end

Aster89 opened this issue · comments

Given

$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     it

Expected behavior

$ ./key_layout/key_layout | sed -z 's/it\n/YES\n/;s/it/NO\n/'
YES

Actual behavior

$ ./key_layout/key_layout | sed -z 's/it\n/YES\n/;s/it/NO\n/'
NO

i3blocks config relevant to blocklet(s)

Irrelevant.

Output of blocklet(s) when run from command line

With reference to the example above, it instead of it\n.

Output of any relevant other commands that might help diagnostics

My fix would be to simply append | sed 's/$/\n/' to the existing command. Tested and works for me. Gimme a go and I'll PR it.