1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-02 11:11:04 +02:00

feat(workspaces): support for using images in name_map

This commit is contained in:
Jake Stanger 2023-01-29 22:48:42 +00:00
parent 3cf9be89fd
commit b054c17d14
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
13 changed files with 132 additions and 64 deletions

View file

@ -25,7 +25,7 @@ It is well worth looking at the examples.
| `class` | `string` | `null` | Widget class name. |
| `label` | `string` | `null` | [`label` and `button`] Widget text label. Pango markup supported. |
| `on_click` | `string` | `null` | [`button`] Command to execute. More on this [below](#commands). |
| `src` | `string` | `null` | [`image`] Image source. More on this [below](#images). |
| `src` | `image` | `null` | [`image`] Image source. See [here](images) for information on images. |
| `size` | `integer` | `null` | [`image`] Width/height of the image. Aspect ratio is preserved. |
| `orientation` | `horizontal` or `vertical` | `horizontal` | [`box`] Whether child widgets should be horizontally or vertically added. |
| `widgets` | `Widget[]` | `[]` | [`box`] List of widgets to add to this box. |
@ -58,17 +58,6 @@ The following bar commands are supported:
- `popup:open`
- `popup:close`
### Images
Ironbar is capable of loading images from multiple sources:
- GTK icons: `icon:firefox`
- Local files: `file:///path/to/file.jpg`
- Remote files (over HTTP/HTTPS): `https://example.com/image.jpg`
Remote images are loaded asynchronously to avoid blocking the UI thread.
Be aware this can cause elements to change size upon load if the image is large enough.
---
XML is arguably better-suited and easier to read for this sort of markup,