diff --git a/wallpaper-switcher/README.md b/wallpaper-switcher/README.md new file mode 100644 index 00000000..1716c588 --- /dev/null +++ b/wallpaper-switcher/README.md @@ -0,0 +1,23 @@ +# Wallpaper Switcher + +This plugin switches to the next wallpaper in the selected wallpaper catalogue in +Noctalia settings. +The wallpaper can be switched by clicking on a bar widget or a control-center +shortcut tile. + +## Plugin + +| Field | Value | +| --- | --- | +| ID | `kavya-nama/wallpaper-switcher` | +| Entries | Bar widget: `switch`; control-center shortcut: `switch-shortcut` | + +## Requirements + +No external dependencies. + +## Usage + +Add the widget to bar using Noctalia GUI, click on the widget to switch wallpaper. +The control-center shortcut can be added from the control-center shortcuts +settings. diff --git a/wallpaper-switcher/plugin.toml b/wallpaper-switcher/plugin.toml new file mode 100644 index 00000000..fddcf378 --- /dev/null +++ b/wallpaper-switcher/plugin.toml @@ -0,0 +1,18 @@ +id = "kavya-nama/wallpaper-switcher" +name = "Wallpaper Switcher" +version = "1.0.0" +plugin_api = 3 +author = "kavya-nama" +license = "MIT" +icon = "image" +description = "Switch to the next wallpaper from a bar widget." +tags = ["bar", "shortcut", "wallpaper"] +dependencies = [] + +[[widget]] +id = "switch" +entry = "widget.luau" + +[[shortcut]] +id = "switch-shortcut" +entry = "shortcut.luau" diff --git a/wallpaper-switcher/shortcut.luau b/wallpaper-switcher/shortcut.luau new file mode 100644 index 00000000..0facebd3 --- /dev/null +++ b/wallpaper-switcher/shortcut.luau @@ -0,0 +1,7 @@ +function onClick() + noctalia.runAsync("noctalia msg wallpaper-next") + noctalia.notify("Wallpaper Switch", "Wallpaper switched") +end + +shortcut.setLabel("Next Wallpaper") +shortcut.setIcon("image") diff --git a/wallpaper-switcher/thumbnail.webp b/wallpaper-switcher/thumbnail.webp new file mode 100644 index 00000000..1dd002f6 Binary files /dev/null and b/wallpaper-switcher/thumbnail.webp differ diff --git a/wallpaper-switcher/translations/en.json b/wallpaper-switcher/translations/en.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/wallpaper-switcher/translations/en.json @@ -0,0 +1 @@ +{} diff --git a/wallpaper-switcher/widget.luau b/wallpaper-switcher/widget.luau new file mode 100644 index 00000000..8fc56d63 --- /dev/null +++ b/wallpaper-switcher/widget.luau @@ -0,0 +1,8 @@ +function update() + barWidget.setGlyph("image") +end + +function onClick() + noctalia.runAsync("noctalia msg wallpaper-next") + noctalia.notify("Wallpaper Switch", "Wallpaper switched") +end