blob: 32032e00eee49e9e9ba384afd80d6bfc19f88cdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
;; jao-proton-bridge.el -- simple interaction with ProtonMail's bridge
;; Copyright (c) 2018 Jose Antonio Ortega Ruiz
;; Author: Jose Antonio Ortega Ruiz <mail@jao.io>
;; Start date: Fri Dec 21, 2018 23:56
;;; Comentary:
;; This is a very simple comint-derived mode to run the CLI version
;; of PM's Bridge within the comfort of emacs.
;;; Code:
(define-derived-mode proton-bridge-mode comint-mode "proton-bridge"
"A very simple comint-based mode to run ProtonMail's bridge"
(setq comint-prompt-read-only t)
(setq comint-prompt-regexp "^>>> "))
(defun run-proton-bridge ()
"Run or switch to an existing bridge process, using its CLI"
(interactive)
(pop-to-buffer (make-comint "proton-bridge" "Desktop-Bridge" nil "-c"))
(unless (eq major-mode 'proton-bridge-mode)
(proton-bridge-mode)))
(provide 'jao-proton-bridge)
;;; jao-proton-bridge.el ends here
|