1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-06-05 01:09:17 +02:00

- added 'file-explorer-close-window';

- modified filesystem explorer window's position.
This commit is contained in:
cage
2022-01-06 12:17:31 +01:00
parent 0da5e6b3ad
commit 624be8b696
5 changed files with 17 additions and 10 deletions

View File

@@ -627,7 +627,7 @@ gemini-toc-window.padding = "⋅"
# file explorer
# this is the message that shows available keybindings
# this is the message that shows an hierarchical filesystem
file-explorer.background = black

View File

@@ -626,6 +626,8 @@
(define-key "end" #'file-explorer-scroll-end *filesystem-explorer-keymap*)
(define-key "q" #'file-explorer-close-window *filesystem-explorer-keymap*)
;;;; hooks
;; this module will install an hook to rewrite urls; By default it

View File

@@ -96,10 +96,12 @@ if the path does not point to an actual file."))
(with-croatoan-window (croatoan-window object)
(refresh-config-colors object swconf:+key-file-explorer+)
(refresh-config-sizes object swconf:+key-file-explorer+)
(let ((y (- (win-height *main-window*)
(win-height object)
+command-window-height+)))
(win-move object 0 y))))
(when (not command-line:*gemini-full-screen-mode*)
(let ((height (- (win-height *main-window*)
(win-height *message-window*)))
(width (win-width *main-window*)))
(resize croatoan-window height width)))
(win-move object 0 0)))
(defmethod calculate :after ((object filesystem-tree-window) dt)
(declare (ignore object dt)))

View File

@@ -2810,7 +2810,8 @@
:file-explorer-delete-tree
:file-explorer-delete-marked
:file-explorer-scroll-begin
:file-explorer-scroll-end))
:file-explorer-scroll-end
:file-explorer-close-window))
(defpackage :scheduled-events
(:use

View File

@@ -2415,10 +2415,9 @@ printed, on the main window."
(open-attach-window:open-attachment avatar-url)))
(defun open-file-explorer ()
(push-event (make-instance 'function-event
:payload (lambda ()
(filesystem-tree-window:init "/")
(focus-to-filesystem-explorer-window)))))
(with-enqueued-process ()
(filesystem-tree-window:init "/")
(focus-to-filesystem-explorer-window)))
(defun file-explorer-expand-path ()
(when-let* ((win *filesystem-explorer-window*)
@@ -2600,3 +2599,6 @@ printed, on the main window."
(line-oriented-window:select-row win (1- (line-oriented-window:rows-length win)))
(windows:win-clear win)
(windows:draw win))))
(defun file-explorer-close-window ()
(close-window-and-return-to-message *filesystem-explorer-window*))