Skip to content

Commit abf1c12

Browse files
authored
Merge pull request #651 from JakeStanger/feat/launcher-truncate
Launcher truncate options & related refactors
2 parents 39f02a1 + da13b9d commit abf1c12

19 files changed

+230
-146
lines changed

Diff for: Cargo.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/modules/Clipboard.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ Supports plain text and images.
1212

1313
> Type: `clipboard`
1414
15-
| Name | Type | Default | Description |
16-
|-----------------------|---------------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
17-
| `icon` | `string` or [image](images) | `󰨸` | Icon to show on the widget button. |
18-
| `icon_size` | `integer` | `32` | Size to render icon at (image icons only). |
19-
| `max_items` | `integer` | `10` | Maximum number of items to show in the popup. |
20-
| `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. |
21-
| `truncate.mode` | `'start'` or `'middle'` or `'end'` | `null` | The location of the ellipses and where to truncate text from. Leave null to avoid truncating. |
22-
| `truncate.length` | `integer` | `null` | The fixed width (in chars) of the widget. Leave blank to let GTK automatically handle. |
23-
| `truncate.max_length` | `integer` | `null` | The maximum number of characters before truncating. Leave blank to let GTK automatically handle. |
15+
| Name | Type | Default | Description |
16+
|-----------------------|------------------------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
17+
| `icon` | `string` or [image](images) | `󰨸` | Icon to show on the widget button. |
18+
| `icon_size` | `integer` | `32` | Size to render icon at (image icons only). |
19+
| `max_items` | `integer` | `10` | Maximum number of items to show in the popup. |
20+
| `truncate` | `'start'` or `'middle'` or `'end'` or `off` or `Map` | `off` | 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. |
21+
| `truncate.mode` | `'start'` or `'middle'` or `'end'` or `off` | `off` | The location of the ellipses and where to truncate text from. Leave null to avoid truncating. |
22+
| `truncate.length` | `integer` | `null` | The fixed width (in chars) of the widget. Leave blank to let GTK automatically handle. |
23+
| `truncate.max_length` | `integer` | `null` | The maximum number of characters before truncating. Leave blank to let GTK automatically handle. |
2424

2525
<details>
2626
<summary>JSON</summary>

Diff for: docs/modules/Focused.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ Displays the title and/or icon of the currently focused window.
1010

1111
> Type: `focused`
1212
13-
| Name | Type | Default | Description |
14-
|-----------------------|---------------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
15-
| `show_icon` | `boolean` | `true` | Whether to show the app's icon. |
16-
| `show_title` | `boolean` | `true` | Whether to show the app's title. |
17-
| `icon_size` | `integer` | `32` | Size of icon in pixels. |
18-
| `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. |
19-
| `truncate.mode` | `'start'` or `'middle'` or `'end'` | `null` | The location of the ellipses and where to truncate text from. Leave null to avoid truncating. |
20-
| `truncate.length` | `integer` | `null` | The fixed width (in chars) of the widget. Leave blank to let GTK automatically handle. |
21-
| `truncate.max_length` | `integer` | `null` | The maximum number of characters before truncating. Leave blank to let GTK automatically handle. |
13+
| Name | Type | Default | Description |
14+
|-----------------------|------------------------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
15+
| `show_icon` | `boolean` | `true` | Whether to show the app's icon. |
16+
| `show_title` | `boolean` | `true` | Whether to show the app's title. |
17+
| `icon_size` | `integer` | `32` | Size of icon in pixels. |
18+
| `truncate` | `'start'` or `'middle'` or `'end'` or `off` or `Map` | `off` | 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. |
19+
| `truncate.mode` | `'start'` or `'middle'` or `'end'` or `off` | `off` | The location of the ellipses and where to truncate text from. Leave null to avoid truncating. |
20+
| `truncate.length` | `integer` | `null` | The fixed width (in chars) of the widget. Leave blank to let GTK automatically handle. |
21+
| `truncate.max_length` | `integer` | `null` | The maximum number of characters before truncating. Leave blank to let GTK automatically handle. |
2222

2323
<details>
2424
<summary>JSON</summary>

Diff for: docs/modules/Launcher.md

+15-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,21 @@ Optionally displays a launchable set of favourites.
1212

1313
> Type: `launcher`
1414
15-
| | Type | Default | Description |
16-
|--------------|------------|---------|-----------------------------------------------------------------------------------------------------|
17-
| `favorites` | `string[]` | `[]` | List of app IDs (or classes) to always show at the start of the launcher |
18-
| `show_names` | `boolean` | `false` | Whether to show app names on the button label. Names will still show on tooltips when set to false. |
19-
| `show_icons` | `boolean` | `true` | Whether to show app icons on the button. |
20-
| `icon_size` | `integer` | `32` | Size to render icon at (image icons only). |
21-
| `reversed` | `boolean` | `false` | Whether to reverse the order of favorites/items |
15+
| | Type | Default | Description |
16+
|-----------------------------|---------------------------------------------|----------|--------------------------------------------------------------------------------------------------------------------------|
17+
| `favorites` | `string[]` | `[]` | List of app IDs (or classes) to always show at the start of the launcher |
18+
| `show_names` | `boolean` | `false` | Whether to show app names on the button label. Names will still show on tooltips when set to false. |
19+
| `show_icons` | `boolean` | `true` | Whether to show app icons on the button. |
20+
| `icon_size` | `integer` | `32` | Size to render icon at (image icons only). |
21+
| `reversed` | `boolean` | `false` | Whether to reverse the order of favorites/items |
22+
| `truncate.mode` | `'start'` or `'middle'` or `'end'` or `off` | `end` | The location of the ellipses and where to truncate text from. Applies to application names when `show_names` is enabled. |
23+
| `truncate.length` | `integer` | `null` | The fixed width (in chars) of the widget. Leave blank to let GTK automatically handle. |
24+
| `truncate.max_length` | `integer` | `null` | The maximum number of characters before truncating. Leave blank to let GTK automatically handle. |
25+
| `truncate_popup.mode` | `'start'` or `'middle'` or `'end'` or `off` | `middle` | The location of the ellipses and where to truncate text from. Applies to window names within a group popup. |
26+
| `truncate_popup.length` | `integer` | `null` | The fixed width (in chars) of the widget. Leave blank to let GTK automatically handle. |
27+
| `truncate_popup.max_length` | `integer` | `25` | The maximum number of characters before truncating. Leave blank to let GTK automatically handle. |
28+
29+
2230
<details>
2331
<summary>JSON</summary>
2432

0 commit comments

Comments
 (0)