Closed rwijtvliet closed 11 months ago
Why do always start reading the docs after writing a question?
I could probably get something to work using this. However, I think it's not possible without duplicating my code base and changing every mention of sketchybar
to secondary_bar
(or something), which is less than ideal for maintenance.
There are a number of ways you could achieve what you would like to have.
I think the simplest would be to use the bracket
special item:
With it you can connect two arbitrary items with a common background, i.e.
adding this after all other items have been added will fill the gap between them
sketchybar --add item left_anchor left \
--set left_anchor width=0 display=1 \
--add item right_anchor right \
--set right_anchor width=0 display=1 \
--add bracket gap_fill left_anchor right_anchor \
--set gap_fill background.color=0xff00ff00
If instead you add this before adding any other items, you will end up with this:
As you can see, these items are only displayed on display 1, so you can do the same for any other displays you would like to have this colored bar appear on and change the color of the respective bracket accordingly.
That's really clever! Thanks once more for such a fast answer, it's really appreciated!
...and will you look at that <3
I think this is currently not possible, but I thought I'd ask.
My setup:
I have a color associated with each space, which I use for the background of that space's
space
item - if that space has focus. For example, here I have space 2 (orange) active on my primary display.......and space 9 (green) on my secondary one:
My issue/question/enhancement:
I'd like to make the color more prominent, and color the entire bar with it. So, on the primary display, it should be orange, and on the secondary, green.
What I've tried:
1: Setting the bar color directly
Using
sketchybar --bar color=$color
.This changes the color on both displays, so cannot be used. Again the primary display...
...and the secondary one:
2: Using an
item
.Items can be restricted to show only on a space/display, and I could set its background color.
This didn't work because I couldn't find out how to make the item stretch to fill up any "unclaimed" space on the bar.
(solution 2 would look different, as it would only color the unused part of a bar, but that is fine too)
I guess I'm pushing the limits of what this project is trying to accomplish, so if it's not a considered use-case, that's totally fine.