2016-05-26 18:58:43 -04:00
|
|
|
;;; extra-demo.el --- -*- no-byte-compile: t; -*-
|
2016-01-29 07:05:00 -05:00
|
|
|
|
2016-04-26 02:00:19 -04:00
|
|
|
(defvar powerline-height)
|
|
|
|
|
2016-01-29 07:05:00 -05:00
|
|
|
;; This library offers:
|
|
|
|
;; + impatient-mode: for broadcasting my emacs session
|
2016-02-04 18:52:50 -05:00
|
|
|
;; + big-mode: for enlarged text while screencasting
|
2016-04-23 22:08:46 -04:00
|
|
|
;; + TODO integration with reveal.js for presentations
|
|
|
|
;; + TODO peer programming collab
|
|
|
|
|
2016-02-04 18:52:50 -05:00
|
|
|
;; Big-mode settings
|
2016-05-28 21:51:21 -04:00
|
|
|
(defconst big-mode-font (font-spec :family "Inconsolata" :size 18))
|
|
|
|
(defconst big-mode-line-spacing 1)
|
2016-05-20 17:24:37 -04:00
|
|
|
(defconst big-mode-modeline-height 35)
|
2016-01-29 07:05:00 -05:00
|
|
|
|
2016-04-23 22:08:46 -04:00
|
|
|
;;
|
2016-01-29 07:05:00 -05:00
|
|
|
(use-package impatient-mode
|
2016-05-26 18:58:43 -04:00
|
|
|
:commands impatient-mode
|
|
|
|
:config (httpd-start))
|
2016-01-29 07:05:00 -05:00
|
|
|
|
2016-02-26 00:03:19 -05:00
|
|
|
(defvar big-mode--line-spacing line-spacing)
|
|
|
|
(defvar big-mode--powerline-height powerline-height)
|
2016-01-29 07:05:00 -05:00
|
|
|
(define-minor-mode big-mode
|
|
|
|
:init-value nil
|
|
|
|
:lighter " BIG"
|
|
|
|
:global t
|
2016-05-20 22:37:30 -04:00
|
|
|
(doom/load-font (if big-mode big-mode-font doom-default-font))
|
2016-05-21 23:12:50 -04:00
|
|
|
(setq-default
|
|
|
|
powerline-height
|
|
|
|
(if big-mode big-mode-modeline-height big-mode--powerline-height)
|
|
|
|
line-spacing
|
2016-05-26 18:58:43 -04:00
|
|
|
(if big-mode big-mode-line-spacing big-mode--line-spacing))
|
|
|
|
(if big-mode
|
|
|
|
(progn
|
|
|
|
(setq neo-window-width 25)
|
|
|
|
(add-hook 'neo-after-create-hook 'doom|text-scale-1))
|
|
|
|
(setq neo-window-width 28)
|
|
|
|
(remove-hook 'neo-after-create-hook 'doom|text-scale-1)))
|
|
|
|
|
2016-05-28 21:51:21 -04:00
|
|
|
(defun doom|text-scale-1 (&rest _)
|
|
|
|
(text-scale-set -1) (setq line-spacing 0))
|
|
|
|
|
|
|
|
(evil-define-command doom:big-mode (&optional size)
|
|
|
|
(interactive "<a>")
|
|
|
|
(let ((big-mode-font big-mode-font))
|
|
|
|
(when (and size (not big-mode))
|
|
|
|
(font-put big-mode-font :size (string-to-int size)))
|
|
|
|
(big-mode (if big-mode -1 +1))))
|
2016-01-29 07:05:00 -05:00
|
|
|
|
2016-04-19 02:09:14 -04:00
|
|
|
(provide 'extra-demo)
|
|
|
|
;;; extra-demo.el ends here
|