[GH-ISSUE #117] Message: range end index 2 out of range for slice of length 1 #64

Closed
opened 2026-05-22 21:51:01 +01:00 by JakeStanger · 1 comment
Owner

Originally created by @JustSimplyKyle on GitHub (Apr 22, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/117

Describe the bug
label = "{{~/.config/eww/scripts/wifi --ESSID}} "
Mind the space after the script! And it well crashes.

2023-04-22T15:03:01.457678Z ERROR ironbar::logging: The application panicked (crashed).
Message:  range end index 2 out of range for slice of length 1
Location: src/dynamic_string.rs:91

To Reproduce

  1. put the label in config
  2. run it
  3. crash

Expected behavior
doesn't crash.

System information:

  • Ironbar version: 0.11.0(git)
  • Compositor: Hyprland
  • Distro: Arch linux 6.2.1-273-tkg-bore

Configuration

Share your bar configuration and stylesheet as applicable:

Config
    $internet = {
        type="custom"
        class="internet"
        bar = [
        {
            type = "label"
            label = "{{~/.config/eww/scripts/wifi --ESSID}} "
            on_mouse_enter = "rm /tmp/internet.lock"
            on_mouse_exit = "touch /tmp/internet.lock"
            show_if = "0:~/.config/ironbar/states/internet/state.sh"
        }
        {
        type = "label"
            label = "{{~/.config/eww/scripts/wifi --ICON}}"
            on_click_right = "pavucontrol"
            on_mouse_enter = "rm /tmp/internet.lock"
            on_mouse_exit = "touch /tmp/internet.lock"
        }
        ]
    }

Additional context
label = "{{~/.config/eww/scripts/wifi --ESSID}} "
This resolves the issue.

Originally created by @JustSimplyKyle on GitHub (Apr 22, 2023). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/117 **Describe the bug** `label = "{{~/.config/eww/scripts/wifi --ESSID}} "` Mind the space after the script! And it well crashes. ```bash 2023-04-22T15:03:01.457678Z ERROR ironbar::logging: The application panicked (crashed). Message: range end index 2 out of range for slice of length 1 Location: src/dynamic_string.rs:91 ``` **To Reproduce** 1. put the label in config 2. run it 3. crash **Expected behavior** doesn't crash. **System information:** - Ironbar version: 0.11.0(git) - Compositor: Hyprland - Distro: Arch linux 6.2.1-273-tkg-bore **Configuration** > Share your bar configuration and stylesheet as applicable: <details><summary>Config</summary> ``` $internet = { type="custom" class="internet" bar = [ { type = "label" label = "{{~/.config/eww/scripts/wifi --ESSID}} " on_mouse_enter = "rm /tmp/internet.lock" on_mouse_exit = "touch /tmp/internet.lock" show_if = "0:~/.config/ironbar/states/internet/state.sh" } { type = "label" label = "{{~/.config/eww/scripts/wifi --ICON}}" on_click_right = "pavucontrol" on_mouse_enter = "rm /tmp/internet.lock" on_mouse_exit = "touch /tmp/internet.lock" } ] } ``` </details> **Additional context** ` label = "{{~/.config/eww/scripts/wifi --ESSID}} "` This resolves the issue.
JakeStanger 2026-05-22 21:51:01 +01:00
  • closed this issue
  • added the
    T:Bug
    label
Author
Owner

@JakeStanger commented on GitHub (Apr 22, 2023):

Thanks, will have a fix merged in a few mins

<!-- gh-comment-id:1518686875 --> @JakeStanger commented on GitHub (Apr 22, 2023): Thanks, will have a fix merged in a few mins
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#64
No description provided.