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

I3Status bug since laste update [ARCH] #466

Open
IliasN opened this issue Nov 16, 2021 · 9 comments
Open

I3Status bug since laste update [ARCH] #466

IliasN opened this issue Nov 16, 2021 · 9 comments

Comments

@IliasN
Copy link

IliasN commented Nov 16, 2021

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
Copy link

i3bot commented Nov 16, 2021

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 Airblader transferred this issue from i3/i3 Nov 16, 2021
@Airblader
Copy link
Member

I'm guessing this is fixed by #465

@IliasN
Copy link
Author

IliasN commented Nov 16, 2021

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

@IliasN
Copy link
Author

IliasN commented Nov 17, 2021

"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
Copy link
Author

IliasN commented Nov 17, 2021

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
Copy link
Author

IliasN commented Nov 17, 2021

This is the culprit.

@IliasN IliasN closed this as completed Nov 17, 2021
@IliasN IliasN reopened this Nov 21, 2021
@IliasN
Copy link
Author

IliasN commented Nov 21, 2021

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

@jorge-barreto
Copy link

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
Copy link

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

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

5 participants