1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
** Usable
- [X] Decorations api (just for statusline)
- [X] web.schedule
- [X] Create view with html (web.view.set_html())
- [X] Expose JS <-> lua in page (web.view.expose())
- [X] Tests for api
- [X] Run JS in page (web.view.run_js())
- [X] KeyPressed event
- [X] f-key navigation
- [X] web.view.reload
- [X] Load assets directory into build
- [X] Show number of tabs in statusline
- [X] On finder stop, exit find mode
- [X] Callback for result of run_js
- [X] Generate docs for api
- [X] Any hint action/generic (currently only url open)
- [X] Embed docs in app (`null:/docs`)
- [X] web.decorations.*.set_size()
- [X] Vertical tabline ui
- [X] Install docs/ and assets/ in build
- [X] Make the asset/config/lua paths readable via lua
- [X] json encode/decode
- [X] Fix path to symbols.json in web.help.get_items (use docs path)
- [X] Document events and event opts
- [ ] Element focus (input focus)
- [ ] Update all api to use opts table pattern
- [ ] web.keymap.configure_mode(modename, { passthrough = false })
- [ ] Fullscreen
- [ ] Zoom in/out/reset
- [ ] Remove unwanted "async"-ness in lua calls
- [ ] Api for enabling rpc api in view
- [ ] Hide/show decoration api
- [ ] Review all options and make sure they're passed correctly
** Bugs
- [ ] INVESTIGATE: Segfault on close sometimes
- [ ] Closing webview should close devtools window
- [ ] web.view apis in `-e` flag from "clients" (non-servers calls) don't work
- [ ] API's don't validate types. (invalid type conversion segfaults)
- [ ] INVESTIGATE: Check why urlchanged doesnt fire for first url open sometimes
** Next
- [ ] View focus event (between decorations/views)
- [ ] User scripts (greasemonkey?)
- [ ] User stylesheets (per site and global?)
- [ ] Log stdout, errors and results from lua somewhere
- [ ] Move view to a different window (`web.view.move_to_window(view, win)`)
- [ ] web.win.* apis (list, current_id)
- [ ] Permission management (list/allow/deny) lua api
- [ ] Granular updates in statusline plugin instead of set_html multiple times
- [ ] Use table for all internals api options?
- [ ] Tests for window
- [ ] More tests for stack
- [ ] Tests for router
- [ ] User data/profiles management
- [ ] Create window with new profile
- [ ] Configuration validation
- [ ] Allow toggling devtools
- [X] Set search text as the user is typing (dmenu -r)
- [ ] Conflict in keymap (keymap already exists)
- [ ] Allow pattern filtering for event listeners
- [ ] Allow view_id, win_id filtering for event listeners
- [ ] Handle resource cleanup + signal disconnecting
- [ ] Private window (in-memory profile)
** Later
- [ ] Bookmarking
- [ ] Support multiple modes for keymap.set: `web.keymap.set({'n','i'}, ...)`
- [ ] static linking for qt
- [X] vendor web.inspect with build
- [ ] Right click context menu items
- [ ] Listen to renderprocesstermination signal
- [ ] Change instance manager command format
** Later later
- [ ] Custom file picker
- [ ] remote debugging with cdp (spider-repl)
** Maybe
- [ ] Floating webviews?
- [ ] Move modal keymap management into lua?
** Notes
- view = 0, nil, none: Current view
- Win = 0: Current window
- Win = nil, none: All windows or current window based on operation
- Keep track of last focused window (current window is last focused)
#+begin_src lua
web.view.set_url(url) -- Set url for current view
web.view.set_url(url, { view = 1 }) -- Set url for view 1
web.view.set_url(url, { view = 1, win = 1 }) -- Set url for view 1 in win 1
web.view.set_url(url, { win = 1 }) -- Set url for current view in win 1
web.view.create(url, { win = 1 }) -- New view in win 1
web.view.create(url) -- New view in current window
web.view.close({ view = 1 }) -- Close view 1
web.view.close() -- Close current view in current window
web.view.list({ win = nil }) -- List all tabs
web.view.list({ win = 1 }) -- List win 1 tabs
web.view.select({ view = 1, win = 1 }) -- Select win 1 view
web.view.select({ view = 1, win = 0 }) -- Select view 1 in current window
web.view.select({ view = 1 }) -- Select view 1
web.view.current({ win = 1 }) -- Current view in win 1
web.view.current() -- Current view in current win
web.history.back(1) -- Back for current view in current window
web.history.back(1, { view = 1 }) -- Back for view 1
web.history.back(1, { win = 1 }) -- Back for current view in win 1
web.keymap.set('n', '<c-r>', ..., { view = 1 }) -- Set keymap for view 1
web.keymap.set('n', '<c-r>', ..., { win = 1 }) -- Set keymap for win 1
web.opt.new_tab_url = 'https://duckduckgo.com'
-- Search api
web.search.set_search_text('whatever')
web.search.next()
web.search.prev()
web.search.get_search_text()
web.search.current()
web.search.total()
web.decorations.top.enable()
web.decorations.top.disable()
web.decorations.top.set_size(20)
local view_id = web.decorations.top.view()
web.view.set_html('<div>Hello world</div>', { view = view })
-- Hide/unhide
web.decorations.top.set_visible(false)
#+end_src
|