if starting without arguments open a start page - holymoly - A tor enabled gopher client written in CHICKEN scheme
(HTM) git clone git://vernunftzentrum.de/holymoly.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 60a070c2f512570c3a5e7e61d6584f3aa0a36d2d
(DIR) parent acf908821b6d484c52f8e9d70f90635d7d2a7a95
(HTM) Author: Christian Kellermann <ckeen@pestilenz.org>
Date: Thu, 16 Aug 2018 16:35:24 +0200
if starting without arguments open a start page
Diffstat:
holymoly.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/holymoly.scm b/holymoly.scm
@@ -27,6 +27,8 @@
srfi-4
srfi-71)
+(define *start-page* "gopher://vernunftzentrum.de/1/ckeen")
+
(foreign-declare "#include <locale.h>")
(foreign-code "setlocale(LC_ALL, \"en_US.UTF-8\");")
@@ -367,11 +369,12 @@
(noecho)
(set-signal-handler! signal/winch (lambda (sig) (endwin)(refresh)(clear)))
- (let-values (((l c) (getmaxyx (stdscr))))
+ (let ((l c (getmaxyx (stdscr)))
+ (start-page (if (null? args) *start-page* (car args))))
(main-win (newwin (sub1 l) c 0 0))
(status-win (newwin 1 c (sub1 l) 0))
(new-status "Starting up!")
- (select-entry (uristring->entry (car args)))
+ (select-entry (uristring->entry start-page))
(exit 0)))
) ;;; end of module definition