diff --git a/docs/modules/Clipboard.md b/docs/modules/Clipboard.md index 9ad724a..876f296 100644 --- a/docs/modules/Clipboard.md +++ b/docs/modules/Clipboard.md @@ -12,6 +12,7 @@ Supports plain text and images. | Name | Type | Default | Description | |-----------------------|---------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------| | `icon` | `string/image` | `󰨸` | Icon to show on the widget button. | +| `icon_size` | `integer` | `32` | Size to render icon at (image icons only). | | `max_items` | `integer` | `10` | Maximum number of items to show in the popup. | | `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. | diff --git a/docs/modules/Launcher.md b/docs/modules/Launcher.md index 881e178..8b0421e 100644 --- a/docs/modules/Launcher.md +++ b/docs/modules/Launcher.md @@ -14,6 +14,7 @@ Optionally displays a launchable set of favourites. | `favorites` | `string[]` | `[]` | List of app IDs (or classes) to always show at the start of the launcher | | `show_names` | `boolean` | `false` | Whether to show app names on the button label. Names will still show on tooltips when set to false. | | `show_icons` | `boolean` | `true` | Whether to show app icons on the button. | +| `icon_size` | `integer` | `32` | Size to render icon at (image icons only). |
JSON diff --git a/docs/modules/Music.md b/docs/modules/Music.md index 044c816..e0579ac 100644 --- a/docs/modules/Music.md +++ b/docs/modules/Music.md @@ -27,6 +27,8 @@ in MPRIS mode, the widget will listen to all players and automatically detect/di | `icons.track` | `string/image` | `` | Icon to show next to track title. | | `icons.album` | `string/image` | `` | Icon to show next to album name. | | `icons.artist` | `string/image` | `ﴁ` | Icon to show next to artist name. | +| `icon_size` | `integer` | `32` | Size to render icon at (image icons only). | +| `cover_image_size` | `integer` | `128` | Size to render album art image at inside popup. | | `host` | `string/image` | `localhost:6600` | [MPD Only] TCP or Unix socket for the MPD server. | | `music_dir` | `string/image` | `$HOME/Music` | [MPD Only] Path to MPD server's music directory on disc. Required for album art. | diff --git a/docs/modules/Workspaces.md b/docs/modules/Workspaces.md index 0caac3a..7509e66 100644 --- a/docs/modules/Workspaces.md +++ b/docs/modules/Workspaces.md @@ -11,6 +11,7 @@ Shows all current workspaces. Clicking a workspace changes focus to it. | Name | Type | Default | Description | |----------------|-----------------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `name_map` | `Map` | `{}` | A map of actual workspace names to their display labels/images. Workspaces use their actual name if not present in the map. See [here](images) for information on images. | +| `icon_size` | `integer` | `32` | Size to render icon at (image icons only). | | `all_monitors` | `boolean` | `false` | Whether to display workspaces from all monitors. When `false`, only shows workspaces on the current monitor. | | `sort` | `added` or `alphanumeric` | `alphanumeric` | The method used for sorting workspaces. `added` always appends to the end, `alphanumeric` sorts by number/name. | diff --git a/src/modules/clipboard.rs b/src/modules/clipboard.rs index 8307fe5..5045a1a 100644 --- a/src/modules/clipboard.rs +++ b/src/modules/clipboard.rs @@ -21,6 +21,9 @@ pub struct ClipboardModule { #[serde(default = "default_icon")] icon: String, + #[serde(default = "default_icon_size")] + icon_size: i32, + #[serde(default = "default_max_items")] max_items: usize, @@ -35,6 +38,10 @@ fn default_icon() -> String { String::from("󰨸") } +const fn default_icon_size() -> i32 { + 32 +} + const fn default_max_items() -> usize { 10 } @@ -120,7 +127,7 @@ impl Module