Skip to content

Commit 4ef4707

Browse files
committed
feat(widget/windows_desktops): add animation option for workspace buttons
Added a new configuration option for button animations in the Windows Desktops widget. This allows users to enable or disable animations for workspace buttons, enhancing the visual experience.
1 parent f18df35 commit 4ef4707

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

docs/widgets/(Widget)-Windows-Desktops.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
| `label_workspace_btn` | string | `'{index}'` | The format string for workspace buttons. |
55
| `label_workspace_active_btn` | string | `'{index}'` | The format string for the active workspace button. |
66
| `switch_workspace_animation` | string | `'true'` | The OS animation to use when switching workspaces. |
7+
| `animation` | bool | `false` | Buttons animation. |
78
| `container_padding` | dict | `{'top': 0, 'left': 0, 'bottom': 0, 'right': 0}` | Explicitly set padding inside widget container.
89

910
## Example Configuration
@@ -25,6 +26,7 @@ windows_workspaces:
2526
- **label_workspace_btn:** The format string for workspace buttons, can be icon or {index}.
2627
- **label_workspace_active_btn:** The format string for the active workspace button, can be icon or {index}.
2728
- **switch_workspace_animation:** The OS animation to use when switching workspaces.
29+
- **animation:** Buttons animation.
2830
- **container_padding:** Explicitly set padding inside widget container.
2931
3032
@@ -34,30 +36,33 @@ windows_workspaces:
3436
.windows-desktops .widget-container {} /*Style for widget container.*/
3537
.windows-desktops .ws-btn {} /*Style for buttons.*/
3638
.windows-desktops .ws-btn.active {} /*Style for the active workspace button.*/
39+
.windows-workspaces .ws-btn.button-1 {} /*Style for first button.*/
40+
.windows-workspaces .ws-btn.button-2 {} /*Style for second button.*/
41+
.windows-workspaces .ws-btn.active.button-1 {} /*Style for the active first workspace button.*/
42+
.windows-workspaces .ws-btn.active.button-2 {} /*Style for the active second workspace button.*/
3743
```
3844

3945
### Example
4046
```css
4147
.windows-desktops {
4248
padding: 0 4px 0 14px;
4349
}
44-
.windows-desktops {
45-
padding: 0 0px 0 10px;
46-
}
4750
.windows-desktops .widget-container {
4851
background-color: #11111b;
4952
margin: 4px 0 4px 0;
5053
border-radius: 12px;
5154
}
52-
.windows-desktops .ws-btn,
53-
.windows-desktops .ws-btn-active {
55+
.windows-desktops .ws-btn {
5456
color: #7f849c;
5557
border: none;
5658
font-size: 14px;
5759
margin: 0 3px;
5860
padding: 0
5961
}
60-
.windows-desktops .ws-btn-active {
62+
.windows-desktops .ws-btn.active {
6163
color: #89b4fa;
6264
}
63-
```
65+
```
66+
67+
> [!NOTE]
68+
> You can use `button-x` to style each button separately. Where x is the index of the button. Index starts from 1.

0 commit comments

Comments
 (0)