i3 / i3status

Generates status bar to use with i3bar, dzen2 or xmobar
BSD 3-Clause "New" or "Revised" License
601 stars 254 forks source link

I3Status bug since laste update [ARCH] #466

Open IliasN opened 2 years ago

IliasN commented 2 years ago

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

tztime show as the following : %H:%M %d.%m.%Y
And battery infos dissapeared.

Expected Behavior

tztime should be something like : 21:30 11.11.2021 Battery infos should be : 82%

Reproduction Instructions

Configuration file :

# i3status configuration file.
# see "man i3status" for documentation.

# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!

general {
    colors = true
    interval = 5
    markup = "pango"
}

order += "disk /"
order += "wireless wlp0s20f3"
order += "battery 0"
order += "memory"
order += "volume master"
order += "tztime local"

disk "/" {
  format = "<span color='#6d9bab'></span> %avail"
}

memory {
  format = "<span color='#6d9bab'></span> %used / %available"
    threshold_degraded = "1G"
    format_degraded = "MEMORY < %available"
}

volume master {
  format = "<span color='#6d9bab'></span> %volume"
    format_muted = "<span color='#6d9bab'></span> %volume"
    device = "default"
    mixer = "Master"
    mixer_idx = 0
}

tztime local {
  format = "<span color='#6d9bab'></span> %time"
    format_time = "%H:%M %d.%m.%Y"
}

battery 0 {
  format = "%status %percentage %remaining"
    format_down = "No battery"
    status_chr = "<span color='#6d9bab'></span>"
    status_bat = "<span color='#6d9bab'></span>"
    status_unk = "?"
    status_full = "<span color='#6d9bab'></span>"
    path = "/sys/class/power_supply/BAT%d/uevent"
    low_threshold = 27
}

wireless wlp0s20f3 {
  format_up = "<span color='#6d9bab'> </span>"
    format_down = "<span color='#ff0000'></span>"
}

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.20.1 (2021-11-03) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.20.1 (2021-11-03) (pid 618)
Loaded i3 config:
  /home/ilias/.config/i3/config (main) (last modified: Tue 16 Nov 2021 07:13:22 PM CET, 622 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
Config file
https://pastebin.com/tXMmgjip
$ uname -r
5.15.2-arch1-1
i3bot commented 2 years ago

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

Airblader commented 2 years ago

I'm guessing this is fixed by #465

IliasN commented 2 years ago

Fixed the tztime by using time instead but the battery icons are still not working.

IliasN commented 2 years ago

"Fixed" battery changing config like this :

battery 0 {
    format = "<span color='#6d9bab'>%status</span> %percentage %remaining"
    format_down = "No battery"
    status_chr = " "
    status_bat = " "
    status_unk = "???"
    status_full = " "
    path = "/sys/class/power_supply/BAT%d/uevent"
    low_threshold = 27
}

Looks like we can't use markup in status fields.

IliasN commented 2 years ago

Found why it's not working. This line the status is copied only by STRING_SIZE which is defined to 10. So the problem is that the markup gets cut in the middle and never closes. But i can't find why i didn't have this bug before last update. I will keep searching and update here with what i find.

IliasN commented 2 years ago

This is the culprit.

IliasN commented 2 years ago

Maybe it shouldn't be closed gonna leave it until dev closes it

jorge-barreto commented 2 years ago

Just wanting to report the same issue here re: tztime. My workaround was to include the format_time in the format field.

from something like this:

tztime local {
  format = "<span color='#000000' background='#33b3a6'> %time </span>"
  format_time = "%a %-d %b %I:%M %p"
}

to something like this:

tztime local {
  format = "<span color='#000000' background='#33b3a6'> %a %-d %b %I:%M %p </span>"
}
pabloariasal commented 1 year ago

@jorge-barreto you are the man, works great! happy new year :)