JakeStanger / ironbar

Customisable Wayland gtk bar written in Rust.
https://crates.io/crates/ironbar
MIT License
640 stars 55 forks source link

[Workspaces] Workspaces renamed with name_map incorrectly being shown as active #639

Closed michaelBelsanti closed 3 months ago

michaelBelsanti commented 5 months ago

Describe the bug I am using this configuration:

      "all_monitors": false,
      "name_map": {
        "11": "1",
        "12": "2",
        "13": "3",
        "14": "4",
        "15": "5",
        "16": "6",
        "17": "7",
        "18": "8",
        "19": "9"
      },
      "type": "workspaces"

I have workspaces 11-19 assigned to my second monitor. There is a bug occurring where whichever workspace is currently focused, is shown as the active workspace for both monitors. Eg. if I am on workspace 1 on my main monitor, the bar on my other monitor will also show workspace 1 as active, even though this workspace is actually 11 being renamed to 1. It seems that when a workspace is renamed using name_map, it is being treated the same as the original workspace.

To Reproduce Steps to reproduce the behavior:

  1. Rename workspaces with name_map in the way shown above
  2. Focus workspace 1 on your primary monitor
  3. See that workspace 1 on the other monitor is also shown as active.

Expected behavior The 1st workspace on my second monitor should not be shown as active.

System information:

Configuration

Share your bar configuration and stylesheet as applicable: https://github.com/michaelBelsanti/nixconfig/blob/main/modules/nixos/desktops/hyprland/ironbar.nix https://github.com/michaelBelsanti/nixconfig/blob/main/modules/home/theming/catppuccin/ironbar.nix

Screenshots Both workspaces being active. Right monitor is primary, left is secondary. Left monitor is actually on workspace 2, but workspace 1 is being focused on the right monitor, so the bar is showing it as active for both. image

JakeStanger commented 3 months ago

Thanks for reporting & apologies for the delay. I thought this was going to be a nasty one but a nice easy fix. I'll merge in a few mins and the fix will be in -git

michaelBelsanti commented 3 months ago

Thanks for reporting & apologies for the delay. I thought this was going to be a nasty one but a nice easy fix. I'll merge in a few mins and the fix will be in -git

glad it was so simple. I assumed the same thing when I made this bug haha. turns out it was simpler to fix than it was to explain the bug lmao