greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.85k stars 470 forks source link

Pomodoro crashes #1270

Closed Nuxssss closed 3 years ago

Nuxssss commented 3 years ago

When i use pomodoro block, i3status-rs crashes with code 101 config:


icons = "material-nf"

[[block]]
block = "pomodoro"
length = 25
break_length = 5
message = "Take a break!"
break_message = "Back to work!"
notifier = "notifysend"

[[block]]
block = "disk_space"
path = "/"
alias = "/"
info_type = "available"
unit = "GB"
interval = 20
warning = 20.0
alert = 10.0

[[block]]
block = "memory"
display_type = "memory"
format_mem = "{mem_total_used_percents}"
format_swap = "{swap_used_percents}"

[[block]]
block = "cpu"
interval = 1

[[block]]
block = "load"
interval = 1
format = "{1m}"

[[block]]
block = "sound"

[[block]]
block = "time"
interval = 60
format = "%a %d/%m %R"```
ammgws commented 3 years ago

Works for me. Is your icon file up to date?

Nuxssss commented 3 years ago

Works for me. Is your icon file up to date?

Yes

ammgws commented 3 years ago

Need more info.

When exactly does it crash? On start-up? Is there any error output when you run it in a terminal? Since it's a new setting have you tried removing notifier or disabling it?

dceluis commented 3 years ago

I''m able to consistently crash it when pausing the current period

[[block]]
block = "pomodoro"
length = 25
break_length = 5
message = "Take a break!"
break_message = "Back to work!"
use_nag = true
nag_path = "i3-nagbar"
rlopzc commented 3 years ago

I have the same issue as @dceluis

After starting it, if I want to puase it it crashes

ammgws commented 3 years ago

Can you run your bar like i3status-rs 2>&1 | tee /tmp/debugi3rs and then run tail -f /tmp/debugi3rs to see if there is anything useful there?

rlopzc commented 3 years ago

@ammgws

I have this:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Internal error in context 'get_icon()': icon 'pomodoro_paused' not found in your icons file. If you recently upgraded to v0.2 please check NEWS.md.', src/blocks/pomodoro.rs:93:54
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
rlopzc commented 3 years ago

I fixed the crash by using a custom pomodoro_pause icon

I use nerdfonts and the font is automatically updated by my package manager (pacman) :shrug:

GladOSkar commented 3 years ago

So the icon files we ship actually only have pomododo_paused, while pomodoro_paused is what the block is looking for. Fun typo :D