-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rename sway_mode to bindmode and add Hyprland support
- Loading branch information
Showing
10 changed files
with
244 additions
and
174 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 |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
|
||
# Modules | ||
|
||
- [Bindmode](bindmode) | ||
- [Cairo](cairo) | ||
- [Clipboard](clipboard) | ||
- [Clock](clock) | ||
|
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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
Displays Sway's current binding mode or [Hyprland's current submap](https://wiki.hyprland.org/Configuring/Binds/#submaps) | ||
in a label. If the current sway mode is "default", nothing is displayed. | ||
|
||
## Configuration | ||
|
||
> Type: `bindmode` | ||
| Name | Type | Default | Description | | ||
| --------------------- | ------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `truncate` | `'start'` or `'middle'` or `'end'` or `Map` | `null` | The location of the ellipses and where to truncate text from. Leave null to avoid truncating. Use the long-hand `Map` version if specifying a length. | | ||
| `truncate.mode` | `'start'` or `'middle'` or `'end'` | `null` | The location of the ellipses and where to truncate text from. Leave null to avoid truncating. | | ||
| `truncate.length` | `integer` | `null` | The fixed width (in chars) of the widget. Leave blank to let GTK automatically handle. | | ||
| `truncate.max_length` | `integer` | `null` | The maximum number of characters before truncating. Leave blank to let GTK automatically handle. | | ||
|
||
<details> | ||
<summary>JSON</summary> | ||
|
||
```json | ||
{ | ||
"end": [ | ||
{ | ||
"type": "bindmode", | ||
"truncate": "start" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
</details> | ||
|
||
<details> | ||
<summary>TOML</summary> | ||
|
||
```toml | ||
[[end]] | ||
type = "bindmode" | ||
truncate = "start" | ||
``` | ||
|
||
</details> | ||
|
||
<details> | ||
<summary>YAML</summary> | ||
|
||
```yaml | ||
end: | ||
- type: "bindmode" | ||
truncate: "start" | ||
``` | ||
</details> | ||
<details> | ||
<summary>Corn</summary> | ||
```corn | ||
{ | ||
end = [ | ||
{ | ||
type = "bindmode" | ||
truncate = "start" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
</details> | ||
|
||
## Styling | ||
|
||
| Selector | Description | | ||
| ----------- | ---------------------- | | ||
| `.bindmode` | Bind mode label widget | | ||
|
||
For more information on styling, please see the [styling guide](styling-guide). |
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,78 +1,11 @@ | ||
Displays the current sway mode in a label. If the current sway mode is | ||
Displays Sway's current binding mode in a label. If the current sway mode is | ||
"default", nothing is displayed. | ||
|
||
> [!NOTE] | ||
> This module only works under the [Sway](https://swaywm.org/) compositor. | ||
> This module is now only a alias for the [Bindmode](Bindmode.md) module, which | ||
> supports both Sway and Hyprland. See the mentioned module for more | ||
> information. | ||
## Configuration | ||
|
||
> Type: `sway-mode` | ||
| Name | Type | Default | Description | | ||
| --------------------- | ------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `truncate` | `'start'` or `'middle'` or `'end'` or `Map` | `null` | The location of the ellipses and where to truncate text from. Leave null to avoid truncating. Use the long-hand `Map` version if specifying a length. | | ||
| `truncate.mode` | `'start'` or `'middle'` or `'end'` | `null` | The location of the ellipses and where to truncate text from. Leave null to avoid truncating. | | ||
| `truncate.length` | `integer` | `null` | The fixed width (in chars) of the widget. Leave blank to let GTK automatically handle. | | ||
| `truncate.max_length` | `integer` | `null` | The maximum number of characters before truncating. Leave blank to let GTK automatically handle. | | ||
|
||
<details> | ||
<summary>JSON</summary> | ||
|
||
```json | ||
{ | ||
"end": [ | ||
{ | ||
"type": "sway-mode", | ||
"truncate": "start" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
</details> | ||
|
||
<details> | ||
<summary>TOML</summary> | ||
|
||
```toml | ||
[[end]] | ||
type = "sway-mode" | ||
truncate = "start" | ||
``` | ||
|
||
</details> | ||
|
||
<details> | ||
<summary>YAML</summary> | ||
|
||
```yaml | ||
end: | ||
- type: "sway-mode" | ||
truncate: "start" | ||
``` | ||
</details> | ||
<details> | ||
<summary>Corn</summary> | ||
```corn | ||
{ | ||
end = [ | ||
{ | ||
type = "sway-mode" | ||
truncate = "start" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
</details> | ||
|
||
## Styling | ||
|
||
| Selector | Description | | ||
| ------------ | ---------------------- | | ||
| `.sway_mode` | Sway mode label widget | | ||
|
||
For more information on styling, please see the [styling guide](styling-guide). | ||
> Type: `sway_mode` |
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.