Files
community-plugins/screen-toolkit/shortcut.luau
T
d5bf4d2168 feat(panel): remove full mode, rename compact to standard and fixed some UI (#328)
* feat(panel): remove full mode, rename compact to standard

- Remove panel-full entry (660×340) and all full-mode code paths
- Rename compact → standard across panel, settings, translations
- Restrict tile hover/click to icon+label only (no border hover)
- Shrink close button to 24×24 with 12px glyph
- Reduce standard section vertical padding to 4px
- Standard panel height: 290 → 260 (matches legacy at 260)
- Fix widget/shortcut/service toggle to respect panel-mode setting
- Update README with correct sizes and behavior

* added new thumbnail.webp

---------

Co-authored-by: Ahmed5Emad <ahmed5emad@users.noreply.github.com>
2026-08-10 20:32:07 -04:00

30 lines
959 B
Luau

--!nonstrict
-- Screen Toolkit — control-center [[shortcut]] tile.
--
-- Mirrors the bar widget: shows the recording state and toggles the main
-- panel. Drives the [[service]] through the "command"
-- state channel — no shell-out, no IPC PATH dependency.
local recording = false
local function apply()
shortcut.setLabel(recording and noctalia.tr("shortcut.recording") or noctalia.tr("shortcut.label"))
shortcut.setIcon("crosshair", "crosshair")
shortcut.setActive(recording)
end
noctalia.state.watch("recording", function(value)
recording = value == true
apply()
end)
function onClick()
-- The shortcut tile never stops a recording; it just opens the panel so
-- the stop button (in the panel header, next to the close X) is reachable.
local mode = noctalia.getConfig("panel-mode")
local id = (mode == "legacy") and "alexander/screen-toolkit:panel-legacy" or "alexander/screen-toolkit:panel"
noctalia.togglePanel(id)
end
apply()