mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 10:41:03 +02:00
feat(tray): option to prefer theme-provided icons
This commit is contained in:
parent
004ea76da5
commit
ba004455b2
2 changed files with 13 additions and 10 deletions
|
@ -6,11 +6,11 @@ Displays a fully interactive icon tray using the KDE `libappindicator` protocol.
|
||||||
|
|
||||||
> Type: `tray`
|
> Type: `tray`
|
||||||
|
|
||||||
|
| Name | Type | Default | Description |
|
||||||
| Name | Type | Default | Description |
|
|----------------------|-----------|-----------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|-------------|-----------|-----------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
|
| `direction` | `string` | `left_to_right` if bar is horizontal, `top_to_bottom` otherwise | Direction to display the tray items. Possible values: `top_to_bottom`, `bottom_to_top`, `left_to_right`, `right_to_left` |
|
||||||
| `direction` | `string` | `left_to_right` if bar is horizontal, `top_to_bottom` otherwise | Direction to display the tray items. Possible values: `top_to_bottom`, `bottom_to_top`, `left_to_right`, `right_to_left` |
|
| `icon_size` | `integer` | `16` | Size in pixels to display tray icons as. |
|
||||||
| `icon_size` | `integer` | `16` | Size in pixels to display tray icons as |
|
| `prefer_theme_icons` | `bool` | `true` | Requests that icons from the theme be used over the item-provided item. Most items only provide one or the other so this will have no effect in most circumstances. |
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>JSON</summary>
|
<summary>JSON</summary>
|
||||||
|
@ -55,12 +55,12 @@ end:
|
||||||
|
|
||||||
```corn
|
```corn
|
||||||
{
|
{
|
||||||
end = [
|
end = [
|
||||||
{
|
{
|
||||||
type = "tray"
|
type = "tray"
|
||||||
direction = "top_to_bottom"
|
direction = "top_to_bottom"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,9 @@ use tracing::{debug, error, warn};
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Clone)]
|
#[derive(Debug, Deserialize, Clone)]
|
||||||
pub struct TrayModule {
|
pub struct TrayModule {
|
||||||
|
#[serde(default = "crate::config::default_true")]
|
||||||
|
prefer_theme_icons: bool,
|
||||||
|
|
||||||
#[serde(default = "default_icon_size")]
|
#[serde(default = "default_icon_size")]
|
||||||
icon_size: u32,
|
icon_size: u32,
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue