Try to rely less on the current graphics mode

This commit is contained in:
Gergely Polonkai 2018-11-30 10:09:45 +01:00
parent 92b669771c
commit cf216711e6
1 changed files with 24 additions and 21 deletions

View File

@ -1013,8 +1013,9 @@ Also, maximise the frame.
Before this can be used, make sure the [[https://zhm.github.io/symbola/][Symbola]] font is installed.
#+BEGIN_SRC emacs-lisp
(set-face-attribute 'default t :font "Hack-12")
(set-frame-font "Hack-12" nil t)
(defun gpolonkai/set-font-size (frame)
(set-face-attribute 'default t :font "Hack-12")
(set-frame-font "Hack-12" t t))
(defun --set-emoji-font (frame)
"Adjust the font setting of FRAME so Emacs can display Emoji properly."
@ -1028,6 +1029,9 @@ Before this can be used, make sure the [[https://zhm.github.io/symbola/][Symbola
(set-fontset-font t 'symbol
(font-spec :family "Symbola")
frame 'prepend))))
(add-hook 'after-make-frame-functions 'gpolonkai/set-font-size)
(add-hook 'after-make-frame-functions '--set-emoji-font)
#+END_SRC
* Set up global minor modes provided by Emacs
@ -1467,9 +1471,8 @@ I dont usually like to see them, but there are occasions when they can be use
*** Nyan prompt in EShell
#+BEGIN_SRC emacs-lisp
(when (display-graphic-p)
(use-package nyan-prompt
:ensure nil))
(use-package nyan-prompt
:ensure nil)
#+END_SRC
*** Zone out with Nyancat
@ -1477,13 +1480,12 @@ I dont usually like to see them, but there are occasions when they can be use
Unfortunately, this works only in a graphical mode.
#+BEGIN_SRC emacs-lisp
(when (display-graphic-p)
(use-package zone-nyan
:after
zone
:config
(setq-default zone-nyan-hide-progress t)
(setq zone-programs (vconcat zone-programs [zone-nyan]))))
(use-package zone-nyan
:after
zone
:config
(setq-default zone-nyan-hide-progress t)
(setq zone-programs (vconcat zone-programs [zone-nyan])))
#+END_SRC
** De-light some minor modes
@ -1536,10 +1538,9 @@ Highlight point. Sometimes its not easy to see.
*** Display the status of the last command in the fringe of EShell
#+BEGIN_SRC emacs-lisp
(when (display-graphic-p)
(use-package eshell-fringe-status
:hook
(eshell-mode . eshell-fringe-status-mode)))
(use-package eshell-fringe-status
:hook
(eshell-mode . eshell-fringe-status-mode))
#+END_SRC
*** Extras for the EShell prompt
@ -2085,13 +2086,16 @@ requires connecting to a website and download a pretty large font file.
** NeoTree, if Dired is not an option
#+BEGIN_SRC emacs-lisp
(defun gpolonkai/neo-set-theme ()
(customize-set-variable 'neo-theme (if (display-graphic-p) 'icons 'arrow)))
(use-package neotree
:after
all-the-icons
:config
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
:bind
(([f5] . neotree-toggle)))
(([f5] . neotree-toggle))
:hook
(neo-enter . gpolonkai/neo-set-theme))
#+END_SRC
** Waka-waka
@ -2808,8 +2812,7 @@ See previous versions of the current file.
:init
(--set-emoji-font nil)
:config
(add-to-list 'company-backends 'company-emoji)
(add-hook 'after-make-frame-functions '--set-emoji-font))
(add-to-list 'company-backends 'company-emoji))
#+END_SRC
** Anaconda backend for Company