49 lines
1.2 KiB
EmacsLisp
49 lines
1.2 KiB
EmacsLisp
;;; noise.el --- Signal Messenger client for Emacs -*- lexical-binding: t; -*-
|
|
|
|
;; Author: Noise contributors
|
|
;; Version: 0.1.0
|
|
;; Package-Requires: ((emacs "27.1"))
|
|
;; Keywords: comm
|
|
|
|
;;; Commentary:
|
|
|
|
;; Noise is a Signal Messenger client powered by signal-cli JSON-RPC.
|
|
|
|
;;; Code:
|
|
|
|
(require 'noise-rpc)
|
|
|
|
(defgroup noise nil
|
|
"Signal Messenger client for Emacs."
|
|
:group 'comm
|
|
:prefix "noise-")
|
|
|
|
(defcustom noise-signal-cli-address "http://localhost:9128"
|
|
"Base URL of the signal-cli JSON-RPC daemon.
|
|
Format: http://HOST:PORT"
|
|
:type 'string
|
|
:group 'noise)
|
|
|
|
;;;###autoload
|
|
(defun noise-check-connection ()
|
|
"Check connectivity to the signal-cli JSON-RPC daemon."
|
|
(interactive)
|
|
(condition-case err
|
|
(let ((version (noise-rpc-check)))
|
|
(message "signal-cli connected (version %s)" version))
|
|
(noise-rpc-error
|
|
(message "Error: %s" (cdr err)))))
|
|
|
|
;;;###autoload
|
|
(define-minor-mode noise-mode
|
|
"Toggle Noise Signal client mode."
|
|
:global t
|
|
:lighter " Noise"
|
|
:group 'noise
|
|
(if noise-mode
|
|
(message "Noise mode enabled — signal-cli at %s" noise-signal-cli-address)
|
|
(message "Noise mode disabled")))
|
|
|
|
(provide 'noise)
|
|
;;; noise.el ends here
|