open a blank webview if no URLs on command line

phoen
Daniel Barlow 2022-03-09 23:45:52 +00:00
parent d831ccbb67
commit a928c40cd0
1 changed files with 7 additions and 4 deletions

View File

@ -137,10 +137,13 @@ progress, trough {
(container:pack_start progress-bar false false 0)
(container:pack_start viewplex.widget true true 0)
(each [_ url (ipairs arg)]
(let [v (Webview.new)]
(v:visit url)
(viewplex:add-view v)))
(if (. arg 1)
(each [_ url (ipairs arg)]
(let [v (Webview.new)]
(v:visit url)
(viewplex:add-view v)))
(viewplex:add-view
(doto (Webview.new) (: :visit "about:blank"))))
(window:add container)
(window:show_all))