mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 18:51:04 +02:00
Merge branch 'master' into feat/networkmanager
This commit is contained in:
commit
9031438f56
42 changed files with 2378 additions and 383 deletions
|
@ -20,6 +20,8 @@ You also need rust; only the latest stable version is supported.
|
|||
pacman -S gtk3 gtk-layer-shell
|
||||
# for http support
|
||||
pacman -S openssl
|
||||
# for volume support
|
||||
pacman -S libpulse
|
||||
```
|
||||
|
||||
### Ubuntu/Debian
|
||||
|
@ -28,6 +30,8 @@ pacman -S openssl
|
|||
apt install build-essential libgtk-3-dev libgtk-layer-shell-dev
|
||||
# for http support
|
||||
apt install libssl-dev
|
||||
# for volume support
|
||||
apt install libpulse-dev
|
||||
```
|
||||
|
||||
### Fedora
|
||||
|
@ -36,6 +40,8 @@ apt install libssl-dev
|
|||
dnf install gtk3-devel gtk-layer-shell-devel
|
||||
# for http support
|
||||
dnf install openssl-devel
|
||||
# for volume support
|
||||
dnf install libpulseaudio-devel
|
||||
```
|
||||
|
||||
## Features
|
||||
|
@ -81,6 +87,7 @@ cargo build --release --no-default-features \
|
|||
| sys_info | Enables the `sys_info` module. |
|
||||
| tray | Enables the `tray` module. |
|
||||
| upower | Enables the `upower` module. |
|
||||
| volume | Enables the `volume` module. |
|
||||
| workspaces+all | Enables the `workspaces` module with support for all compositors. |
|
||||
| workspaces+sway | Enables the `workspaces` module with support for Sway. |
|
||||
| workspaces+hyprland | Enables the `workspaces` module with support for Hyprland. |
|
||||
|
|
|
@ -30,8 +30,10 @@
|
|||
- [Label](label)
|
||||
- [Launcher](launcher)
|
||||
- [Music](music)
|
||||
- [Notifications](notifications)
|
||||
- [Script](script)
|
||||
- [Sys_Info](sys-info)
|
||||
- [Tray](tray)
|
||||
- [Upower](upower)
|
||||
- [Volume](volume)
|
||||
- [Workspaces](workspaces)
|
||||
|
|
116
docs/modules/Notifications.md
Normal file
116
docs/modules/Notifications.md
Normal file
|
@ -0,0 +1,116 @@
|
|||
Displays information about the current SwayNC state such as notification count and DnD.
|
||||
Clicking the widget opens the SwayNC panel.
|
||||
|
||||

|
||||
|
||||
> [!NOTE]
|
||||
> This widget requires the [SwayNC](https://github.com/ErikReider/SwayNotificationCenter)
|
||||
> daemon to be running to use.
|
||||
|
||||
## Configuration
|
||||
|
||||
> Type: `notifications`
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|---------------------|-----------|---------|--------------------------------------------------------------------------------------------------------|
|
||||
| `show_count` | `boolean` | `true` | Whether to show the current notification count. |
|
||||
| `icons.closed_none` | `string` | `` | Icon to show when the panel is closed, with no notifications. |
|
||||
| `icons.closed_some` | `string` | `` | Icon to show when the panel is closed, with notifications. |
|
||||
| `icons.closed_dnd` | `string` | `` | Icon to show when the panel is closed, with DnD enabled. Takes higher priority than count-based icons. |
|
||||
| `icons.open_none` | `string` | `` | Icon to show when the panel is open, with no notifications. |
|
||||
| `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. |
|
||||
|
||||
|
||||
<details>
|
||||
<summary>JSON</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"end": [
|
||||
{
|
||||
"type": "notifications",
|
||||
"show_count": true,
|
||||
"icons": {
|
||||
"closed_none": "",
|
||||
"closed_some": "",
|
||||
"closed_dnd": "",
|
||||
"open_none": "",
|
||||
"open_some": "",
|
||||
"open_dnd": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>TOML</summary>
|
||||
|
||||
```toml
|
||||
[[end]]
|
||||
type = "notifications"
|
||||
show_count = true
|
||||
|
||||
[[end.icons]]
|
||||
closed_none = ""
|
||||
closed_some = ""
|
||||
closed_dnd = ""
|
||||
open_none = ""
|
||||
open_some = ""
|
||||
open_dnd = ""
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>YAML</summary>
|
||||
|
||||
```yaml
|
||||
end:
|
||||
- type: notifications
|
||||
show_count: true
|
||||
icons:
|
||||
closed_none:
|
||||
closed_some:
|
||||
closed_dnd:
|
||||
open_none:
|
||||
open_some:
|
||||
open_dnd:
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Corn</summary>
|
||||
|
||||
```corn
|
||||
{
|
||||
end = [
|
||||
{
|
||||
type = "notifications"
|
||||
show_count = true
|
||||
|
||||
icons.closed_none = ""
|
||||
icons.closed_some = ""
|
||||
icons.closed_dnd = ""
|
||||
icons.open_none = ""
|
||||
icons.open_some = ""
|
||||
icons.open_dnd = ""
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Styling
|
||||
|
||||
| Selector | Description |
|
||||
|-------------------------|---------------------------------------|
|
||||
| `.notifications` | Notifications widget button |
|
||||
| `.notifications .count` | Notifications count indicator overlay |
|
||||
|
||||
For more information on styling, please see the [styling guide](styling-guide).
|
|
@ -6,7 +6,10 @@ Displays a fully interactive icon tray using the KDE `libappindicator` protocol.
|
|||
|
||||
> Type: `tray`
|
||||
|
||||
***This module provides no configuration options.***
|
||||
|
||||
| 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` |
|
||||
|
||||
<details>
|
||||
<summary>JSON</summary>
|
||||
|
@ -15,7 +18,8 @@ Displays a fully interactive icon tray using the KDE `libappindicator` protocol.
|
|||
{
|
||||
"end": [
|
||||
{
|
||||
"type": "tray"
|
||||
"type": "tray",
|
||||
"direction": "top_to_bottom"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -29,6 +33,7 @@ Displays a fully interactive icon tray using the KDE `libappindicator` protocol.
|
|||
```toml
|
||||
[[end]]
|
||||
type = "tray"
|
||||
direction = "top_to_bottom"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
@ -39,6 +44,7 @@ type = "tray"
|
|||
```yaml
|
||||
end:
|
||||
- type: "tray"
|
||||
direction: "top_to_bottom"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
@ -49,7 +55,10 @@ end:
|
|||
```corn
|
||||
{
|
||||
end = [
|
||||
{ type = "tray" }
|
||||
{
|
||||
type = "tray"
|
||||
direction = "top_to_bottom"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
@ -63,4 +72,4 @@ end:
|
|||
| `.tray` | Tray widget box |
|
||||
| `.tray .item` | Tray icon button |
|
||||
|
||||
For more information on styling, please see the [styling guide](styling-guide).
|
||||
For more information on styling, please see the [styling guide](styling-guide).
|
||||
|
|
128
docs/modules/Volume.md
Normal file
128
docs/modules/Volume.md
Normal file
|
@ -0,0 +1,128 @@
|
|||
Displays the current volume level.
|
||||
Clicking on the widget opens a volume mixer, which allows you to change the device output level,
|
||||
the default playback device, and control application volume levels individually.
|
||||
|
||||
This requires PulseAudio to function (`pipewire-pulse` is supported).
|
||||
|
||||

|
||||
|
||||
## Configuration
|
||||
|
||||
> Type: `volume`
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|-----------------------|----------|------------------------|----------------------------------------------------------------------------------------------------------------|
|
||||
| `format` | `string` | `{icon} {percentage}%` | Format string to use for the widget button label. |
|
||||
| `max_volume` | `float` | `100` | Maximum value to allow volume sliders to reach. Pulse supports values > 100 but this may result in distortion. |
|
||||
| `icons.volume_high` | `string` | `` | Icon to show for high volume levels. |
|
||||
| `icons.volume_medium` | `string` | `` | Icon to show for medium volume levels. |
|
||||
| `icons.volume_low` | `string` | `` | Icon to show for low volume levels. |
|
||||
| `icons.muted` | `string` | `` | Icon to show for muted outputs. |
|
||||
|
||||
<details>
|
||||
<summary>JSON</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"end": [
|
||||
{
|
||||
"type": "volume",
|
||||
"format": "{icon} {percentage}%",
|
||||
"max_volume": 100,
|
||||
"icons": {
|
||||
"volume_high": "",
|
||||
"volume_medium": "",
|
||||
"volume_low": "",
|
||||
"muted": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>TOML</summary>
|
||||
|
||||
```toml
|
||||
[[end]]
|
||||
type = "volume"
|
||||
format = "{icon} {percentage}%"
|
||||
max_volume = 100
|
||||
|
||||
[[end.icons]]
|
||||
volume_high = ""
|
||||
volume_medium = ""
|
||||
volume_low = ""
|
||||
muted = ""
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>YAML</summary>
|
||||
|
||||
```yaml
|
||||
end:
|
||||
- type: "volume"
|
||||
format: "{icon} {percentage}%"
|
||||
max_volume: 100
|
||||
icons:
|
||||
volume_high: ""
|
||||
volume_medium: ""
|
||||
volume_low: ""
|
||||
muted: ""
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Corn</summary>
|
||||
|
||||
```corn
|
||||
{
|
||||
end = [
|
||||
{
|
||||
type = "volume"
|
||||
format = "{icon} {percentage}%"
|
||||
max_volume = 100
|
||||
icons.volume_high = ""
|
||||
icons.volume_medium = ""
|
||||
icons.volume_low = ""
|
||||
icons.muted = ""
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Formatting Tokens
|
||||
|
||||
The following tokens can be used in the `format` config option:
|
||||
|
||||
| Token | Description |
|
||||
|----------------|-------------------------------------------|
|
||||
| `{percentage}` | The active device volume percentage. |
|
||||
| `{icon}` | The icon representing the current volume. |
|
||||
| `{name}` | The active device name. |
|
||||
|
||||
## Styling
|
||||
|
||||
| Selector | Description |
|
||||
|----------------------------------------------|----------------------------------------------------|
|
||||
| `.volume` | Volume widget button. |
|
||||
| `.popup-volume` | Volume popup box. |
|
||||
| `.popup-volume .device-box` | Box for the device volume controls. |
|
||||
| `.popup-volume .device-box .device-selector` | Default device dropdown selector. |
|
||||
| `.popup-volume .device-box .slider` | Device volume slider. |
|
||||
| `.popup-volume .device-box .btn-mute` | Device volume mute toggle button. |
|
||||
| `.popup-volume .apps-box` | Parent box for the application volume controls. |
|
||||
| `.popup-volume .apps-box .app-box` | Box for an individual application volume controls. |
|
||||
| `.popup-volume .apps-box .app-box .title` | Name of the application playback stream. |
|
||||
| `.popup-volume .apps-box .app-box .slider` | Application volume slider. |
|
||||
| `.popup-volume .apps-box .app-box .btn-mute` | Application volume mute toggle button. |
|
||||
|
||||
For more information on styling, please see the [styling guide](styling-guide).
|
Loading…
Add table
Add a link
Reference in a new issue