diff --git a/etc/shared.conf b/etc/shared.conf index 981aa6f..c9c89b7 100644 --- a/etc/shared.conf +++ b/etc/shared.conf @@ -1,11 +1,11 @@ # a line starting with a '#' is a comment # The server instance name # add this entry to your file (the one in your home) -# server = test.server.org +# server = test.server.org # your username # add this entry to your file (the one in your home) -# username = username +# username = username # theme @@ -13,33 +13,37 @@ use "default-theme.conf" # maximum number of attachments allowed for a single toot # default is 4 -#max-numbers-allowed-attachments = 4 +#max-numbers-allowed-attachments = 4 # maximum number of characters allowed for a single toot # default is 500 -#max-message-length = 500 +#max-message-length = 500 # maximum number of characters allowed for reporting an user to # instance's admin #default is 100 -#max-report-comment-length = 100 +#max-report-comment-length = 100 # Character to use when replying to a message -reply-quoted-character = "> " +reply-quoted-character = "> " # delete the command history entries that are older than this number # of days -purge-history-days-offset = -30 +purge-history-days-offset = -30 # delete the cache entries that are older than this number of days -purge-cache-days-offset = -7 +purge-cache-days-offset = -7 # chosen editor (as shell command line) for compose a message -editor = "nano --locking" +editor = "nano --locking" # update gemlog subscriptions when program starts # (default 'no', change to 'yes' if desired) -start.update.gemlog = no +start.update.gemlog = no + +# close links window when opening the selected link + +open-message-link-window.close-after-select = yes # color parts of a displayed message according to a regular expression # syntax is regular expression color attribute diff --git a/src/open-message-link-window.lisp b/src/open-message-link-window.lisp index 09acc32..93106f3 100644 --- a/src/open-message-link-window.lisp +++ b/src/open-message-link-window.lisp @@ -75,6 +75,9 @@ (let* ((parsed (iri:iri-parse url)) (scheme (uri:scheme parsed)) (decoded-path (percent-decode url))) + (when (and (not enqueue) + (swconf:close-link-window-after-select-p)) + (ui:close-open-message-link-window)) (cond ((string= gemini-constants:+gemini-scheme+ scheme) (db:insert-in-history (ui:gemini-open-url-prompt) url) diff --git a/src/package.lisp b/src/package.lisp index 0917498..68f2419 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -1113,6 +1113,7 @@ :load-config-file :external-editor :gemini-downloading-animation + :close-link-window-after-select-p :suggestion-window-selected-item-colors :gemini-default-favicon :gemini-update-gemlog-at-start-p diff --git a/src/software-configuration.lisp b/src/software-configuration.lisp index 04df99f..fa595fa 100644 --- a/src/software-configuration.lisp +++ b/src/software-configuration.lisp @@ -527,6 +527,7 @@ directory-symbol fetch update + close-after-select password-echo-character color-re ignore-user-re @@ -595,6 +596,12 @@ (access-key->user-directive keys)))) value))) +(defun close-link-window-after-select-p () + (let ((value (access:accesses *software-configuration* + +key-open-message-link-window+ + +key-close-after-select+))) + (not (false-value-p value)))) + (defun suggestion-window-selected-item-colors () (values (access-non-null-conf-value *software-configuration* +key-suggestions-window+