0

Below is my basic randr setup for exwm on my laptop and it places the laptop screen to the left, so I usually drag floating panes there to view them.

However when I unplug the external monitor screen the output does not switch to the laptop screen, so I have to log out of EXWM and restart the session for the output to appear on the laptop screen.

Is there a function I can use to check the state of the plugged in screens when the exwm-randr-screen-change-hook occurs ?

I think I should be able to use the info to set the outputs using setq exwm-randr-workspace-output-plist?

 (require 'exwm-randr) (setq exwm-randr-workspace-output-plist '(0 "HDMI-1" 1 "HDMI-1" 2 "HDMI-1" 3 "HDMI-1" 4 "HDMI-1" 5 "HDMI-1" 6 "HDMI-1" 7 "HDMI-1" 8 "HDMI-1" 9 "HDMI-1" )) (add-hook 'exwm-randr-screen-change-hook (lambda () (start-process-shell-command "xrandr" nil "xrandr --output eDP-1 --right-of HDMI1-1 --auto"))) 

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.