feat: Color Picker plugin (#12)
* feat: add color picker panel (WIP - render bug) * docs: update README and add thumbnail * fix: rgb and hex options label key * fix: current swatch not loading on open * Modify plugin.toml metadata for color picker Updated plugin metadata fields including tags. --------- Co-authored-by: Lemmy <studio@quadbyte.net>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
-- Bar [[widget]] entry:
|
||||
-- Left Click: opens the panel,
|
||||
-- Right Click: picks a color directly
|
||||
-- and copies the hex to clipboard (no panel).
|
||||
|
||||
local glyph = barWidget.getConfig("glyph")
|
||||
local tr_color_picker = noctalia.tr("color_picker");
|
||||
|
||||
local function render()
|
||||
barWidget.setGlyph(glyph)
|
||||
barWidget.setTooltip(tr_color_picker)
|
||||
end
|
||||
|
||||
function onClick()
|
||||
noctalia.togglePanel("oldirtty/color_picker:panel")
|
||||
end
|
||||
|
||||
function onRightClick()
|
||||
noctalia.runAsync("noctalia msg plugin oldirtty/color_picker:service all pick", function(result)
|
||||
if result.exitCode ~= 0 then
|
||||
noctalia.notifyError(tr_color_picker, noctalia.tr("could_not_parse"))
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
render()
|
||||
Reference in New Issue
Block a user