forge
Explore
Log in

Don't you dare go Hollow

wiki: Document tab indicators

Browse files at this commit

41e9ec13647d13b68346a0fe4022baebd1a0f9ffIvan MolodetskikhParent: 64544a5
wiki/Configuration:-Layout.mdmodified+56 -0
@@ -54,6 +54,19 @@ layout {
54 // inactive-color "#00000054"54 // inactive-color "#00000054"
55 }55 }
56 56
57+ tab-indicator {
58+ // off
59+ hide-when-single-tab
60+ gap 5
61+ width 4
62+ length total-proportion=1.0
63+ position "right"
64+ active-color "red"
65+ inactive-color "gray"
66+ // active-gradient from="#80c8ff" to="#bbddff" angle=45
67+ // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
68+ }
69+
57 insert-hint {70 insert-hint {
58 // off71 // off
59 color "#ffc87f80"72 color "#ffc87f80"
@@ -391,6 +404,49 @@ layout {
391 prefer-no-csd404 prefer-no-csd
392 ```405 ```
393 406
407+### `tab-indicator`
408+
409+<sup>Since: next release</sup>
410+
411+Controls the appearance of the tab indicator that appears next to columns in tabbed display mode.
412+
413+Set `off` to hide the tab indicator.
414+
415+Set `hide-when-single-tab` to hide the indicator for tabbed columns that only have a single window.
416+
417+`gap` sets the gap between the tab indicator and the window.
418+The gap can be negative, this will put the tab indicator on top of the window.
419+
420+`width` sets the thickness of the indicator.
421+
422+`length` controls the length of the indicator.
423+Set the `total-proportion` property to make tabs take up this much length relative to the window size.
424+By default, the tab indicator has length equal to half of the window size, or `length total-proportion=0.5`.
425+
426+`position` sets the position of the tab indicator relative to the window.
427+It can be `left`, `right`, `top`, or `bottom`.
428+
429+`active-color`, `inactive-color`, `active-gradient`, `inactive-gradient` let you override the colors for the tabs.
430+They have the same semantics as the border and focus ring colors and gradients.
431+
432+Tab colors are picked in this order:
433+1. Colors from the `tab-indicator` window rule, if set.
434+1. Colors from the `tab-indicator` layout options, if set (you're here).
435+1. If neither are set, niri picks the color matching the window border or focus ring, whichever one is active.
436+
437+```kdl
438+// Make the tab indicator wider and match the window height,
439+// also put it at the top.
440+layout {
441+ tab-indicator {
442+ width 8
443+ gap 8
444+ length total-proportion=1.0
445+ position "top"
446+ }
447+}
448+```
449+
394 ### `insert-hint`450 ### `insert-hint`
395 451
396 <sup>Since: 0.1.10</sup> 452 <sup>Since: 0.1.10</sup>
wiki/Configuration:-Window-Rules.mdmodified+26 -0
@@ -81,6 +81,13 @@ window-rule {
81 // inactive-color "#00000064"81 // inactive-color "#00000064"
82 }82 }
83 83
84+ tab-indicator {
85+ active-color "red"
86+ inactive-color "gray"
87+ // active-gradient from="#80c8ff" to="#bbddff" angle=45
88+ // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
89+ }
90+
84 geometry-corner-radius 1291 geometry-corner-radius 12
85 clip-to-geometry true92 clip-to-geometry true
86 93
@@ -665,6 +672,25 @@ window-rule {
665 }672 }
666 ```673 ```
667 674
675+#### `tab-indicator`
676+
677+<sup>Since: next release</sup>
678+
679+Override the tab indicator options for the window.
680+
681+Options in this rule match the same options as the normal tab indicator config in the [layout](./Configuration:-Layout.md) section, so check the documentation there.
682+
683+```kdl
684+// Make KeePassXC tab have a dark red inactive color.
685+window-rule {
686+ match app-id=r#"^org\.keepassxc\.KeePassXC$"#
687+
688+ tab-indicator {
689+ inactive-color "darkred"
690+ }
691+}
692+```
693+
668 #### `geometry-corner-radius`694 #### `geometry-corner-radius`
669 695
670 <sup>Since: 0.1.6</sup>696 <sup>Since: 0.1.6</sup>