[GH-ISSUE #108] Changing the monitor in the config breaks my css #8493

Closed
opened 2026-05-23 03:52:28 +01:00 by JakeStanger · 4 comments
Owner

Originally created by @HenrySteinmetz on GitHub (Apr 15, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/108

Describe the bug

When I try to make my bar only appear on one screen with the TOML config file my css completely breaks

To Reproduce
Steps to reproduce the behavior:

  1. Use a Toml config
  2. Start the config with [monitors] [monitors.DP-1]

Expected behavior

The bar should appear one only one screen (which works fine) with the style set in the stylesheet

System information:

  • Distro: Arch Linux
  • Compositor: Hyprland
  • Ironbar version: 0.11.0

Configuration

Config

[monitors]
[monitors.DP-1]

position = 'top'
margin.left = 10
margin.right = 10
margin.top = 10
height = 32

[[start]]
type = 'workspaces'
all_monitors = true

[start.name_map]
1 = '1'
2 = '2'
3 = '3'
4 = '4'
5 = '5'
6 = '6'
7 = '7'
8 = '8'
9 = '9'

Styles
@import url("colors.css");

#workspaces {
  border-radius: 25px;
  border-color: @bga;
  background-color: @bga;
}

#workspaces .item {
  color: @text;
  background-color: @bga;
}

#workspaces .item.focused {
  background-color: @bga;
  color: @mauve;
}

@import url("colors.css");

#workspaces {
  border-radius: 25px;
  border-color: @bga;
  background-color: @bga;
}

#workspaces .item {
  color: @text;
  background-color: @bga;
}

#workspaces .item.focused {
  background-color: @bga;
  color: @mauve;
}

Screenshots

image
image

Originally created by @HenrySteinmetz on GitHub (Apr 15, 2023). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/108 **Describe the bug** > When I try to make my bar only appear on one screen with the TOML config file my css completely breaks **To Reproduce** Steps to reproduce the behavior: 1. Use a Toml config 2. Start the config with `[monitors] [monitors.DP-1] ` **Expected behavior** > The bar should appear one only one screen (which works fine) with the style set in the stylesheet **System information:** - Distro: Arch Linux - Compositor: Hyprland - Ironbar version: 0.11.0 # **Configuration** <details><summary>Config</summary> ``` [monitors] [monitors.DP-1] position = 'top' margin.left = 10 margin.right = 10 margin.top = 10 height = 32 [[start]] type = 'workspaces' all_monitors = true [start.name_map] 1 = '1' 2 = '2' 3 = '3' 4 = '4' 5 = '5' 6 = '6' 7 = '7' 8 = '8' 9 = '9' ``` </details> <details><summary>Styles</summary> ```css @import url("colors.css"); #workspaces { border-radius: 25px; border-color: @bga; background-color: @bga; } #workspaces .item { color: @text; background-color: @bga; } #workspaces .item.focused { background-color: @bga; color: @mauve; } ``` ```css @import url("colors.css"); #workspaces { border-radius: 25px; border-color: @bga; background-color: @bga; } #workspaces .item { color: @text; background-color: @bga; } #workspaces .item.focused { background-color: @bga; color: @mauve; } ``` </details> **Screenshots** ![image](https://user-images.githubusercontent.com/121169024/232240609-1ae3b18d-20d1-4c08-95d9-a6cb4308353d.png) ![image](https://user-images.githubusercontent.com/121169024/232240787-22949336-531d-43d8-931a-2e11ec362008.png)
JakeStanger 2026-05-23 03:52:28 +01:00
Author
Owner

@HenrySteinmetz commented on GitHub (Apr 15, 2023):

I got this to work but only using a .json config and got the bottom screen shot and only on one screen but now the margin feature doesn't work

<!-- gh-comment-id:1509920729 --> @HenrySteinmetz commented on GitHub (Apr 15, 2023): I got this to work but only using a .json config and got the bottom screen shot and only on one screen but now the margin feature doesn't work
Author
Owner

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

The issue here is that your TOML isn't correct.

[[start]] (note the double brackets) declares that start is an array and defines the first element of it.

You then put [start.name_map] (single brackets) which treats start as an object (presumably overwriting the array) and sets the name_map property on that object.

You should instead use [[start.name_map]] and that will set the name_map key on the same array element.

<!-- gh-comment-id:1509990235 --> @JakeStanger commented on GitHub (Apr 15, 2023): The issue here is that your TOML isn't correct. `[[start]]` (note the double brackets) declares that `start` is an array and defines the first element of it. You then put `[start.name_map]` (single brackets) which treats `start` as an object (presumably overwriting the array) and sets the `name_map` property on that object. You should instead use `[[start.name_map]]` and that will set the `name_map` key on the same array element.
Author
Owner

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

Can you share your updated config where you are having the issue with margin please?

In future, could you also please use the Q&A feature in discussions for configuration help, rather than creating bug issues unless you're positive it's a replicable issue? (Happy to continue this one here).

<!-- gh-comment-id:1509990584 --> @JakeStanger commented on GitHub (Apr 15, 2023): Can you share your updated config where you are having the issue with `margin` please? In future, could you also please use the Q&A feature in discussions for configuration help, rather than creating bug issues unless you're positive it's a replicable issue? (Happy to continue this one here).
Author
Owner

@JakeStanger commented on GitHub (Jun 18, 2023):

Closing this as I've not heard anything for a couple of months. If you're still having issues let me know and I'll re-open.

<!-- gh-comment-id:1596186337 --> @JakeStanger commented on GitHub (Jun 18, 2023): Closing this as I've not heard anything for a couple of months. If you're still having issues let me know and I'll re-open.
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#8493
No description provided.