aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-05-01 23:57:34 +0530
committerAkshay Nair <phenax5@gmail.com>2025-05-02 16:22:10 +0530
commit0da44615dcf97ad34b4576da8ef0b77f6c9fc01f (patch)
treeb3b7eebd1cc2e823cb8e5522952e4e4009c7041a /init.lua
parent9c812753e2b1f01b2e0c85be9904ff7694f0e6ec (diff)
downloadnull-browser-0da44615dcf97ad34b4576da8ef0b77f6c9fc01f.tar.gz
null-browser-0da44615dcf97ad34b4576da8ef0b77f6c9fc01f.zip
Vendor inspect + fix urlchanged event use-after free
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index bbffb50..031af8f 100644
--- a/init.lua
+++ b/init.lua
@@ -1,14 +1,15 @@
print('hello starting up...')
-web.set('new_view_url', 'https://lite.duckduckgo.com')
-web.set('close_window_when_no_views', true)
--- web.set('user_agent', 'MacOS | Safari - $500 edition')
-web.set('downloads_dir', os.getenv('HOME') .. '/Downloads/firefox')
-
local dmenu = require 'null-browser.extras.dmenu'
local history = require 'null-browser.extras.history'
local search_engines = require 'null-browser.extras.search-engines'
+web.set('new_view_url', 'https://lite.duckduckgo.com')
+web.set('close_window_when_no_views', true)
+web.set('user_agent',
+ 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36')
+web.set('downloads_dir', os.getenv('HOME') .. '/Downloads/firefox')
+
history.attach_hooks()
search_engines.urls['ld'] = 'https://lite.duckduckgo.com/?q={}'
@@ -35,6 +36,7 @@ web.event.add_listener('PermissionRequested', {
web.event.add_listener('NotificationReceived', {
callback = function(event)
+ -- TODO: Add action/click (-A)
local args = { '-a', 'null-browser', '-r', event.tag, event.title, event.message }
uv.spawn('notify-send', { args = args }, function(code)
if code ~= 0 then