Implement configuration for the Bar
This adds a few new options for the bar (instead of hardcoding all of them). fonts, text_color, background_color, positoon, and margins. Also fixed a couple of bugs when reloading the config and destroying layer shell and wl surfaces in the wrong order.
This commit is contained in:
parent
ce9a972b60
commit
5922107579
9 changed files with 371 additions and 84 deletions
|
|
@ -71,6 +71,38 @@ borders {
|
|||
|
||||
Colors are specified in `0xRRGGBB` or `0xRRGGBBAA` hex format.
|
||||
|
||||
## Bar
|
||||
|
||||
The bar is an optional widget that shows the time on your screen. Right now, that's it.
|
||||
It is only created when a `bar` block is present in the config. All settings have
|
||||
defaults, with the color based on the Catppuccin Mocha theme. An empty block can be used
|
||||
to enable the widget with all defaults:
|
||||
|
||||
```kdl
|
||||
bar {
|
||||
}
|
||||
```
|
||||
|
||||
### Bar Settings
|
||||
|
||||
| Setting | Type | Default | Description |
|
||||
|--------------------|--------|--------------------|-----------------------------------|
|
||||
| `fonts` | string | `monospace:size=14` | Comma-separated FontConfig fonts |
|
||||
| `text_color` | color | `0xcdd6f4` | Text color |
|
||||
| `background_color` | color | `0x1e1e2e` | Background color |
|
||||
| `position` | enum | `top` | Bar position (`top` or `bottom`) |
|
||||
|
||||
### Margins
|
||||
|
||||
The `margins` child block sets pixel offsets from the anchored edge(s).
|
||||
|
||||
| Setting | Type | Default |
|
||||
|----------|------|---------|
|
||||
| `top` | i32 | `0` |
|
||||
| `right` | i32 | `0` |
|
||||
| `bottom` | i32 | `0` |
|
||||
| `left` | i32 | `0` |
|
||||
|
||||
## Tag Overlay
|
||||
|
||||
The tag overlay is an optional widget that briefly shows your tag state when switching tags.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
These are in rough order of my priority, though no promises I do them in this order.
|
||||
|
||||
- [ ] Add options to the bar
|
||||
- [ ] Make a Rect struct to combine x, y, width, and height
|
||||
- [ ] Support window rules (float/tags/SSD by app-id/title)
|
||||
- [ ] Support overriding config location
|
||||
|
|
@ -31,3 +30,4 @@ These are in rough order of my priority, though no promises I do them in this or
|
|||
- [x] Implement an optional clock bar
|
||||
- [x] Implement a river-tag-overlay clone
|
||||
- [x] Add options to the tag overlay
|
||||
- [x] Add options to the bar
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue