Browse Source

Add HiDPI detection to config.org

master
Riyyi 4 years ago
parent
commit
64c531330f
  1. 10
      .config/emacs/config.org

10
.config/emacs/config.org

@ -123,6 +123,12 @@ Variables for directories, leader keys, etc.
(defvar dot/shell "/bin/zsh" (defvar dot/shell "/bin/zsh"
"Command interpreter binary path.") "Command interpreter binary path.")
(defvar dot/hidpi
(let (resolution)
(setq resolution (nthcdr 3 (assoc 'geometry (car (display-monitor-attributes-list)))))
(>= (* (car resolution) (car (cdr resolution))) (* 2560 1440)))
"Return t if the primary screen is HiDPI, nil otherwise.")
#+END_SRC #+END_SRC
* Customizations * Customizations
@ -279,7 +285,7 @@ Emacs mode line replacement.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package telephone-line (use-package telephone-line
:custom :custom
(telephone-line-height 20) (telephone-line-height (if dot/hidpi 20 18))
(telephone-line-lhs (telephone-line-lhs
'((evil . (telephone-line-evil-tag-segment)) '((evil . (telephone-line-evil-tag-segment))
(accent . (telephone-line-erc-modified-channels-segment (accent . (telephone-line-erc-modified-channels-segment
@ -315,7 +321,7 @@ Places buffers as tabs in a bar at the top.
:after all-the-icons :after all-the-icons
:demand :demand
:custom :custom
(centaur-tabs-height 26) (centaur-tabs-height (if dot/hidpi 26 18))
(centaur-tabs-modified-marker "•") (centaur-tabs-modified-marker "•")
(centaur-tabs-set-icons t) (centaur-tabs-set-icons t)
(centaur-tabs-set-modified-marker t) (centaur-tabs-set-modified-marker t)

Loading…
Cancel
Save