Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions wallhaven/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion wallhaven/plugin.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id = "noctalia/wallhaven"
name = "Wallhaven"
version = "1.0.10"
version = "1.1.0"
plugin_api = 9
author = "noctalia"
license = "MIT"
Expand Down Expand Up @@ -40,3 +40,7 @@ entry = "wallhaven.luau"
type = "glyph"
label_key = "settings.glyph.label"
default = "photo"

[[shortcut]]
id = "shortcut"
entry = "shortcut.luau"
13 changes: 13 additions & 0 deletions wallhaven/shortcut.luau
Original file line number Diff line number Diff line change
@@ -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