2021-11-18 20:14:10 +00:00
#+TITLE : Auxillary and Optional Applications
#+AUTHOR : Howard X. Abrams
#+DATE : 2021-11-18
A literate programming file for helper apps in Emacs.
2022-06-18 00:25:47 +00:00
#+begin_src emacs-lisp :exports none
2022-03-09 18:45:37 +00:00
;;; ha-aux-apps --- Configuring helper apps in Emacs. -*- lexical-binding: t; -* -
2021-11-18 20:14:10 +00:00
;;
2023-02-23 17:35:36 +00:00
;; © 2021-2023 Howard X. Abrams
2022-06-18 00:25:47 +00:00
;; Licensed under a Creative Commons Attribution 4.0 International License.
2022-03-09 18:45:37 +00:00
;; See http://creativecommons.org/licenses/by/4.0/
2021-11-18 20:14:10 +00:00
;;
;; Author: Howard X. Abrams <http://gitlab.com/howardabrams >
;; Maintainer: Howard X. Abrams
;; Created: November 18, 2021
;;
;; This file is not part of GNU Emacs.
;;
;; *NB:* Do not edit this file. Instead, edit the original literate file at:
;; ~/other/hamacs/ha-aux-apps.org
;; And tangle the file to recreate this one.
;;
;;; Code:
2022-06-18 00:25:47 +00:00
#+end_src
2021-11-18 20:14:10 +00:00
* Introduction
2022-06-18 00:25:47 +00:00
The following applications are not needed. I alternate between trying to /stay in Emacs/ taking advantage of the consistent interface, and using a stand-alone app on my Workday computer.
2021-12-30 02:51:25 +00:00
* Twitter
2021-11-18 20:14:10 +00:00
The venerable [[https://github.com/hayamiz/twittering-mode/tree/master ][twittering-mode ]] allows me to follow all the twits.
2022-03-03 23:08:09 +00:00
2022-06-18 00:25:47 +00:00
#+begin_src emacs-lisp
2021-11-18 20:14:10 +00:00
(use-package twittering-mode
:init
(setq twittering-use-master-password t
epa-pinentry-mode 'loopback)
:config
2022-03-03 23:08:09 +00:00
(defalias 'epa--decode-coding-string 'decode-coding-string)
(ha-leader "a t" '("twitter" . twit)))
2022-06-18 00:25:47 +00:00
#+end_src
2022-11-08 04:47:18 +00:00
* Mastodon
2022-11-25 07:17:21 +00:00
Glad to see the 2FA feature is working on the [[https://codeberg.org/martianh/mastodon.el ][mastodon.el ]] project, and even more glad to see the great birdland diaspora arrive in the land of the toots.
2022-11-08 04:47:18 +00:00
#+begin_src emacs-lisp
(use-package mastodon
:straight (:repo "https://codeberg.org/martianh/mastodon.el")
:init
2022-11-15 19:07:18 +00:00
(setq mastodon-instance-url "https://emacs.ch"
mastodon-active-user "howard")
2022-11-25 07:17:21 +00:00
:bind
(:map mastodon-mode-map
2022-11-27 18:40:23 +00:00
("g" . mastodon-tl--update)))
2022-11-25 07:17:21 +00:00
#+end_src
I would like a dedicate perspective to Mastodon, and I would like a leader key sequence that /expands/ will all options, once Mastodon is running in its own perspective:
#+begin_src emacs-lisp
(use-package mastodon
2022-11-08 04:47:18 +00:00
:config
2022-11-25 07:17:21 +00:00
(defun mastodon-perspective ()
(interactive)
(let ((already-tooted? (seq-contains-p
(persp-names) "mastodon" 'equal)))
(persp-switch "mastodon")
(unless already-tooted?
(ha-leader
"a m t" '("toot" . mastodon-toot)
"a m u" '("update" . mastodon-tl--update)
"a m d" '("discover" . mastodon-discover))
(my-mastodon-start))))
(ha-leader
"a m" '(:ignore t :which-key "mastodon")
"a m m" '("perspective" . mastodon-perspective)))
#+end_src
2022-11-27 18:40:23 +00:00
Starting the =mastodon= perspective, I set some initial windows:
2022-11-25 07:17:21 +00:00
#+begin_src emacs-lisp
(defun my-mastodon-start ()
"Configure the window placement for a Mastodon Instance."
(let ((default-directory (getenv "HOME")))
(mastodon)
2022-11-27 18:40:23 +00:00
(switch-to-buffer "*mastodon-home* ")
2022-11-25 07:17:21 +00:00
(split-window-right)
(mastodon-tl--get-local-timeline)
2022-11-27 18:40:23 +00:00
(switch-to-buffer "*mastodon-local* ")))
2022-11-25 07:17:21 +00:00
#+end_src
2021-12-30 02:51:25 +00:00
* Telega
2022-11-27 18:40:39 +00:00
I'm thinking the [[https://zevlg.github.io/telega.el/ ][Telega package ]] would be better than Bitlbee for Telegram communication.
2022-06-18 00:25:47 +00:00
#+begin_src emacs-lisp
2022-11-27 18:40:39 +00:00
(use-package telega
2022-02-02 19:52:07 +00:00
:commands (telega)
:init
2022-02-17 17:54:03 +00:00
(setq telega-use-images nil)
:config
2022-11-27 18:40:39 +00:00
(ha-leader "a T" 'telega))
2022-06-18 00:25:47 +00:00
#+end_src
2021-11-18 20:14:10 +00:00
For some reason, you need [[https://github.com/Fanael/rainbow-identifiers ][rainbow-identifiers ]] to work, oh, I guess the docs state this.
2023-02-22 01:25:33 +00:00
* Matrix/Element
Yet another encrypted chat/VoIP client-server, but unlike Signal and Telegram, [[matrix.org][Matrix]] is act ually open source. In other words, a project for nerds. We’ ll be using Alphapapa’ s latest [[https:/ /github.c om/alphapapa/ement.el][ement]] project.
#+begin_src emacs-lisp
(use-package ement
:straight (:host github :repo "alphapapa/ement.el")
:init
(setq ement-save-sessions t
ement-room-send-message-filter 'ement-room-send-org-filter)
:config
(defun ha-ement-connect ()
(interactive)
(let* ((auth-results (auth-source-search :host "howardism-matrix"))
(auth-first (first auth-results))
(username (plist-get auth-first :user))
(password (funcall (plist-get auth-first :secret))))
(ement-connect :user-id username
:password password
:uri-prefix "https://howardism.org"))
(ha-leader
"a x S" '("send" . ement-send-direct-message)
"a x s" '("send" . ement-room-send-message)
"a x c" '("compose" . ement-room-compose-message)
"a x r" '("room" . ement-view-room)
"a x d" '("discover" . mastodon-discover)))
(ha-leader
"a x" '(:ignore t :which-key "matrix")
"a x x" '("connect" . ha-ement-connect)
"a x s" '("send" . ement-send-direct-message)))
#+end_src
2022-11-27 18:40:39 +00:00
2022-01-06 23:36:39 +00:00
* RPG DM
2022-11-08 04:58:33 +00:00
Been working on my [[https://gitlab.com/howardabrams/emacs-rpgdm ][RPG DM project ]] for getting Emacs helping as a /Dungeon Master's Assistant/ . The idea is to be able to roll dice and whatnot. What I find most useful is the [[https://gitlab.com/howardabrams/emacs-rpgdm/-/blob/main/rpgdm-tables.el ][random tables ]].
2022-06-18 00:25:47 +00:00
#+begin_src emacs-lisp
2022-01-07 00:41:40 +00:00
(when (f-directory? "~/other/rpgdm")
(use-package rpgdm
:straight (:local-repo "~/other/rpgdm")
:commands (rpgdm-mode rpgdm-tables-load)
2022-03-03 23:10:16 +00:00
:init (setq rpgdm-base (expand-file-name "~/other/rpgdm"))
2022-01-07 00:41:40 +00:00
:config (ha-leader "t D" '("rpg dm" . rpgdm-mode))))
2022-06-18 00:25:47 +00:00
#+end_src
2022-03-03 23:10:16 +00:00
2022-11-08 04:58:33 +00:00
And my [[https://gitlab.com/howardabrams/emacs-ironsworn ][new Ironsworn project ]] expands on it, giving me both the Oracles and the Moves. With an Org file, I can easily play Solo:
2022-06-18 00:25:47 +00:00
#+begin_src emacs-lisp
2022-03-03 23:10:16 +00:00
(when (f-directory? "~/other/emacs-ironsworn")
(use-package rpgdm-ironsworn
:after rpgdm
:straight (:local-repo "~/other/emacs-ironsworn")
:init
2022-04-30 04:54:03 +00:00
(setq rpgdm-ironsworn-project (expand-file-name "~/other/emacs-ironsworn")
;; Ignore org links that call my RPG functions:
org-link-elisp-skip-confirm-regexp (rx string-start (optional "(") "rpgdm-"
(or "tables-" "ironsworn-")
(one-or-more any)))))
2022-06-18 00:25:47 +00:00
#+end_src
2022-11-08 04:58:33 +00:00
The project is interesting, and I should record a tutorial how to use it.
2021-11-18 20:14:10 +00:00
* Technical Artifacts :noexport:
Let's =provide= a name so we can =require= this file:
2022-06-18 00:25:47 +00:00
#+begin_src emacs-lisp :exports none
2021-11-18 20:14:10 +00:00
(provide 'ha-aux-apps)
;;; ha-aux-apps.el ends here
2022-06-18 00:25:47 +00:00
#+end_src
2021-11-18 20:14:10 +00:00
#+DESCRIPTION : A literate programming file for helper apps in Emacs.
#+PROPERTY : header-args:sh :tangle no
#+PROPERTY : header-args:emacs-lisp :tangle yes
#+PROPERTY : header-args :results none :eval no-export :comments no mkdirp yes
#+OPTIONS : num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
#+OPTIONS : skip:nil author:nil email:nil creator:nil timestamp:nil
#+INFOJS_OPT : view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js