summaryrefslogtreecommitdiffhomepage
path: root/net
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@imladris.local>2018-12-22 00:00:58 +0000
committerJose Antonio Ortega Ruiz <jao@imladris.local>2018-12-22 00:00:58 +0000
commit04158d22c9cee3c37cb2598a06764603c3315bba (patch)
treef0b514cdab4484df96ba293a0d0b175aa3d92fbf /net
parentc8db53dc39bc2c106a9b5b720babf171e8247b97 (diff)
downloadelibs-04158d22c9cee3c37cb2598a06764603c3315bba.tar.gz
elibs-04158d22c9cee3c37cb2598a06764603c3315bba.tar.bz2
New: jao-proton-bridge
Diffstat (limited to 'net')
-rw-r--r--net/jao-proton-bridge.el30
1 files changed, 30 insertions, 0 deletions
diff --git a/net/jao-proton-bridge.el b/net/jao-proton-bridge.el
new file mode 100644
index 0000000..32032e0
--- /dev/null
+++ b/net/jao-proton-bridge.el
@@ -0,0 +1,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