diff --git a/mpvpaper/README.md b/mpvpaper/README.md index cee2484..3fce0d9 100644 --- a/mpvpaper/README.md +++ b/mpvpaper/README.md @@ -13,7 +13,7 @@ drawn above it. | Field | Value | | --- | --- | | ID | `noctalia/mpvpaper` | -| Entries | Service: `service`; Panel: `picker`; bar widget: `mpvpaper` | +| Entries | Service: `service`; Panel: `picker`; bar widget: `mpvpaper`; Shortcut: `shortcut` | ## Requirements @@ -25,7 +25,7 @@ The plugin works on `wlr-layer-shell` compositors (Niri, Hyprland, Sway, Mango). ## Usage 1. Set **Video directory** in the plugin settings (defaults to `~/Videos`). -2. Add the **Video Wallpaper** bar widget, or open the picker with +2. Add the **Video Wallpaper** bar widget, the control center shortcut, or open the picker with ```sh noctalia msg panel-toggle noctalia/mpvpaper:picker diff --git a/mpvpaper/plugin.toml b/mpvpaper/plugin.toml index 347d360..48cb347 100644 --- a/mpvpaper/plugin.toml +++ b/mpvpaper/plugin.toml @@ -10,7 +10,7 @@ id = "noctalia/mpvpaper" name = "Video Wallpaper" -version = "1.0.7" +version = "1.1.0" plugin_api = 9 author = "noctalia" license = "MIT" @@ -135,3 +135,8 @@ entry = "widget.luau" type = "glyph" label_key = "settings.glyph.label" default = "movie" + +# Control center shortcut that opens the picker. +[[shortcut]] +id = "shortcut" +entry = "shortcut.luau" diff --git a/mpvpaper/shortcut.luau b/mpvpaper/shortcut.luau new file mode 100644 index 0000000..44bfba6 --- /dev/null +++ b/mpvpaper/shortcut.luau @@ -0,0 +1,13 @@ +--!nonstrict +-- Tile in the control center that opens the video wallpaper picker. + +local function render() + shortcut.setLabel(noctalia.tr("title")) + shortcut.setIcon("movie") +end + +render() + +function onClick() + noctalia.togglePanel("noctalia/mpvpaper:picker") +end