mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 12:15:22 +01:00
[GH-ISSUE #495] [Question] Custom module and space? #2974
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#2974
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:

In the terminal:

Script module:
$weather = {
name = "weather"
type = "script"
mode = "poll"
interval = 600000
cmd = "~/.config/ironbar/scripts/weather"
}
@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).
@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/ //'