1
0
Fork 0

- [gemini] added a symbol to mark a directory when exploring local filesystem.

This commit is contained in:
cage 2021-03-27 10:37:05 +01:00
parent 6a82f892a1
commit 87377914a3
4 changed files with 20 additions and 3 deletions

View File

@ -46,6 +46,10 @@ password-echo-character = "•"
vote-vertical-bar = "⯀"
# the symbol to represent a directory (used when a local tree is explored)
directory-symbol = "🗀"
# quick help window style
quick-help.header.foreground = white

View File

@ -1083,6 +1083,7 @@
:load-config-file
:external-editor
:gemini-default-favicon
:directory-symbol
:gemini-fetch-favicon-p
:gemini-link-prefix-to-gemini
:gemini-link-prefix-to-other

View File

@ -1025,9 +1025,15 @@
url))
stream)
(loop for path in all-paths do
(format stream
"~a~%"
(gemini-parser:make-gemini-link path path)))))
(let* ((dirp (fs:dirp path))
(dir-symbol (swconf:directory-symbol))
(link-label (if dirp
(text-utils:strcat path " " dir-symbol)
path)))
(format stream
"~a~%"
(gemini-parser:make-gemini-link path
link-label))))))
(parsed (gemini-parser:parse-gemini-file raw-text))
(links (gemini-parser:sexp->links parsed
nil

View File

@ -488,6 +488,7 @@
input
read
unread
directory-symbol
fetch
password-echo-character
color-re
@ -558,6 +559,11 @@
+key-gemini+
+key-favicon+))
(defun directory-symbol ()
(or (access:accesses *software-configuration*
+key-directory-symbol+)
(_ "(directory)")))
(defun gemini-fetch-favicon-p ()
(let ((fetchp (access:accesses *software-configuration*
+key-gemini+