|
|
@@ -1,4 +1,4 @@
|
|
|
-#+TITLE:Doomed Chicken
|
|
|
+#+TITLE:Doomed Chicken
|
|
|
* Preface
|
|
|
This is another attempt at making a decent Emacs configuration for the chicken I
|
|
|
am. Having multiple files with a poor consistence or a directed goal always bit
|
|
|
@@ -56,11 +56,21 @@ Not having emacs be stuck when doing heavier stuff seems great. Let's use that.
|
|
|
#+begin_src emacs-lisp
|
|
|
(package! ob-async)
|
|
|
#+end_src
|
|
|
-*** TODO The rest of the owl
|
|
|
+*** Mixed-Pitch
|
|
|
+On some computers I have Iosevka installed and using both Iosevka Extended and
|
|
|
+the regular version is neat.
|
|
|
#+begin_src emacs-lisp
|
|
|
-(package! ascii-art-to-unicode)
|
|
|
(package! mixed-pitch)
|
|
|
#+end_src
|
|
|
+*** Ascii-art-to-Unicode
|
|
|
+I love using [[https://en.wikipedia.org/wiki/Box-drawing_character][box drawing characters]], so using them when possible is cool. Also
|
|
|
+it makes me use emacs as a drawing tool as it helps avoiding looking up charmap
|
|
|
+for the right character all the time.
|
|
|
+
|
|
|
+Note that with evil, digraphs are back.
|
|
|
+#+begin_src emacs-lisp
|
|
|
+(package! ascii-art-to-unicode)
|
|
|
+#+end_src
|
|
|
* TODO Buffer-local variables to make stuff easily tweakable
|
|
|
* Helper functions
|
|
|
I had issues before dealing with specific patterns at configuration time. At
|
|
|
@@ -77,8 +87,11 @@ at launch.
|
|
|
(mapcar (lambda (x) (and (funcall condp x) x)) lst)))
|
|
|
#+end_src
|
|
|
** TODO Detect Dark Mode
|
|
|
-Because why not? I'm planning to use that around launch to toggle between two themes but I worry about the actual boot time impact.
|
|
|
-#+begin_src emacs-lisp
|
|
|
+Because why not? I'm planning to use that around launch to toggle between two
|
|
|
+themes but I worry about the actual boot time impact.
|
|
|
+
|
|
|
+Currently untangled because it doesn't serve any use for now.
|
|
|
+#+begin_src emacs-lisp :tangle no
|
|
|
(defun chicken/uses-dark-mode-p()
|
|
|
(let ((windows-get-mode-command "powershell \"Get-ItemPropertyValue -Path HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize -Name SystemUsesLightTheme\""))
|
|
|
(cond
|
|
|
@@ -134,21 +147,36 @@ when needed.
|
|
|
#+end_src
|
|
|
Now the font proper selection
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
-(let ((base-size 12)
|
|
|
+(let ((base-size 16)
|
|
|
(code-font (chicken/select-first-available-font
|
|
|
- '("PragmataPro Liga" "PragmataPro" "Iosevka" "Iosevka SS08" "Consolas" "Courrier New")))
|
|
|
+ '("PragmataPro Liga"
|
|
|
+ "PragmataPro"
|
|
|
+ "Iosevka"
|
|
|
+ "Iosevka SS08"
|
|
|
+ "InputMonoCompressed"
|
|
|
+ "Consolas"
|
|
|
+ "Courrier New")))
|
|
|
(variable-font (chicken/select-first-available-font
|
|
|
- '("PragmataPro Liga" "PragmataPro" "Iosevka Extended" "Iosevka SS08 Extended" "Segoe UI")))
|
|
|
+ '("PragmataPro Liga"
|
|
|
+ "PragmataPro"
|
|
|
+ "Iosevka Extended"
|
|
|
+ "Iosevka SS08 Extended"
|
|
|
+ "InputSansCompressed"
|
|
|
+ "Segoe UI")))
|
|
|
(unicode-font (chicken/select-first-available-font
|
|
|
'("PragmataPro Liga"
|
|
|
"PragmataPro"
|
|
|
"Segoe Color Emoji"
|
|
|
+ "InputMonoCompressed"
|
|
|
;;"Iosevka SS08 Light"
|
|
|
"Iosevka SS08"
|
|
|
"Iosevka"
|
|
|
"Segoe UI")))
|
|
|
(serif-font (chicken/select-first-available-font
|
|
|
- '("Iosevka Slab" "Courrier New" "Courrier New"))))
|
|
|
+ '("Iosevka Slab"
|
|
|
+ "InputSerifCompressed"
|
|
|
+ "Courrier New"
|
|
|
+ "Courrier New"))))
|
|
|
(setq doom-font
|
|
|
(font-spec :family code-font :size base-size)
|
|
|
doom-variable-pitch-font
|
|
|
@@ -223,8 +251,10 @@ visual noise.
|
|
|
*** TODO Top-modeline
|
|
|
Inspired from [[https://github.com/rougier/elegant-emacs/blob/master/elegance.el#L150][Elegant-Emacs]].
|
|
|
|
|
|
+Currently disabled until I get it done properly. It suffers from messy code and
|
|
|
+bad performance.
|
|
|
|
|
|
-#+begin_src emacs-lisp
|
|
|
+#+begin_src emacs-lisp :tangle no
|
|
|
(after! doom-themes
|
|
|
(custom-set-faces!
|
|
|
`(header-line
|
|
|
@@ -240,14 +270,18 @@ Inspired from [[https://github.com/rougier/elegant-emacs/blob/master/elegance.el
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
-#+begin_src emacs-lisp
|
|
|
+#+begin_src emacs-lisp :tangle no
|
|
|
(define-key mode-line-major-mode-keymap [header-line]
|
|
|
(lookup-key mode-line-major-mode-keymap [mode-line]))
|
|
|
|
|
|
(add-hook 'doom-load-theme-hook 'staging/reload-header-line-theme)
|
|
|
|
|
|
(defun mode-line-render (left right)
|
|
|
- (let* ((available-width (- (/ (window-width (selected-window) t) chicken--header-line-width) (length left) )))
|
|
|
+ (let* ((available-width (-
|
|
|
+ (/
|
|
|
+ (window-width (selected-window) t)
|
|
|
+ chicken--header-line-width)
|
|
|
+ (length left) )))
|
|
|
(format (format "%%s %%%ds" available-width) left right)))
|
|
|
(setq-default header-line-format
|
|
|
'((:eval
|
|
|
@@ -264,10 +298,7 @@ Inspired from [[https://github.com/rougier/elegant-emacs/blob/master/elegance.el
|
|
|
(propertize "%4l:%2c " 'face `(:inherit header-line)))))))
|
|
|
(setq-default mode-line-format nil)
|
|
|
#+end_src
|
|
|
-
|
|
|
-#+RESULTS:
|
|
|
-
|
|
|
-*** TODO Hide modeline for org
|
|
|
+*** TODO Hide line numbers for org
|
|
|
#+begin_src emacs-lisp
|
|
|
(after! org
|
|
|
(add-hook 'org-mode-hook (lambda () (setq-local display-line-numbers nil))))
|
|
|
@@ -378,6 +409,7 @@ kind of resource links.
|
|
|
(all-the-icons-octicon "mark-github"))
|
|
|
((string-match "vimeo\\.com" link)
|
|
|
(all-the-icons-faicon "vimeo"))
|
|
|
+
|
|
|
((string-match "youtube\\.com" link)
|
|
|
(all-the-icons-faicon "youtube"))
|
|
|
((string-match "bitbucket\\.org" link)
|