aboutsummaryrefslogtreecommitdiff
path: root/config.lua
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-04-12 11:56:10 +0530
committerAkshay Nair <phenax5@gmail.com>2025-04-12 11:56:35 +0530
commitf3f109cd054888f857d51ca2b37b4123f3134069 (patch)
tree81250db8a30f85d34d3c101830a37e3535e77054 /config.lua
parentc0ee5203201d4ddf4ed560f856cb0da958935fc6 (diff)
downloadnull-browser-f3f109cd054888f857d51ca2b37b4123f3134069.tar.gz
null-browser-f3f109cd054888f857d51ca2b37b4123f3134069.zip
Add configuration api
Diffstat (limited to '')
-rw-r--r--config.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.lua b/config.lua
index a1f49c6..9466a20 100644
--- a/config.lua
+++ b/config.lua
@@ -14,6 +14,9 @@ local function get_current_view_index()
end
end
+web.set('new_view_url', 'https://lite.duckduckgo.com')
+-- web.set('close_window_when_no_views', false)
+
local dmenu = require 'null-browser.extras.dmenu'
local history = require 'null-browser.extras.history'
@@ -38,6 +41,7 @@ end
-- Open in new view
web.keymap.set('n', 'o', function()
+ print(web.get('new_view_url'))
dmenu.select(history.list(), { prompt = 'Open view:' }, function(err, result)
if err or not result then return end
web.view.new(to_url(result))