mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-16 22:31:03 +02:00
feat: fully implement orientation/justify options
Adds `orientation` and `justify` options to all modules and custom widgets where it makes sense to do so. Any modules without support document this. Widgets fully document the options inline where present for now. Resolves #296
This commit is contained in:
parent
0855039bce
commit
c20feb77b7
29 changed files with 317 additions and 161 deletions
|
@ -351,7 +351,14 @@ For information on the `Script` type, and embedding scripts in strings, see [her
|
|||
| Name | Type | Default | Description |
|
||||
|-----------|----------|---------|-----------------------------------------------------------------------------------|
|
||||
| `tooltip` | `string` | `null` | Shows this text on hover. Supports embedding scripts between `{{double braces}}`. |
|
||||
| `name` | `string` | `null` | Sets the unique widget name, allowing you to style it using `#name`. |
|
||||
| `class` | `string` | `null` | Sets one or more CSS classes, allowing you to style it using `.class`. |
|
||||
| `name` | `string` | `null` | The unique widget name, allowing you to style it using `#name`. |
|
||||
| `class` | `string` | `null` | One or more CSS classes, allowing you to style it using `.class`. |
|
||||
|
||||
For more information on styling, please see the [styling guide](styling-guide).
|
||||
|
||||
#### Formatting
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|---------------|--------------------------------------------------------|----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `orientation` | `horizontal` or `vertical` (shorthand: `'h'` or `'v'`) | `horizontal` or `vertical` | The direction in which the widget and its text are laid out. Some modules additionally provide a `direction` option to provide further control. |
|
||||
| `justify` | `left`, `right`, `center`, `fill` | `left` | The justification (alignment) of the widget text shown on the bar. |
|
||||
|
|
|
@ -71,12 +71,13 @@ A clickable button, which can run a command when clicked.
|
|||
|
||||
> Type `button`
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|------------|-------------------------------------------------|---------|--------------------------------------------------------------------------------------------------|
|
||||
| `label` | [Dynamic String](dynamic-values#dynamic-string) | `null` | Widget text label. Pango markup and embedded scripts are supported. Ignored if `widgets` is set. |
|
||||
| `widgets` | `(Module or Widget)[]` | `[]` | List of modules/widgets to add to this button. |
|
||||
| `on_click` | `string [command]` | `null` | Command to execute. More on this [below](#commands). |
|
||||
| `orientation` | `'horizontal'` or `'vertical'` (shorthand: `'h'` or `'v'`) | `'horizontal'` | Orientation of the button. |
|
||||
| Name | Type | Default | Description |
|
||||
|---------------|------------------------------------------------------------|----------------|--------------------------------------------------------------------------------------------------|
|
||||
| `label` | [Dynamic String](dynamic-values#dynamic-string) | `null` | Widget text label. Pango markup and embedded scripts are supported. Ignored if `widgets` is set. |
|
||||
| `widgets` | `(Module or Widget)[]` | `[]` | List of modules/widgets to add to this button. |
|
||||
| `on_click` | `string [command]` | `null` | Command to execute. More on this [below](#commands). |
|
||||
| `orientation` | `'horizontal'` or `'vertical'` (shorthand: `'h'` or `'v'`) | `'horizontal'` | Orientation of the label text. |
|
||||
| `justify` | `'left'`, `'right'`, `'center'`, or `'fill'` | `'left'` | Justification (alignment) of the label text. |
|
||||
|
||||
#### Image
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@ Supports wired ethernet, wifi, cellular data and VPN connections among others.
|
|||
|-------------|-----------|---------|-------------------------|
|
||||
| `icon_size` | `integer` | `24` | Size to render icon at. |
|
||||
|
||||
> [!NOTE]
|
||||
> This module does not support module-level [layout options](module-level-options#layout).
|
||||
|
||||
<details>
|
||||
<summary>JSON</summary>
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ Clicking the widget opens the SwayNC panel.
|
|||
| `icons.open_some` | `string` | `` | Icon to show when the panel is open, with notifications. |
|
||||
| `icons.open_dnd` | `string` | `` | Icon to show when the panel is open, with DnD enabled. Takes higher priority than count-based icons. |
|
||||
|
||||
> [!NOTE]
|
||||
> This module does not support module-level [layout options](module-level-options#layout).
|
||||
|
||||
<details>
|
||||
<summary>JSON</summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue