about summary refs log tree commit diff
path: root/users/wpcarro/emacs/.emacs.d/wpc/fonts.el
diff options
context:
space:
mode:
Diffstat (limited to 'users/wpcarro/emacs/.emacs.d/wpc/fonts.el')
-rw-r--r--users/wpcarro/emacs/.emacs.d/wpc/fonts.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/users/wpcarro/emacs/.emacs.d/wpc/fonts.el b/users/wpcarro/emacs/.emacs.d/wpc/fonts.el
index 3d79b71157fb..0f70f69c2b8d 100644
--- a/users/wpcarro/emacs/.emacs.d/wpc/fonts.el
+++ b/users/wpcarro/emacs/.emacs.d/wpc/fonts.el
@@ -9,15 +9,10 @@
 
 ;;; Code:
 
-;; TODO: `defcustom' font-size.
-;; TODO: `defcustom' fonts.
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Dependencies
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(require 'prelude)
-(require 'cycle)
 (require 'maybe)
 (require 'cl-lib)
 
@@ -25,15 +20,16 @@
 ;; Constants
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-;; TODO: Troubleshoot why "8" appears so large on my desktop.
-
-;; TODO: Consider having a different font size when I'm using my 4K monitor.
+(defgroup fonts nil
+  "Customize group for fonts configuration.")
 
-(defconst fonts-size "10"
-  "My preferred default font-size.")
+(defcustom fonts-size "10"
+  "My preferred default font-size."
+  :group 'fonts)
 
-(defconst fonts-size-step 10
-  "The amount (%) by which to increase or decrease a font.")
+(defcustom fonts-size-step 10
+  "The amount (%) by which to increase or decrease a font."
+  :group 'fonts)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Functions
@@ -45,6 +41,10 @@
       (set-frame-font (string-format "%s %s" font size) nil t)
     (set-frame-font font nil t)))
 
+(defun fonts-current ()
+  "Return the currently enabled font."
+  (symbol-name (font-get (face-attribute 'default :font) :family)))
+
 (defun fonts-increase-size ()
   "Increase font size."
   (interactive)