Debug failed Emacs initialization
My newly minted macro for defining monitors introduced two bugs: 1. Laptop defined its position in terms of 4k-horizontal and 4k-horizontal defined its position in terms of laptop, I introduced a circular dependency. 2. The identifier, `laptop-monitor`, which `window-manager.el` depends on, is now defined as `laptop`. A friendly reminder to myself to always test new Emacs builds to make sure that everything can initialize properly. This is something that my CI should be automating, but ever since I moved flats, I lost my CI and need to restore it. This is another reminder to drop into a TTY when Emacs fails to initialize, run `nix-env --rollback`, then attempt to restart X. But this time, debugging this entirely from a TTY wasn't so disappointing.
This commit is contained in:
parent
e41ca803c6
commit
fc0c795c4e
2 changed files with 9 additions and 4 deletions
|
@ -54,10 +54,14 @@ See the man-page for xrandr for more details."
|
||||||
(prelude-start-process
|
(prelude-start-process
|
||||||
:name ,(format "display-enable-%s" name)
|
:name ,(format "display-enable-%s" name)
|
||||||
:command ,(format
|
:command ,(format
|
||||||
"xrandr --output %s --%s --%s %s --auto --size %dx%d --rate %0.2f --dpi %d --rotate %s"
|
"xrandr --output %s --%s %s --auto --size %dx%d --rate %0.2f --dpi %d --rotate %s"
|
||||||
output
|
output
|
||||||
(if primary "primary" "noprimary")
|
(if primary "primary" "noprimary")
|
||||||
(car position) (eval (cadr position))
|
(if position
|
||||||
|
(format "--%s %s"
|
||||||
|
(car position)
|
||||||
|
(eval (cadr position)))
|
||||||
|
"")
|
||||||
(car size) (cadr size)
|
(car size) (cadr size)
|
||||||
rate
|
rate
|
||||||
dpi
|
dpi
|
||||||
|
@ -71,10 +75,11 @@ See the man-page for xrandr for more details."
|
||||||
"xrandr --output %s --off"
|
"xrandr --output %s --off"
|
||||||
output)))))
|
output)))))
|
||||||
|
|
||||||
|
;; I'm omitting the position argument to avoid a circular dependency between
|
||||||
|
;; laptop and 4k-horizontal.
|
||||||
(display-register laptop
|
(display-register laptop
|
||||||
:output "eDP1"
|
:output "eDP1"
|
||||||
:primary nil
|
:primary nil
|
||||||
:position (below display-4k-horizontal)
|
|
||||||
:size (3840 2160)
|
:size (3840 2160)
|
||||||
:rate 30.0
|
:rate 30.0
|
||||||
:dpi 144
|
:dpi 144
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
(exwm-randr-enable)
|
(exwm-randr-enable)
|
||||||
(setq exwm-randr-workspace-monitor-plist
|
(setq exwm-randr-workspace-monitor-plist
|
||||||
(list 0 display-4k-horizontal
|
(list 0 display-4k-horizontal
|
||||||
1 display-laptop-monitor
|
1 display-laptop
|
||||||
2 display-4k-vertical))
|
2 display-4k-vertical))
|
||||||
|
|
||||||
(evil-set-initial-state 'exwm-mode 'emacs)
|
(evil-set-initial-state 'exwm-mode 'emacs)
|
||||||
|
|
Loading…
Reference in a new issue