From a928c40cd0e62d6cc49089ab1ef41b4e577e26d7 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Wed, 9 Mar 2022 23:45:52 +0000 Subject: [PATCH] open a blank webview if no URLs on command line --- just/just.fnl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/just/just.fnl b/just/just.fnl index 4d7241f..b3678c6 100644 --- a/just/just.fnl +++ b/just/just.fnl @@ -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))