Files
community-plugins/screen-toolkit/shortcut.luau
T
636317303c screen-toolkit : full screen utility (#221)
* screen-toolkit: add Noctalia v5 plugin

* screen-toolkit: credit original plugin

* screen-toolkit: fix recording, OCR capture, and result panel UX

* screen-toolkit: rename record tool labels to Record / Rec FS

* screen-toolkit: update plugin thumbnail

* screen-toolkit: fix README validation (backtick deps, result panel toggle)

* screen-toolkit: fix OCR results and dependencies

* screen-toolkit: backtick recording and annotator deps in README

---------

Co-authored-by: Ahmed5Emad <ahmed5emad@users.noreply.github.com>
2026-08-03 08:22:08 -04:00

28 lines
829 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.
noctalia.togglePanel("alexander/screen-toolkit:panel")
end
apply()