JankyBorders icon indicating copy to clipboard operation
JankyBorders copied to clipboard

Per-window border configuration

Open shajra opened this issue 5 months ago • 4 comments

Hi, I'm not sure if this is possible, but I thought I'd start an issue to see.

A feature like this could be used in tandem with #45 to do something like style a stacked window differently from an unstacked one. I'd use a double border... (maybe just on the top? to suggest stacking, but I'd still want the coloring to be focus-based, like a dim color and a brighter highlight.

There are probably many programmatic ways to accomplish this, and probably with more versatility for my preferences of border-doubling and coloring.

For me, this would all be driven with my SketchyBar configuration.

But maybe this request is too difficult given the current APIs.

shajra avatar Feb 05 '24 16:02 shajra

Do you want to have different styles in the unfocused state, or just different states in the focused state? Because different styles in the focused state are easily scriptable, but different unfocused border styles are not possible currently. It would be easily possible to include something like this though with some extra book keeping, where a window identified by its id could receive a different set of stlye settings.

FelixKratz avatar Feb 06 '24 17:02 FelixKratz

I was really hoping for a different border style in the unfocused state. I don't try to open too many windows, but sometimes it happens. And tools like yours help me organize more windows than otherwise.

To date, I've avoided stacking. But I use tabs (a similar feature) in i3 on Linux very often and casually. The biggest difference is that tabs give me some indication of where windows have been stashed. I'll forget otherwise. If I forget which windows have been stacked, stacking feels like an overcomplicated version of hiding, which I already have with ⌘H.

But if I had borders to indicate stacking, I might use them as frequently as I use tabs in i3.

shajra avatar Feb 07 '24 01:02 shajra

The backbone for this feature is now available, now it only needs a syntax design. I would likely want to address the border for a specific window by its parent window id, as available in the yabai query system.

FelixKratz avatar Mar 05 '24 19:03 FelixKratz

I have now exposed this feature on master through the additional option apply-to=<window-id>. All options modified in this specific borders invocation are then applied only to the given window.

If you have some feedback or improvement ideas let me know.

FelixKratz avatar Mar 17 '24 20:03 FelixKratz