Skip to content

Commit 369f315

Browse files
authored
feat(wallhaven): add control center tile (#51)
* feat(wallhaven): add control center tile * chore: bump version
1 parent 47f2911 commit 369f315

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

wallhaven/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Browse [Wallhaven](https://wallhaven.cc), download a wallpaper into your Noctali
77
| Field | Value |
88
| --- | --- |
99
| ID | `noctalia/wallhaven` |
10-
| Entries | Panel: `browser`; bar widget: `wallhaven` |
10+
| Entries | Panel: `browser`; bar widget: `wallhaven`; shortcut: `shortcut` |
1111

1212
## Usage
1313

1414
1. Enable the plugin in Settings → Plugins.
15-
2. Add the `wallhaven` bar widget, or run:
15+
2. Add the `wallhaven` bar widget, the control center shortcut, or run:
1616

1717
```sh
1818
noctalia msg panel-toggle noctalia/wallhaven:browser

wallhaven/plugin.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id = "noctalia/wallhaven"
22
name = "Wallhaven"
3-
version = "1.0.10"
3+
version = "1.1.0"
44
plugin_api = 9
55
author = "noctalia"
66
license = "MIT"
@@ -40,3 +40,7 @@ entry = "wallhaven.luau"
4040
type = "glyph"
4141
label_key = "settings.glyph.label"
4242
default = "photo"
43+
44+
[[shortcut]]
45+
id = "shortcut"
46+
entry = "shortcut.luau"

wallhaven/shortcut.luau

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--!nonstrict
2+
-- Control center tile that opens the Wallhaven browser panel.
3+
4+
local function render()
5+
shortcut.setLabel(noctalia.tr("title"))
6+
shortcut.setIcon("photo")
7+
end
8+
9+
render()
10+
11+
function onClick()
12+
noctalia.togglePanel("noctalia/wallhaven:browser")
13+
end

0 commit comments

Comments
 (0)