* feat(obs-integration): add OBS integration plugin * docs(obs-integration): add README.md * chore(obs-integration): rename obs-integration-thumbnail.webp to thumbnail.webp * i18n(obs-integration): fix PR check * fix(obs-integration): honor selected rebuild architecture * fix(obs-integration): reject dot-prefixed names in validName * fix(obs-integration): treat empty checkout_dir as unset * feat(obs-integration): add repo/arch rebuild selection with confirmation * chore(obs-integration): add opensuse tag to plugin.toml * chore(obs-integration): new thumbnail * fix(obs-integration): fix rebuild controls inheriting flexGrow from reused nodes * feat(obs-integration): overhaul package actions, logging, and navigation * chore(obs-integration): new thumbnail * feat(obs-integration): label Service Run All button, move build logs * fix(obs-integration): split logs based on action source * fix(obs-integration): correct log display locations and resets * feat(obs-integration): add confirmation to remove file * feat(obs-integration): move edit package meta to header * fix(obs-integration): layout repo/arch label/select alignment * fix(obs-integration): clean rebuild log duplication * fix(obs-integration): persist logSource in nav state for panel reopen * i18n(obs-integration): change 'Repo' to 'Repositories' and 'Arch' to 'Architectures' * feat(obs-integration): add home nav button, fix header label clipping, rebuild controls layout * chore(obs-integration): change plugin's panel height * docs(obs-integration): document source-service operations in README * fix(obs-integration): correct rebuild log display and persistence, sync UI layout --------- Co-authored-by: neyfua <ogkhang.05@gmail.com>
47 lines
1.1 KiB
Luau
47 lines
1.1 KiB
Luau
--!nonstrict
|
|
|
|
local OSC_CONFIG = noctalia.expandPath("~/.config/osc/oscrc")
|
|
|
|
local function render()
|
|
local hasOsc = noctalia.commandExists("osc")
|
|
local oscConfigured = noctalia.fileExists(OSC_CONFIG)
|
|
local showLabel = noctalia.getConfig("show_label") ~= false
|
|
|
|
barWidget.setGlyph("buildings")
|
|
|
|
if not hasOsc then
|
|
barWidget.setGlyphColor("error")
|
|
if showLabel then
|
|
barWidget.setText(noctalia.tr("widget.osc_missing"))
|
|
barWidget.setColor("error")
|
|
end
|
|
elseif not oscConfigured then
|
|
barWidget.setGlyphColor("on_surface_variant")
|
|
if showLabel then
|
|
barWidget.setText(noctalia.tr("widget.configure_obs"))
|
|
barWidget.setColor("on_surface_variant")
|
|
end
|
|
else
|
|
barWidget.setGlyphColor("on_surface")
|
|
if showLabel then
|
|
barWidget.setText(noctalia.tr("widget.obs"))
|
|
barWidget.setColor("on_surface")
|
|
end
|
|
end
|
|
|
|
if not showLabel then
|
|
barWidget.setText("")
|
|
end
|
|
end
|
|
|
|
function update()
|
|
render()
|
|
end
|
|
|
|
function onClick()
|
|
noctalia.togglePanel("neyfua/obs-integration:panel")
|
|
end
|
|
|
|
noctalia.setUpdateInterval(5000)
|
|
render()
|