about summary refs log tree commit diff
path: root/tools/emacs/config
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-17T17·41+0000
committerVincent Ambo <mail@tazj.in>2019-12-17T17·48+0000
commita40c2474fef27fd0e482f10e95a9ad02dabcb97c (patch)
treebb9ae36cd8134535d6b4ef442ff4892ef20bdc11 /tools/emacs/config
parentbe28071e56fb3aab5336eccb71e4627a9005bfce (diff)
feat(emacs.d): Set screen-specific default text scales r/179
Diffstat (limited to 'tools/emacs/config')
-rw-r--r--tools/emacs/config/desktop.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/emacs/config/desktop.el b/tools/emacs/config/desktop.el
index a19b3f6745f4..84bc60d37712 100644
--- a/tools/emacs/config/desktop.el
+++ b/tools/emacs/config/desktop.el
@@ -46,7 +46,7 @@
               ,(-map (lambda (n) (list n secondary)) (number-sequence 8 9)))))
 
 (defun randr-layout-dp1-extend ()
-  "Layout for connecting my X1 Carbon to my screen at home"
+  "Layout for connecting my X1 Carbon to my screen at home."
 
   (interactive)
   (setq exwm-randr-workspace-monitor-plist (generate-randr-config "DP1-1" "eDP1"))
@@ -59,7 +59,8 @@
   (interactive)
   (setq exwm-randr-workspace-monitor-plist (generate-randr-config "HDMI1" "eDP1"))
   (exwm-randr-refresh)
-  (shell-command "xrandr --output HDMI1 --dpi 144 --auto --right-of eDP1 --primary"))
+  (shell-command "xrandr --output HDMI1 --dpi 144 --auto --right-of eDP1 --primary")
+  (set-default-text-scale nil 165))
 
 (defun randr-layout-single ()
   "Laptop screen only!"
@@ -67,7 +68,8 @@
   (interactive)
   (shell-command "xrandr --output HDMI1 --off")
   (shell-command "xrandr --output DP1-1 --off")
-  (exwm-randr-refresh))
+  (exwm-randr-refresh)
+  (restore-default-text-scale))
 
 (defun set-xkb-layout (layout)
   "Set the current X keyboard layout."