feat: add bookmarks plugin (#132)
* dunarand/bookmarks plugin * fix: incorrect thumbnail.webp name * fix: corrected plugin.toml Removed invalid tag and noctalia version field * fix: Added missing `bar` widget entry to plugin section * docs: Added keybinds table * feat: added search IPC Directly initiates the search mode on noctalia msg panel-toggle dunarand/bookmarks:panel search * feat: drag bookmarks into/out of folders * fix+style: fixed regressing drag space highlight + renamed functions due to linter complaints * refactor:style: code cleanup & helper functions * chore: translation strings * feat: Turkish translation strings * chore: added nohup as dependency, bumped the version * style: formatting * docs: updated README to include nohup dependency
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
local PANEL_ID = "dunarand/bookmarks:panel"
|
||||
|
||||
local open = false
|
||||
|
||||
local function render()
|
||||
barWidget.setGlyph(noctalia.getConfig("glyph"))
|
||||
if open then
|
||||
barWidget.setGlyphColor("primary")
|
||||
barWidget.setColor("primary")
|
||||
else
|
||||
barWidget.setGlyphColor("on_surface")
|
||||
barWidget.setColor("on_surface")
|
||||
end
|
||||
|
||||
barWidget.setTooltip(noctalia.getConfig("tooltip"))
|
||||
barWidget.setText(noctalia.getConfig("text"))
|
||||
end
|
||||
|
||||
noctalia.state.watch("bookmarks_open", function(value)
|
||||
open = value == true
|
||||
render()
|
||||
end)
|
||||
|
||||
function update()
|
||||
render()
|
||||
end
|
||||
|
||||
function onClick()
|
||||
noctalia.togglePanel(PANEL_ID)
|
||||
end
|
||||
Reference in New Issue
Block a user