[GH-ISSUE #390] workspaces: favorites are missing .inactive unless switched to #137

Closed
opened 2026-05-22 21:51:23 +01:00 by JakeStanger · 5 comments
Owner

Originally created by @eclairevoyant on GitHub (Dec 29, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/390

Describe the bug

On Sway, the workspaces module doesn't appear to correctly style the favorites (apply .inactive class) unless I switch to them and back.

To Reproduce
Steps to reproduce the behavior:

  1. Kill and start bar
  2. Favorites are not styled correctly
  3. Switch to a favorite workspace with no windows
  4. Switch to another workspace
  5. Previous favorite is now styled correctly

Expected behavior
Favorite workspaces should have .inactive applied from the start.

System information:

  • Distro: NixOS 24.05pre
  • Compositor: Sway
  • Ironbar version: 0.13.0

Configuration

Config

Styles
.workspaces .item.focused {
    background-color: #ffffff;
}
  
.workspaces .item.focused label {
    color: #000000;
}
  
.workspaces .item.inactive {
    background-color: #000000;
}

Additional context
n/a

Screenshots

First 3 workspaces have windows open, the rest are favorites.

Top is ironbar
Bottom is waybar, as a reference of expected behaviour with persistent workspaces

Recording at https://imgur.com/a/EhBE6X3

Originally created by @eclairevoyant on GitHub (Dec 29, 2023). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/390 **Describe the bug** On Sway, the workspaces module doesn't appear to correctly style the favorites (apply `.inactive` class) unless I switch to them and back. **To Reproduce** Steps to reproduce the behavior: 1. Kill and start bar 2. Favorites are not styled correctly 3. Switch to a favorite workspace with no windows 4. Switch to another workspace 5. Previous favorite is now styled correctly **Expected behavior** Favorite workspaces should have `.inactive` applied from the start. **System information:** - Distro: NixOS 24.05pre - Compositor: Sway - Ironbar version: 0.13.0 **Configuration** <summary>Config</summary> ``` ``` <summary>Styles</summary> ```css .workspaces .item.focused { background-color: #ffffff; } .workspaces .item.focused label { color: #000000; } .workspaces .item.inactive { background-color: #000000; } ``` **Additional context** n/a **Screenshots** First 3 workspaces have windows open, the rest are favorites. Top is **ironbar** Bottom is **waybar**, as a reference of expected behaviour with persistent workspaces Recording at https://imgur.com/a/EhBE6X3
JakeStanger 2026-05-22 21:51:23 +01:00
  • closed this issue
  • added the
    T:Bug
    label
Author
Owner

@JakeStanger commented on GitHub (Dec 30, 2023):

Hey, thanks for reporting. The attached video appears to be corrupt, are you able to re-upload please?

<!-- gh-comment-id:1872411808 --> @JakeStanger commented on GitHub (Dec 30, 2023): Hey, thanks for reporting. The attached video appears to be corrupt, are you able to re-upload please?
Author
Owner

@eclairevoyant commented on GitHub (Dec 30, 2023):

I've uploaded it to imgur, does this work? https://imgur.com/a/EhBE6X3

<!-- gh-comment-id:1872413721 --> @eclairevoyant commented on GitHub (Dec 30, 2023): I've uploaded it to imgur, does this work? https://imgur.com/a/EhBE6X3
Author
Owner

@JakeStanger commented on GitHub (Dec 30, 2023):

Yes it does, thank you :)

<!-- gh-comment-id:1872413939 --> @JakeStanger commented on GitHub (Dec 30, 2023): Yes it does, thank you :)
Author
Owner

@yavko commented on GitHub (Dec 30, 2023):

After checking the code it seems that inactive is only added on a remove event to replace an existing workspace. For some reason it was removed in this commit github.com/JakeStanger/ironbar@25c490b8b4 (diff-357f6c3c36)

<!-- gh-comment-id:1872600586 --> @yavko commented on GitHub (Dec 30, 2023): After checking the code it seems that inactive is only added on a remove event to replace an existing workspace. For some reason it was removed in this commit https://github.com/JakeStanger/ironbar/commit/25c490b8b426176c1a4c9d402aafd6783c9b6d48#diff-357f6c3c369f4a0b01588d31b2fb6e3e7cd83d4814b3972002c0b64176518aa7L97
Author
Owner

@JakeStanger commented on GitHub (Dec 30, 2023):

Good spot, thanks. It looks like when this was refactored that was lost & slipped through review.

<!-- gh-comment-id:1872622460 --> @JakeStanger commented on GitHub (Dec 30, 2023): Good spot, thanks. It looks like when this was refactored that was lost & slipped through review.
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#137
No description provided.