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 f5f8bd8
Show file tree
Hide file tree
Showing 2 changed files with 12 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
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 f5f8bd8

Please sign in to comment.