diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-07-25 23:17:02 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-07-25 23:17:02 +0530 |
| commit | 031b22e0bb0f1d132731aea3776917731a8ab4ce (patch) | |
| tree | 1c3775d5aba426669a0ea0b8821a7b4b0808aab0 /init.lua | |
| parent | 81dcf7de91c1866d565f7aa9eb38f7fbd1cd7ad7 (diff) | |
| download | null-browser-031b22e0bb0f1d132731aea3776917731a8ab4ce.tar.gz null-browser-031b22e0bb0f1d132731aea3776917731a8ab4ce.zip | |
Add decorations.*.view lua api + support decoration views for open url
Diffstat (limited to '')
| -rw-r--r-- | init.lua | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -61,12 +61,21 @@ web.event.add_listener('NotificationReceived', { end, }) +-- Decorations config web.event.add_listener('WinCreated', { callback = function(event) web.decorations.bottom.enable({ win = event.win_id }) + local timer = web.uv.new_timer() + timer:start(100, 0, function() + local view = web.decorations.bottom.view({ win = event.win_id }) + print('>>> view', view) + if view ~= nil then + web.view.set_url('https://google.com', view) + end + timer:close() + end) end, }) - web.keymap.set('n', '<space>gg', function() if web.decorations.bottom.is_enabled({ win = 0 }) then web.decorations.bottom.disable({ win = 0 }) |
