New module, :app everywhere
This commit is contained in:
parent
16a495c97d
commit
74613c25e2
6 changed files with 112 additions and 0 deletions
|
@ -175,6 +175,7 @@
|
||||||
|
|
||||||
:app
|
:app
|
||||||
;;calendar
|
;;calendar
|
||||||
|
;;everywhere ; *leave* Emacs!? You must be joking
|
||||||
;;irc ; how neckbeards socialize
|
;;irc ; how neckbeards socialize
|
||||||
;;(rss +org) ; emacs as an RSS reader
|
;;(rss +org) ; emacs as an RSS reader
|
||||||
;;twitter ; twitter client https://twitter.com/vnought
|
;;twitter ; twitter client https://twitter.com/vnought
|
||||||
|
|
58
modules/app/everywhere/README.org
Normal file
58
modules/app/everywhere/README.org
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
#+title: app/everywhere
|
||||||
|
#+date: February 7, 2021
|
||||||
|
#+since: v3.0
|
||||||
|
#+startup: inlineimages nofold
|
||||||
|
|
||||||
|
* Table of Contents :TOC_3:noexport:
|
||||||
|
- [[#description][Description]]
|
||||||
|
- [[#maintainers][Maintainers]]
|
||||||
|
- [[#module-flags][Module Flags]]
|
||||||
|
- [[#plugins][Plugins]]
|
||||||
|
- [[#prerequisites][Prerequisites]]
|
||||||
|
- [[#features][Features]]
|
||||||
|
- [[#configuration][Configuration]]
|
||||||
|
|
||||||
|
* Description
|
||||||
|
This module adds system-wide popup Emacs windows for quick edits.
|
||||||
|
|
||||||
|
** Maintainers
|
||||||
|
+ [[https://github.com/tecosaur][@tecosaur]]
|
||||||
|
|
||||||
|
** Module Flags
|
||||||
|
|
||||||
|
This module provides no flags.
|
||||||
|
|
||||||
|
** Plugins
|
||||||
|
+ [[https://github.com/tecosaur/emacs-everywhere][emacs-everywhere]]
|
||||||
|
|
||||||
|
* Prerequisites
|
||||||
|
|
||||||
|
On Linux =xclip=, =xdotool=, =xprop=, and =xwininfo= are needed.
|
||||||
|
|
||||||
|
On MacOS, Emacs must be allowed to "control your computer" under *Settings > Accessibility*.
|
||||||
|
|
||||||
|
* Features
|
||||||
|
|
||||||
|
To use this, invoke the =emacs-everywhere= executable. This can be done in two
|
||||||
|
ways:
|
||||||
|
+ ~emacsclient --eval "(emacs-everywhere)"~
|
||||||
|
+ ~doom everywhere~
|
||||||
|
|
||||||
|
It is recommended that you add a keybinding for this.
|
||||||
|
|
||||||
|
From here, you can edit away to your hearts content in the created frame, then
|
||||||
|
return to the original window and paste the content with =C-c C-c= or =SPC q f=.
|
||||||
|
To exit without pasting, use =C-c C-k=.
|
||||||
|
|
||||||
|
* Configuration
|
||||||
|
|
||||||
|
=emacs-everywhere= likes to guess if you triggered it from an application which
|
||||||
|
supports markdown. Configure ~emacs-everywhere-markdown-windows~ and
|
||||||
|
~emacs-everywhere-markdown-apps~ to improve how accurate this is on your system.
|
||||||
|
|
||||||
|
By default, when markdown is detected, ~markdown-mode~ is used. It is possible to
|
||||||
|
instead use pandoc to convert the content to Org (and export to markdown when
|
||||||
|
closing the frame) by setting ~emacs-everywhere-major-mode-function~ to
|
||||||
|
=#'org-mode=.
|
||||||
|
|
||||||
|
Most other behaviour is implemented as hooks on ~emacs-everywhere-init-hooks~.
|
5
modules/app/everywhere/cli.el
Normal file
5
modules/app/everywhere/cli.el
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
;;; app/everywhere/cli.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(defcli! everywhere ()
|
||||||
|
"Spawn an emacsclient window for quick edits."
|
||||||
|
(throw 'exit (list "emacsclient" "--eval" "(emacs-everywhere)")))
|
30
modules/app/everywhere/config.el
Normal file
30
modules/app/everywhere/config.el
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
;;; app/everywhere/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(use-package! emacs-everywhere
|
||||||
|
:defer ; entry point is autoloaded
|
||||||
|
:config
|
||||||
|
(after! doom-modeline
|
||||||
|
(doom-modeline-def-segment emacs-everywhere
|
||||||
|
(concat (doom-modeline-spc)
|
||||||
|
(when (emacs-everywhere-markdown-p)
|
||||||
|
(concat
|
||||||
|
(all-the-icons-octicon "markdown" :face 'all-the-icons-green :v-adjust 0.02)
|
||||||
|
(doom-modeline-spc)))
|
||||||
|
(propertize emacs-everywhere-app-name
|
||||||
|
'face 'doom-modeline-project-dir)
|
||||||
|
(doom-modeline-spc)
|
||||||
|
(propertize (truncate-string-to-width emacs-everywhere-window-title
|
||||||
|
45 nil nil "…")
|
||||||
|
'face 'doom-modeline-buffer-minor-mode)))
|
||||||
|
(doom-modeline-def-modeline 'emacs-everywhere
|
||||||
|
'(bar modals emacs-everywhere buffer-position word-count parrot selection-info)
|
||||||
|
'(input-method major-mode checker))
|
||||||
|
(defun emacs-everywhere-set-modeline ()
|
||||||
|
(doom-modeline-set-modeline 'emacs-everywhere))
|
||||||
|
(add-hook 'emacs-everywhere-init-hooks #'emacs-everywhere-set-modeline))
|
||||||
|
(when (featurep! :ui workspaces)
|
||||||
|
(defun emacs-everywhere-clear-persp-info ()
|
||||||
|
(setq persp-emacsclient-init-frame-behaviour-override nil))
|
||||||
|
(add-hook 'emacs-everywhere-init-hooks #'emacs-everywhere-clear-persp-info))
|
||||||
|
(after! solaire-mode
|
||||||
|
(add-hook 'emacs-everywhere-init-hooks #'solaire-mode)))
|
12
modules/app/everywhere/doctor.el
Normal file
12
modules/app/everywhere/doctor.el
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
;;; app/everywhere/doctor.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(when IS-WINDOWS
|
||||||
|
(error! "emacs-everywhere package does not support windows."))
|
||||||
|
|
||||||
|
(when IS-LINUX
|
||||||
|
(let (unmet-deps)
|
||||||
|
(dolist (dep '("xclip" "xdotool" "xprop" "xwininfo"))
|
||||||
|
(unless (executable-find dep)
|
||||||
|
(push dep unmet-deps)))
|
||||||
|
(when unmet-deps
|
||||||
|
(error! "Unmet dependencies: %s" (string-join unmet-deps ", ")))))
|
6
modules/app/everywhere/packages.el
Normal file
6
modules/app/everywhere/packages.el
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; app/everywhere/packages.el
|
||||||
|
|
||||||
|
(package! emacs-everywhere
|
||||||
|
:recipe (:host github :repo "tecosaur/emacs-everywhere")
|
||||||
|
:pin "d84b397c9a82c2fea1b0c87740c395a2c7af3be8")
|
Loading…
Add table
Add a link
Reference in a new issue