diff --git a/wallhaven/README.md b/wallhaven/README.md index 5017ad9..cbc85a2 100644 --- a/wallhaven/README.md +++ b/wallhaven/README.md @@ -7,12 +7,12 @@ Browse [Wallhaven](https://wallhaven.cc), download a wallpaper into your Noctali | Field | Value | | --- | --- | | ID | `noctalia/wallhaven` | -| Entries | Panel: `browser`; bar widget: `wallhaven` | +| Entries | Panel: `browser`; bar widget: `wallhaven`; shortcut: `shortcut` | ## Usage 1. Enable the plugin in Settings → Plugins. -2. Add the `wallhaven` bar widget, or run: +2. Add the `wallhaven` bar widget, the control center shortcut, or run: ```sh noctalia msg panel-toggle noctalia/wallhaven:browser diff --git a/wallhaven/plugin.toml b/wallhaven/plugin.toml index 72441e5..202d507 100644 --- a/wallhaven/plugin.toml +++ b/wallhaven/plugin.toml @@ -1,6 +1,6 @@ id = "noctalia/wallhaven" name = "Wallhaven" -version = "1.0.10" +version = "1.1.0" plugin_api = 9 author = "noctalia" license = "MIT" @@ -40,3 +40,7 @@ entry = "wallhaven.luau" type = "glyph" label_key = "settings.glyph.label" default = "photo" + +[[shortcut]] +id = "shortcut" +entry = "shortcut.luau" diff --git a/wallhaven/shortcut.luau b/wallhaven/shortcut.luau new file mode 100644 index 0000000..ddf1517 --- /dev/null +++ b/wallhaven/shortcut.luau @@ -0,0 +1,13 @@ +--!nonstrict +-- Control center tile that opens the Wallhaven browser panel. + +local function render() + shortcut.setLabel(noctalia.tr("title")) + shortcut.setIcon("photo") +end + +render() + +function onClick() + noctalia.togglePanel("noctalia/wallhaven:browser") +end