Skip to content

Commit

Permalink
docs(readme): update docs about BonsaiBar usage now that it's even si…
Browse files Browse the repository at this point in the history
…mpler with 'tab_bar.hide_L1_when_bonsai_bar_on_screen'
  • Loading branch information
aravinda0 committed Aug 16, 2024
1 parent 4b159fc commit fdba956
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,26 +253,20 @@ keys = [
#### 3. [Optional] Add the BonsaiBar widget to your qtile bar
qtile-bonsai comes with an optional `BonsaiBar` widget that lets you view all
your top-level tabs on the qtile-bar. This lets you hide away the
top-level/outermost tab-bar that is part of the `Bonsai` layout itself and save
some screen space (or simply for aesthetics).
your top-level tabs on the qtile-bar.
The default behavior is to automatically hide the top-level/outermost tab-bar if
there is a `BonsaiBar` widget on the relevant screen. If there isn't, the tab
bar is shown as usual.
```python
from libqtile import bar
from libqtile.config import Screen
from qtile_bonsai import Bonsai, BonsaiBar
from qtile_bonsai import BonsaiBar
# Hide away only the top level of the default tab bar that is available on the
# layout itself. Subtab bars will remain visible.
layouts = [
Bonsai(**{
"L1.tab_bar.hide_when": "always",
}),
]
screens = [
Screen(top=bar.Bar([
Expand Down
1 change: 1 addition & 0 deletions newsfragments/+c.feat
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
New layout option `tab_bar.hide_L1_when_bonsai_bar_on_screen` makes multi-screen setups smoother.
- The L1 (top level) tab bar can be hidden away if there is a `BonsaiBar` widget available on a screen, and the bar would be shown if there was not a widget present.
- This also makes the `BonsaiBar` widget usage simpler - we no longer need to configure `L1.tab_bar.hide_when = "always"` on our layout.
18 changes: 6 additions & 12 deletions templates/README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,26 +253,20 @@ keys = [
#### 3. [Optional] Add the BonsaiBar widget to your qtile bar
qtile-bonsai comes with an optional `BonsaiBar` widget that lets you view all
your top-level tabs on the qtile-bar. This lets you hide away the
top-level/outermost tab-bar that is part of the `Bonsai` layout itself and save
some screen space (or simply for aesthetics).
your top-level tabs on the qtile-bar.
The default behavior is to automatically hide the top-level/outermost tab-bar if
there is a `BonsaiBar` widget on the relevant screen. If there isn't, the tab
bar is shown as usual.
```python
from libqtile import bar
from libqtile.config import Screen
from qtile_bonsai import Bonsai, BonsaiBar
from qtile_bonsai import BonsaiBar
# Hide away only the top level of the default tab bar that is available on the
# layout itself. Subtab bars will remain visible.
layouts = [
Bonsai(**{
"L1.tab_bar.hide_when": "always",
}),
]
screens = [
Screen(top=bar.Bar([
Expand Down

0 comments on commit fdba956

Please sign in to comment.