mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-22 08:57:37 +01:00
- added 'editor' as pseudo external program.
This commit is contained in:
parent
6cbad4b3fd
commit
e7d413162b
@ -200,6 +200,10 @@ gemini.exclusive.mode.toc.width = 1/5
|
|||||||
# ▼▼▼▼▼▼▼▼▼ buffer 20 Mib
|
# ▼▼▼▼▼▼▼▼▼ buffer 20 Mib
|
||||||
# open "mp4$" with "xterm -e mpv" no wait buffer 20
|
# open "mp4$" with "xterm -e mpv" no wait buffer 20
|
||||||
|
|
||||||
|
# to open some kind of files use "editor" as program name
|
||||||
|
# ▼▼▼▼▼▼▼▼
|
||||||
|
#open "txt$" with "editor"
|
||||||
|
|
||||||
# finally if you want to open some kind of file with tinmop try the
|
# finally if you want to open some kind of file with tinmop try the
|
||||||
# following: valid values are "tinmop" "me" "internal"
|
# following: valid values are "tinmop" "me" "internal"
|
||||||
# ▼▼▼▼▼▼▼▼
|
# ▼▼▼▼▼▼▼▼
|
||||||
@ -208,6 +212,8 @@ open "^((gemini://)|(\\.)|(/)).+txt$" with "tinmop"
|
|||||||
open "^((gemini://)|(\\.)|(/)).+sh$" with "tinmop"
|
open "^((gemini://)|(\\.)|(/)).+sh$" with "tinmop"
|
||||||
open ".gpub$" with "tinmop"
|
open ".gpub$" with "tinmop"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
# ⚠ EXPERIMENTAL ZONE ⚠ #
|
# ⚠ EXPERIMENTAL ZONE ⚠ #
|
||||||
#########################
|
#########################
|
||||||
|
@ -169,11 +169,17 @@
|
|||||||
(defun open-resource-with-external-program (resource give-focus-to-message-window)
|
(defun open-resource-with-external-program (resource give-focus-to-message-window)
|
||||||
(let ((program (swconf:link-regex->program-to-use resource)))
|
(let ((program (swconf:link-regex->program-to-use resource)))
|
||||||
(if program
|
(if program
|
||||||
(if (swconf:use-tinmop-as-external-program-p program)
|
(cond
|
||||||
(gemini-viewer:load-gemini-url resource
|
((swconf:use-editor-as-external-program-p program)
|
||||||
:give-focus-to-message-window
|
(croatoan:end-screen)
|
||||||
give-focus-to-message-window)
|
(tui:with-notify-errors
|
||||||
(os-utils:open-link-with-program program resource))
|
(os-utils:open-with-editor resource)))
|
||||||
|
((swconf:use-tinmop-as-external-program-p program)
|
||||||
|
(gemini-viewer:load-gemini-url resource
|
||||||
|
:give-focus-to-message-window
|
||||||
|
give-focus-to-message-window))
|
||||||
|
(t
|
||||||
|
(os-utils:open-link-with-program program resource)))
|
||||||
(os-utils:xdg-open resource))))
|
(os-utils:xdg-open resource))))
|
||||||
|
|
||||||
(defun unzip-file (zip-file destination-dir)
|
(defun unzip-file (zip-file destination-dir)
|
||||||
|
@ -1245,6 +1245,7 @@
|
|||||||
:link-regex->program-to-use
|
:link-regex->program-to-use
|
||||||
:link-regex->program-to-use-buffer-size
|
:link-regex->program-to-use-buffer-size
|
||||||
:use-tinmop-as-external-program-p
|
:use-tinmop-as-external-program-p
|
||||||
|
:use-editor-as-external-program-p
|
||||||
:thread-message-symbol
|
:thread-message-symbol
|
||||||
:thread-message-read-colors
|
:thread-message-read-colors
|
||||||
:thread-message-unread-colors
|
:thread-message-unread-colors
|
||||||
|
@ -1036,6 +1036,9 @@
|
|||||||
(defun use-tinmop-as-external-program-p (program)
|
(defun use-tinmop-as-external-program-p (program)
|
||||||
(cl-ppcre:scan "(^me$)|(^internal$)|(tinmop)" program))
|
(cl-ppcre:scan "(^me$)|(^internal$)|(tinmop)" program))
|
||||||
|
|
||||||
|
(defun use-editor-as-external-program-p (program)
|
||||||
|
(cl-ppcre:scan "(^ed$)|(^editor$)" program))
|
||||||
|
|
||||||
(defun config-win-focus-mark ()
|
(defun config-win-focus-mark ()
|
||||||
(values (access:accesses *software-configuration*
|
(values (access:accesses *software-configuration*
|
||||||
+key-window+
|
+key-window+
|
||||||
|
Loading…
x
Reference in New Issue
Block a user