-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added a declarative config for the BarPlugin. - To improve testability, `BarComponent` is now an abstract record. This doesn't change the behavior of the bar. - Added missing docs for the window backdrop
- Loading branch information
Showing
24 changed files
with
1,303 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
# Styling | ||
|
||
[!INCLUDE [Styling](../../_includes/core/styling.md)] | ||
|
||
## Backdrops | ||
|
||
Different Whim windows can support custom backdrops. They will generally be associated with a `backdrop` key in the YAML/JSON configuration. The following backdrops are available: | ||
|
||
- `none`: No backdrop | ||
- `acrylic`: An [acrylic backdrop](https://docs.microsoft.com/en-us/windows/apps/design/style/acrylic) | ||
- `acrylic_thin`: A more transparent Acrylic backdrop - based on the Acrylic backdrop | ||
|
||
| Type | Description | WinUI Documentation | | ||
| -------------- | ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | ||
| `none` | No backdrop | N/A | | ||
| `acrylic` | A translucent texture that blurs the content behind it. | [Acrylic material](https://docs.microsoft.com/en-us/windows/apps/design/style/acrylic) | | ||
| `acrylic_thin` | A more transparent version of the Acrylic backdrop. | N/A | | ||
| `mica` | An opaque, dynamic material that incorpoates theme and the desktop wallpaper. Mica has better performance than Acrylic. | [Mica material](https://learn.microsoft.com/en-us/windows/apps/design/style/mica) | | ||
| `mica_alt` | A variant of Mica with stronger tinting of the user's background color. | [Mica alt material](https://learn.microsoft.com/en-us/windows/apps/design/style/mica) | | ||
|
||
### Configuration | ||
|
||
| Property | Description | | ||
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `type` | The type of backdrop to use. | | ||
| `always_show_backdrop` | By default, WinUI will disable the backdrop when the window loses focus. Whim overrides this setting. Set this to false to disable the backdrop when the window loses focus. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,86 @@ | ||
# Bar Plugin | ||
|
||
👷🏗️🚧 | ||
The `BarPlugin` adds a configurable bar at the top of each monitor. | ||
|
||
## Tree Layout | ||
![Bar demo](../../images/bar-demo.png) | ||
|
||
👷🏗️🚧 | ||
```yaml | ||
plugins: | ||
bar: | ||
left_components: | ||
entries: | ||
- type: workspace_widget | ||
|
||
center_components: | ||
entries: | ||
- type: focused_window_widget | ||
shorten_title: true | ||
|
||
right_components: | ||
entries: | ||
- type: battery_widget | ||
- type: active_layout_widget | ||
- type: date_time_widget | ||
format: HH:mm:ss, dd MMM yyyy | ||
- type: tree_layout_widget | ||
``` | ||
## Configuration | ||
| Property | Description | | ||
| ------------------- | ------------------------------------------------------------------------------- | | ||
| `is_enabled` | Whether the plugin is enabled | | ||
| `height` | The height of the bar in pixels. | | ||
| `backdrop` | The backdrop to use for the bar - see [Backdrops](../core/styling.md#backdrops) | | ||
| `left_components` | The widgets to display on the left side of the bar. | | ||
| `center_components` | The widgets to display in the center of the bar. | | ||
| `right_components` | The widgets to display on the right side of the bar. | | ||
|
||
## Components | ||
|
||
The `left_components`, `center_components`, and `right_components` properties have lists of components under the `entries` key. Each component has a `type` key that specifies the type of widget to use. The following widgets are available: | ||
|
||
- [Configuration](#configuration) | ||
- [Components](#components) | ||
- [Widgets](#widgets) | ||
- [Active Layout Widget](#active-layout-widget) | ||
- [Battery Widget](#battery-widget) | ||
- [Date Time Widget](#date-time-widget) | ||
- [Focused Window Widget](#focused-window-widget) | ||
- [Workspace Widget](#workspace-widget) | ||
- [Tree Layout Widget](#tree-layout-widget) | ||
|
||
## Widgets | ||
|
||
### Active Layout Widget | ||
|
||
The `ActiveLayoutWidget` displays the name of the current layout. | ||
|
||
### Battery Widget | ||
|
||
The `BatteryWidget` displays the battery percentage and status. | ||
|
||
### Date Time Widget | ||
|
||
The `DateTimeWidget` displays the current date and time. | ||
|
||
| Property | Description | | ||
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| `interval` | The interval in milliseconds to update the date and time. | | ||
| `format` | The format to display the date and time in. For more, see [Custom date and time format strings](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings) | | ||
|
||
### Focused Window Widget | ||
|
||
The `FocusedWindowWidget` displays the title of the focused window. | ||
|
||
| Property | Description | | ||
| --------------- | ------------------------------------------- | | ||
| `shorten_title` | Whether to shorten the title of the window. | | ||
|
||
### Workspace Widget | ||
|
||
The `WorkspaceWidget` displays the name of the current workspace. | ||
|
||
### Tree Layout Widget | ||
|
||
The `TreeLayoutWidget` displays the direction to add windows in the tree layout engine on the current workspace. This will only show if the current layout in the workspace is a tree layout. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.