[GH-ISSUE #982] feature request: don't show the bindmode when it's the default mode #8734

Closed
opened 2026-05-23 03:54:03 +01:00 by JakeStanger · 3 comments
Owner

Originally created by @postsolar on GitHub (May 15, 2025).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/982

Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

If the bar has a particular styling (the module for bindmode is visually isolated), there would be an empty block for the "default" or "global" bindmode (submap = reset in Hyprland lingo). This is visually unappealing and provides no useful information.

Non-default mode on:
Image

Default mode on:
Image

I'd like to just not see the widget when the bindmode is the default one.

Describe the solution you'd like

A clear and concise description of what you want to happen.
The more info here about what you are trying to achieve, the better - there's likely more than one way to go about implementing a solution.

There are many ways to address it. Off the top of my head I could think of:

  1. Don't display the widget if the default bindmode is active, add it as a config option
  2. Add a CSS selector for the default mode
  3. Add a mode filtering list, e.g.
{
  "type": "bindmode",
  "except": [ "", "some_other_mode" ]
}

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

  1. Implementable with Ironvars dynamic booleans and the show_if field for label widgets. Ok but extra code.
  2. Implementable via load-css command. Quite hacky but works too.

Both could be done with either:

  • No Hyprland IPC, just bind = mod, key, exec, hyprctl dispatch submap foo && ironbar var set submap foo && ironbar var set submapVisible true, which adds quite a bit of coupling between Hyprland config and Ironbar
  • Hyprland IPC, which keeps the config cleaner, but less accessible to a lot of users

Additional context

Add any other context or screenshots about the feature request here.

Originally created by @postsolar on GitHub (May 15, 2025). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/982 **Is your feature request related to a problem? Please describe.** > A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] If the bar has a particular styling (the module for bindmode is visually isolated), there would be an empty block for the "default" or "global" bindmode (`submap = reset` in Hyprland lingo). This is visually unappealing and provides no useful information. Non-default mode on: ![Image](https://github.com/user-attachments/assets/7cc76559-304a-4998-8695-21de3ffac557) Default mode on: ![Image](https://github.com/user-attachments/assets/e49f8563-6f3c-47cc-af77-0729c2edaa7a) I'd like to just not see the widget when the bindmode is the default one. **Describe the solution you'd like** > A clear and concise description of what you want to happen. > The more info here about what you are trying to achieve, the better - there's likely more than one way to go about implementing a solution. There are many ways to address it. Off the top of my head I could think of: 1. Don't display the widget if the default bindmode is active, add it as a config option 2. Add a CSS selector for the default mode 3. Add a mode filtering list, e.g. ```json { "type": "bindmode", "except": [ "", "some_other_mode" ] } ``` **Describe alternatives you've considered** > A clear and concise description of any alternative solutions or features you've considered. 1. Implementable with Ironvars dynamic booleans and the `show_if` field for `label` widgets. Ok but extra code. 2. Implementable via `load-css` command. Quite hacky but works too. Both could be done with either: - No Hyprland IPC, just `bind = mod, key, exec, hyprctl dispatch submap foo && ironbar var set submap foo && ironbar var set submapVisible true`, which adds quite a bit of coupling between Hyprland config and Ironbar - Hyprland IPC, which keeps the config cleaner, but less accessible to a lot of users **Additional context** > Add any other context or screenshots about the feature request here.
Author
Owner

@JakeStanger commented on GitHub (May 16, 2025):

On Sway, this is known as the "default" mode, and it's sent as an empty string
github.com/JakeStanger/ironbar@f3ae57bfe5/src/clients/compositor/sway.rs (L246-L252)

Replicating this to hide it on Hyprland if needed would be my preference.

If that's not enough (since it's already showing empty), I reckon the best bet is to add some logic to the module itself that does something akin to

if mode.is_empty() {
  widget.hide()
} else {
  widget.show()
}
<!-- gh-comment-id:2886728009 --> @JakeStanger commented on GitHub (May 16, 2025): On Sway, this is known as the "default" mode, and it's sent as an empty string https://github.com/JakeStanger/ironbar/blob/f3ae57bfe534ebd5a5f7372640f1ce46850bd1a3/src/clients/compositor/sway.rs#L246-L252 Replicating this to hide it on Hyprland if needed would be my preference. If that's not enough (since it's already showing empty), I reckon the best bet is to add some logic to the module itself that does something akin to ```rust if mode.is_empty() { widget.hide() } else { widget.show() } ```
Author
Owner

@postsolar commented on GitHub (May 16, 2025):

if mode.is_empty() {
  widget.hide()
} else {
  widget.show()
}

Do you think it should be configurable, and if yes, then hide or don't hide by default?

<!-- gh-comment-id:2887070478 --> @postsolar commented on GitHub (May 16, 2025): > ```rust > if mode.is_empty() { > widget.hide() > } else { > widget.show() > } > ``` Do you think it should be configurable, and if yes, then hide or don't hide by default?
Author
Owner

@JakeStanger commented on GitHub (May 16, 2025):

I personally cannot see a use for having it shown if empty, especially since there's no formatting options for the module, and GTK CSS doesn't have pseudoelements, so it'll always be empty in this scenario.

If you can see any reason why somebody would want it to show, then I'd say yes configurable, but hidden by default, otherwise nah.

<!-- gh-comment-id:2887121255 --> @JakeStanger commented on GitHub (May 16, 2025): I personally cannot see a use for having it shown if empty, especially since there's no formatting options for the module, and GTK CSS doesn't have pseudoelements, so it'll always be empty in this scenario. If you can see any reason why somebody *would* want it to show, then I'd say yes configurable, but hidden by default, otherwise nah.
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#8734
No description provided.