komorebi icon indicating copy to clipboard operation
komorebi copied to clipboard

[FEAT]: Stackbar

Open LGUG2Z opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. I'd like visual indicators of which windows are in a given stack in the form of a stackbar.

Describe the solution you'd like When a container has more than one window, a stackbar appears on top of the windows.

Describe alternatives you've considered Different border colours for multi-window containers are implemented, but this would be even more helpful for understanding what is in a stack at any given time, especially when coming back a running computer after some time away.

Additional context This has been implemented by @eythaann in their fork, though there is considerable drift in how the code is structured in the fork.

image

I believe the relevant commits are these:

https://github.com/eythaann/komorebi/commit/953703e5f98045062e723b16c5f7abc323fe4150 https://github.com/eythaann/komorebi/commit/68728c3fb675db0f0baed6228fbcd7d14f63d481 https://github.com/eythaann/komorebi/commit/75d580264070e04efa5c133214adc53eb8e702ac https://github.com/eythaann/komorebi/commit/e8b7ec4161c63b662ac7779e823a87c650ae79db

LGUG2Z avatar Feb 24 '24 17:02 LGUG2Z

@LGUG2Z Basically is easy to do a PR but I have to do it manually, using cherry pick is imposible in this case, but I love follow encapsulation principle so copying the top_bar.rs file is the most part of the feature, also testing it I have a specifit issue:

  1. the most important is that for some reason the top bar does not work in the release version I had change the optimizations value to 1, so it works now. the reason is that the creation method the HWND returns 0 so the window was not created. (I really don't know why this happen with default optimization level 3 so in my fork I changed it to 1)

eythaann avatar Feb 25 '24 00:02 eythaann

I missed this title in the search, so I accidentally duped it

reposting the zellij stacked titles screenshot (left side) because it might be a useful reference

309364288-1ca09134-c1eb-47b9-9d70-2d19d1425564

NireBryce avatar Mar 01 '24 19:03 NireBryce

@NireBryce You're welcome to play around with what is on the branch here: https://github.com/LGUG2Z/komorebi/tree/feature/stackbar

It's functional, but I'm sure there are some edge cases waiting to be found. Here is the config snippet (top-level in komorebi.json) that I am using when I work on that branch:

{
  "stackbar": {
    "height": 40,
    "mode": "OnStack",
    "tabs": {
      "width": 300,
      "focused_text": "#00a542",
      "unfocused_text": "#b3b3b3",
      "background": "#141414",
    }
  }
}

LGUG2Z avatar Mar 01 '24 20:03 LGUG2Z