commit 9f652c3a45967ed9773a7549a15e8a5926715b8f
parent 143a96f761fb7549db7ead37df78b5269de2316a
Author: Daniel Barlow <dan@telent.net>
Date: Mon, 7 Feb 2022 22:53:28 +0000
load urls on command line
Diffstat:
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/just/just.fnl b/just/just.fnl
@@ -159,6 +159,9 @@ progress, trough {
(each [_ w (ipairs (scrolledwindow:get_children))]
(scrolledwindow:remove w))
+ (box:add (Gtk.Label { :label "Open tabs" }))
+
+
(each [i w (pairs tabs)]
(when (> i 0)
(box:pack_start
@@ -275,7 +278,8 @@ progress, trough {
(bus:subscribe :stop-loading
(fn [] (stop:hide) (refresh:show)))
- (views:new-tab)
+ (each [_ url (ipairs arg)]
+ (views:new-tab))
(nav-bar:pack_start back false false 2)
(nav-bar:pack_start refresh false false 2)
@@ -291,7 +295,14 @@ progress, trough {
(window:add container)
(window:show_all)
- (bus:publish :fetch current-url))
+ (each [i url (ipairs arg)]
+ (lgi.GLib.timeout_add_seconds
+ 0
+ (* 2 i)
+ (fn []
+ (bus:publish :switch-tab i)
+ (bus:publish :fetch url)
+ false))))
(Gtk.main)