[GH-ISSUE #495] [Question] Custom module and space? #5786

Closed
opened 2026-05-23 01:53:01 +01:00 by JakeStanger · 2 comments
Owner

Originally created by @bluebyt on GitHub (Mar 12, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/495

I have a custom module that display the weather, but I am wondering why there is a big space between icon and temperature?

Script:
#!/bin/bash
curl wttr.in/Montreal?format="%c%t\n"

In Ironbar:
20240312_185419

In the terminal:
20240312_185335

Script module:
$weather = {
name = "weather"
type = "script"
mode = "poll"
interval = 600000
cmd = "~/.config/ironbar/scripts/weather"
}

Originally created by @bluebyt on GitHub (Mar 12, 2024). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/495 I have a custom module that display the weather, but I am wondering why there is a big space between icon and temperature? Script: #!/bin/bash curl wttr.in/Montreal?format="%c%t\n" In Ironbar: ![20240312_185419](https://github.com/JakeStanger/ironbar/assets/18442224/764754cf-a78b-4b42-a26e-a1ee6bcde195) In the terminal: ![20240312_185335](https://github.com/JakeStanger/ironbar/assets/18442224/bf144804-db5b-4574-8fc7-f5ecb016bf2f) Script module: $weather = { name = "weather" type = "script" mode = "poll" interval = 600000 cmd = "~/.config/ironbar/scripts/weather" }
JakeStanger 2026-05-23 01:53:01 +01:00
Author
Owner

@JakeStanger commented on GitHub (Mar 13, 2024):

Looks like wttr.in adds some spaces between the two formatting tokens automatically, which render wider with your Ironbar font than your terminal one.

I'm not sure if there's anything you could do with CSS. The easiest fix is probably just to pipe the output of curl into something that strips out the additional space(s).

<!-- gh-comment-id:1992801449 --> @JakeStanger commented on GitHub (Mar 13, 2024): Looks like wttr.in adds some spaces between the two formatting tokens automatically, which render wider with your Ironbar font than your terminal one. I'm not sure if there's anything you could do with CSS. The easiest fix is probably just to pipe the output of curl into something that strips out the additional space(s).
Author
Owner

@bluebyt commented on GitHub (Mar 13, 2024):

Good idea I solved the problem with the sed command;

#!/bin/bash
curl -s wttr.in/Montreal?format="%c%t\n" | sed 's/ //'

20240312_202524

<!-- gh-comment-id:1992821887 --> @bluebyt commented on GitHub (Mar 13, 2024): Good idea I solved the problem with the sed command; #!/bin/bash curl -s wttr.in/Montreal?format="%c%t\n" | sed 's/ //' ![20240312_202524](https://github.com/JakeStanger/ironbar/assets/18442224/61ac7032-51e8-4c92-a599-d070e1104f9c)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#5786
No description provided.