diff --git a/oni-gui.el b/oni-gui.el index 28f6dd8..df72750 100644 --- a/oni-gui.el +++ b/oni-gui.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.0408.234044 +;; Version: 2020.0409.131343 ;; Package-Requires: (oni-ui oni-hydra yoshi-theme diminish) ;; This program is free software; you can redistribute it and/or modify @@ -32,26 +32,31 @@ (defconst oni-gui-isearch-icon ?) -(set-fontset-font t oni-gui-isearch-icon "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") -(set-fontset-font t ? "Font Awesome 5 Free Solid") +(defun oni-gui-setup-fontsets (frame) + "Setup fontsets for FRAME. +If FRAME is nil, they’re set for the current frame." + (let ((font-awesome "Font Awesome 5 Free Solid-12")) + (set-fontset-font t oni-gui-isearch-icon font-awesome frame) + (set-fontset-font t ? font-awesome frame) + (set-fontset-font t ? font-awesome frame) + (set-fontset-font t ? font-awesome frame) + (set-fontset-font t ? font-awesome frame) + (set-fontset-font t ? font-awesome frame) + (set-fontset-font t ? font-awesome frame) + (set-fontset-font t ? font-awesome frame) + (set-fontset-font t ? font-awesome frame) + (set-fontset-font t ? font-awesome frame) + (set-fontset-font t ? font-awesome frame) + (set-fontset-font t ? font-awesome frame) + (set-fontset-font t ? font-awesome frame)) + (let ((dejavu-sans-mono "DejaVu Sans Mono")) + (set-fontset-font t ?◉ dejavu-sans-mono frame) + (set-fontset-font t ?○ dejavu-sans-mono frame) + (set-fontset-font t ?✸ dejavu-sans-mono frame) + (set-fontset-font t ?✿ dejavu-sans-mono frame))) -(set-fontset-font t ?◉ "DejaVu Sans Mono") -(set-fontset-font t ?○ "DejaVu Sans Mono") -(set-fontset-font t ?✸ "DejaVu Sans Mono") -(set-fontset-font t ?✿ "DejaVu Sans Mono") - -(diminish 'isearch-mode (string ?\s oni-gui-isearch-icon)) +(with-eval-after-load 'isearch + (diminish 'isearch-mode (string ?\s oni-gui-isearch-icon))) (defhydra oni-gui-hydra (:color teal :hint nil) " @@ -70,6 +75,10 @@ _bi_: Auto Insert ^^ ^^ (scroll-bar-mode -1) +(if (daemonp) + (add-hook 'after-make-frame-functions #'oni-gui-setup-fontsets) + (oni-gui-setup-fontsets nil)) + (global-unset-key (kbd "C-z")) (global-set-key (kbd "C-c c") 'oni-gui-hydra/body)