From 04158d22c9cee3c37cb2598a06764603c3315bba Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 22 Dec 2018 00:00:58 +0000 Subject: New: jao-proton-bridge --- net/jao-proton-bridge.el | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 net/jao-proton-bridge.el (limited to 'net/jao-proton-bridge.el') 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 +;; 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 -- cgit v1.2.3