You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(whkd): add special_keys option for customizable hotkeys
- Introduced a new `special_keys` list option to allow users to define custom hotkeys.
- Each entry in the list includes a `key` and a `key_replace` for flexible key mapping.
- Updated documentation to reflect the new option and provide examples.
- Added a preview image for better visualization of the widget.
|`animation`| dict |`{'enabled': True, 'type': 'fadeInOut', 'duration': 200}`| Animation settings for the widget. |
10
11
11
12
12
13
## Example Configuration
13
14
14
15
```yaml
15
-
whkd:
16
-
type: "yasb.whkd.WhkdWidget"
17
-
options:
18
-
label: "<span>\uf11c</span>"
16
+
whkd:
17
+
type: "yasb.whkd.WhkdWidget"
18
+
options:
19
+
label: "<span>\uf11c</span>"
20
+
special_keys:
21
+
- key: "win"
22
+
key_replace: "\ue70f"
23
+
- key: "ctrl"
24
+
key_replace: "Ctrl"
25
+
- key: "alt"
26
+
key_replace: "Alt"
27
+
- key: "shift"
28
+
key_replace: "Shift"
29
+
- key: "left"
30
+
key_replace: "\u2190"
31
+
- key: "right"
32
+
key_replace: "\u2192"
33
+
- key: "up"
34
+
key_replace: "\u2191"
35
+
- key: "down"
36
+
key_replace: "\u2193"
19
37
```
20
38
## Description of Options
21
39
22
40
- **label:** The string for the label button.
41
+
- **special_keys:** A list of special keys to be used as hotkeys. The list contains dictionaries with two keys: `key` and `key_replace`. The `key` is the special key to be used as a hotkey and the `key_replace` is the string to replace the special key with.
42
+
- **key:** The special key to be used as a hotkey.
43
+
- **key_replace:** The string to replace the special key with.
23
44
- **container_padding:** Explicitly set padding inside widget container.
24
45
- **animation:** A dictionary specifying the animation settings for the widget. It contains three keys: `enabled`, `type`, and `duration`. The `type` can be `fadeInOut` and the `duration` is the animation duration in milliseconds.
25
46
26
-
## Example Style
47
+
> [!NOTE]
48
+
> The special keys are keys which you can style and replace with custom icons. Special keys settings are optional. If you don't want to use special keys, you can leave the `special_keys` option empty.
49
+
50
+
> [!NOTE]
51
+
> To use header like on screenshot below, you need to edit whkdrc and comment string with double hash `##`. Example `## Open Applications`
0 commit comments