Introduction
Introduction Statistics Contact Development Disclaimer Help
Add non split mode - clic - Clic is an command line interactive client for goph…
git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65…
Log
Files
Refs
Tags
README
LICENSE
---
commit 76ff5f0a91d9fbf3b2c0ef87d437c7243ecff59a
parent 4878ed433802ca7d743d3976987c94be4561b6a6
Author: Solene Rapenne <[email protected]>
Date: Tue, 2 Apr 2019 15:13:16 +0200
Add non split mode
Diffstat:
M README.md | 6 +++++-
M clic.1 | 6 +++++-
M clic.lisp | 10 +++++++++-
3 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/README.md b/README.md
@@ -72,7 +72,11 @@ permitting to use clic with the numpad with only one hand :
Command line usage
==================
-clic [-k] [url|file]
+clic [-t] [-k] [url|file]
+
+If you start clic with -t parameter, then menus will be displayed in
+one operation, instead of asking to display next page once it reach
+your terminal size.
If you start clic with -k parameter, then kiosk mode is enabled, which
mean it won't call any external program or save any data on the
diff --git a/clic.1 b/clic.1
@@ -6,7 +6,7 @@
.Nd a text based gopher client
.Sh SYNOPSIS
.Nm clic
-.Op Fl k
+.Op Fl t k
.Op URL
.Sh DESCRIPTION
.Nm
@@ -22,6 +22,10 @@ will save it using its filename under
.Sh OPTIONS
.Bl -tag -width Ds
.It Op Fl k
+activate the non split mode.
+This prevent clic to break menu display when the display reach the
+terminal size. This is useful when you want to scroll using your terminal.
+.It Op Fl k
activate the kiosk mode. (Disable running external applications, temp files,
downloading etc.)
.It Op URL
diff --git a/clic.lisp b/clic.lisp
@@ -46,6 +46,9 @@
;;;; kiosk mode
(defparameter *kiosk-mode* nil)
+;;;; no split mode
+(defparameter *no-split* nil)
+
(defmacro kiosk-mode(&body code)
"prevent code if kiosk mode is enabled"
`(progn
@@ -435,6 +438,9 @@
(c-kiosk-pledge)
(setf *kiosk-mode* t))
+ ((string= "-t" url)
+ (setf *no-split* t))
+
((= 0 (or (search "file://" url) 1))
(load-file-menu (subseq url 7))
(make-location :host 'local-file
@@ -581,7 +587,9 @@
;; so if the user doesn't want to scroll
;; we break the loop and then execute the command
(let ((input nil))
- (let ((rows (- (c-termsize) 1))) ; -1 for command bar
+ (let ((rows (if *no-split*
+ -1
+ (* (- (c-termsize) 1))))) ; -1 for command bar
(loop for line across *buffer*
counting line into row
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.