Add tools/impatient-mode
This commit is contained in:
parent
ea4e3e3c77
commit
72557d8c43
5 changed files with 38 additions and 1 deletions
|
@ -63,6 +63,7 @@
|
|||
electric-indent ; smarter, keyword-based electric-indent
|
||||
eshell ; a consistent, cross-platform shell (WIP)
|
||||
gist ; interacting with github gists
|
||||
impatient-mode ; show off code over HTTP
|
||||
;macos ; MacOS-specific commands
|
||||
neotree ; a project drawer, like NERDTree for vim
|
||||
password-store ; password manager for nerds
|
||||
|
|
|
@ -281,7 +281,7 @@
|
|||
:desc "Fullscreen" :n "f" #'doom/toggle-fullscreen
|
||||
:desc "Indent guides" :n "i" #'highlight-indentation-mode
|
||||
:desc "Indent guides (column)" :n "I" #'highlight-indentation-current-column-mode
|
||||
:desc "Impatient mode" :n "h" #'+present/impatient-mode
|
||||
:desc "Impatient mode" :n "h" #'+impatient-mode/toggle
|
||||
:desc "Big mode" :n "b" #'doom-big-font-mode
|
||||
:desc "Evil goggles" :n "g" #'+evil-goggles/toggle))
|
||||
|
||||
|
|
25
modules/tools/impatient-mode/autoload.el
Normal file
25
modules/tools/impatient-mode/autoload.el
Normal file
|
@ -0,0 +1,25 @@
|
|||
;;; tools/impatient-mode/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +impatient-mode/toggle ()
|
||||
"TODO"
|
||||
(interactive)
|
||||
(require 'simple-httpd)
|
||||
(unless (process-status "httpd")
|
||||
(httpd-start))
|
||||
(impatient-mode)
|
||||
(if impatient-mode
|
||||
(add-hook 'kill-buffer-hook '+impatient-mode--cleanup-impatient-mode)
|
||||
(+impatient-mode--cleanup-impatient-mode)))
|
||||
|
||||
(defun +impatient-mode--cleanup-impatient-mode ()
|
||||
(unless (cl-loop for buf in (doom-buffer-list)
|
||||
if (buffer-local-value 'impatient-mode buf)
|
||||
return t)
|
||||
(httpd-stop)
|
||||
(cl-loop for buf in (doom-buffer-list)
|
||||
if (buffer-local-value 'impatient-mode buf)
|
||||
do
|
||||
(with-current-buffer buf
|
||||
(impatient-mode -1)))
|
||||
(remove-hook 'kill-buffer-hook '+impatient-mode--cleanup-impatient-mode)))
|
6
modules/tools/impatient-mode/config.el
Normal file
6
modules/tools/impatient-mode/config.el
Normal file
|
@ -0,0 +1,6 @@
|
|||
;;; tools/impatient-mode/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Show off code as you write it
|
||||
|
||||
(def-package! impatient-mode
|
||||
:commands impatient-mode)
|
5
modules/tools/impatient-mode/packages.el
Normal file
5
modules/tools/impatient-mode/packages.el
Normal file
|
@ -0,0 +1,5 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; tools/impatient-mode/packages.el
|
||||
|
||||
(package! htmlize)
|
||||
(package! impatient-mode)
|
Loading…
Add table
Add a link
Reference in a new issue