Closed ieure closed 4 years ago
I believe the command should be xrandr --output eDP1 --rotate left
(you misspelled the 'left'). After rotation the width & height of screen would be automatically swapped so there's really nothing to do on WM's side.
I believe the command should be xrandr --output eDP1 --rotate left (you misspelled the 'left'). After rotation the width & height of screen would be automatically swapped so there's really nothing to do on WM's side.
I just missed the last character when I copied the command.
When I tried before, I had let EXWM come up, added the xrandr stuff to my EXWM config, and eval'd it by hand. This time, it was already there. Does (exwm-randr-enable)
require being evaluated at a particular time in order to work? If so, is there a way to make it more obvious if it's enabled at the wrong time?
exwm-randr-enable
simply registers some hooks, and should be called before exwm-init
which is called when Emacs has just finished starting. In short, call exwm-randr-enable
as early as possible.
I'm still struggling to get this to work and would appreciate any feeback or pointers you may have. Ideally, I'd like my laptop's display in normal orientation, and an external display rotated to portrait. However, even taking the second monitor out of the mix and trying to rotate my built-in panel, I can't get it to work.
I'm rotating with:
xrandr --output eDP-1 --rotate right
Which I run inside a shell inside Emacs.
It seems like Emacs is getting resized correctly when I rotate the output -- both (frame-geometry)
and xwininfo
report that the X/Y dimensions have traded places. Both xwininfo
and (frame-geometry)
also report that Emacs' position is 0, 0. Despite this, Emacs' position appears to extend off the top of the display, and not to fill the bottom.
After rotating the display, this is what I see. This was captured with xwd -out whole-screen.xwd -root
and converted to PNG.
But, if I capture the Emacs window only (with xwd -out emacs.xwd -id 0x1000027
-- the ID coming from xwininfo
), you can see that it has the right size and looks fine:
So it seems to be a positioning issue, rather than a resizing one.
xrandr --output eDP-1 --rotate right
I just tried this and didn't notice the problem. From what you reported it's probably due to misplaced workspace container. Please check the value of exwm-workspace--workareas
(list of [X Y WIDTH HEIGHT]
) and exwm-workspace--struts
.
Okay, I messed with this a bit more, and it's not an EXWM bug. The issue is that I'm running Compton to fix screen tearing with the Intel modesetting driver, and it fails to notice that the screen geometry has changed. Restarting it after the screen's rotated fixes the issue (or nor using it at all).
Is there a recommended external compositor for EXWM?
@ieure I use picom (as Compton hasn't been updated for years now). It's a Compton fork and it works great for me. I run XFCE with EXWM as my Window Manager but I disabled all things related to XFWM (XFCE's official WM), so picom
is my only Composite manager. Hope it works for you too.
In case it wasn't clear from the docs (it wasn't for me) -- this may help others get randr initialized:
(require 'exwm)
(require 'exwm-randr)
(exwm-randr-enable)
(exwm-init)
If I rotate my display with:
EXWM maintains the old dimensions and I can't resize it to take up the full screen. Toggling the frame's full-screen bit does nothing. Evaluating
(exwm-randr-refresh)
produces the following error:This is 0.21, running on Debian Stretch.