reddit / emacs
Is good idea change to EXWM?
juanchow03 · 2022-04-18 13:10
I use arch linux with a WM (Window Manager) called xmonad (configured in haskell) and I found EXWM, which is using Emacs like your WM, I would like to ask if anyone here has used it and if it is a good idea to switch!
Endomorphism002 · 2022-04-18 13:34
I'll chip in my opinion: I really like EXWM. I used to use xmonad on Arch, but got curious about EXWM.
I like using my buffer management functions to manage X windows as well, keeps everything organized. I hated dealing with multiple frames of emacs, and now I don't really have to!
Plus you can do most (if not all) window manager things in emacs, I even wrote a dynamic window layout function to recreate the XMonad Tall layout and the BSPWM layout. (See split-window-preferred-function).
I think it's worth giving a try. Also note that since you're on Arch, don't launch with dbus-launch, it blocks dbus. There's an open issue about it.
vifon · 2022-04-18 13:42
Switch? Possibly. Maybe yes, maybe no.
Use it alongside with your regular WM when you need a distraction-free environment? I'd say yes. I use both XMonad and EXWM depending on my mood.
juanchow03 · 2022-04-18 13:45
That's great! seems like a good option to swtich, and how good is the performance of the WM?
juanchow03 · 2022-04-18 13:46
I see. Maybe, I try it and if I like to, switch completely, the main reason is that I currently use Emacs for almost everything :)
Endomorphism002 · 2022-04-18 13:51
Emacs has crashed before when I do something too intensive (usually running many web apps at once). This is fine, it just results in a log out of the session.
This happens rarely, probably once a month and I could likely fix it but it's not enough of a nuisance to do.
It's responsive, although you do have to be mindful of calling processes asynchronously.
I may not be the best person to answer, as I don't run any intensive programs or emacs packages (no language servers or anything, and some light web browsing). I also have rather poor hardware (2015 laptop that's been through a lot). I just edit org and latex files without much software assistance.
vifon · 2022-04-18 14:07
On a single display setup EXWM is quite competitive. If you have a multi display setup, XMonad is still the best option in my opinion.
As for using Emacs for almost everything, use whatever works best. If Emacs is the best option for something, or a close second, it's definitely worth a consideration. But if there are other clearly superior solutions, it's not worth it to force the task into Emacs (e.g. EWW vs Firefox). The same rule applies to window management. I'm pointing it out because it's a common fallacy I see with people trying to force every single thing into Emacs. Been there, done that.
juanchow03 · 2022-04-18 14:19
Make sense to me! Thank you for the comment. And my use on the computer is things like you, just programming and read news :) (so i think is worth)
juanchow03 · 2022-04-18 14:24
Sure you are right!, and thanks for the comment, and I know for many people want to use everything in Emacs, even if it is a bad option, but I think having EXWM together with xmonad is good option, if it doesn't work just switch session.
ieure · 2022-04-18 15:51
I use it and like it a lot, but it's definitely not for everyone and takes a bit of hacking to get set up properly.
With Emacs as your WM, you gain the programmability of Emacs for your whole computing environment, and you end up with something that resembles a Lisp Machine a bit. I've never used anything quite like it; it's badass that you can think "this fundamental way the mouse is used Is Wrong" and [bang out some code](https://github.com/ieure/exwm-mff/) and now it works how you want.
It's good.
BettaGeorge · 2022-04-18 16:54
Out of curiosity, do you have the same keybindings configured in both? If yes, do you have some sort of script that converts .el files to valid haskell? Because after all the work I have sunk into exwm, it sounds like a nightmare to me to regularly switch between my current and my previous (i3) setup.
vifon · 2022-04-18 17:02
No, as both use different paradigms. Key sharing between EXWM and i3wm would be more viable as they both use manual tiling.
In general I try to use the regular Emacs keys with as little EXWM-specific additions as possible. After all that's the whole point of EXWM: to treat the X11 windows as Emacs windows.
As for my keys not related to window management, in both cases they are handled by xbindkeys and not my window manager.
anerisgreat · 2022-04-18 18:46
Try it! Make sure you can change back if something goes wrong (and it will for sure, but you can fix it)
I used i3. Switched to EXWM a year and a half ago ish. Never looked back. If emacs is your life, this is very useful.
Highly suggest getting some configs from other people who use EXWM just so you have a reference in case you want to do something weird.
Good luck!!
ALLCAPSNOBRAKES · 2022-04-19 04:12
i use it every day and would definitely recommend it, with the caveat that you should use something else for gaming. there are exceptions, but most games don't play well with EXWM
KefirOnPremise · 2022-04-19 06:33
That’s probably the worst idea in your life. The thing is, after trying exwm, if you would like it, you will not be able to change your wm anymore. Exwm offers different experience. And it will probably damage your mind.
kamui78 · 2022-04-19 13:58
I have tried using EXWM for a while but in the end I went back to i3.
Would you mind sharing what is the rationale behind your workflow?
I use the floating layer in i3 for some applications, like the gnome-calculator for example. Doing the same in EXWM was not as comfortable.
i3 provides the bar out of the box which can be used to switch between workspaces by scrolling. I have managed to do the same in EXWM eventually but unfortunately it was clunkier.
Splitting and between multiple monitors was much easier and immediate in i3 and I did not manage to find a satisfactory way to do the same thing in EXWM.
Another issue I had was with latex previews. I have org notes with a lot of math notation. Every once in a while I regenerate those
previews to clean up my latex fragments directory. In EXWM this would block my session until the task is over.
Did you also have these kind of issues?
How did you solve them?
vifon · 2022-04-19 16:06
> I use the floating layer in i3 for some applications, like the gnome-calculator for example. Doing the same in EXWM was not as comfortable.
Hard to say without more details. In this specific case my solution would be to use `M-x calc` / `C-x * c`.
> i3 provides the bar out of the box which can be used to switch between workspaces by scrolling. I have managed to do the same in EXWM eventually but unfortunately it was clunkier.
I never switch my workspaces with mouse, XMonad doesn't even support it without using some hacks. I use `Mod4+{1..9}` to access a specific workspace and `Mod4+z` / `Mod4+x` to access the previous/next one.
> Splitting and between multiple monitors was much easier and immediate in i3 and I did not manage to find a satisfactory way to do the same thing in EXWM.
I don't think there is any other way than to map specific workspaces to specific monitors [like this](https://github.com/vifon/emacs-config/blob/c7febd350ccc7e014e8e4670be0a6c5977a98443/emacs.d/lisp/70-exwm.el#L56-L66=). Does the job, but definitely could be better.
> Another issue I had was with latex previews. I have org notes with a lot of math notation. Every once in a while I regenerate those previews to clean up my latex fragments directory. In EXWM this would block my session until the task is over.
Ah yes, a deadlock between the blocking process started by Emacs and this process waiting for the window manager (Emacs) to do something about its window. The same reason I needed to add `(setq epa-pinentry-mode 'loopback)` because otherwise GPG was waiting for Emacs and Emacs was waiting for GPG. Not much more I can say here but "avoid such situations".
PanamanCreel · 2022-04-25 14:47
[Exwm screenshot](https://drive.google.com/file/d/17sDmvQLTaqhst8eqtg-CHG9qIdW7SVC6/view?usp=drivesdk)
I say do it! I've tried a bunch of window managers (KDE, Fwm, Fwm94, Ice, GNOME, Openbox, I3, Awesome m, DWM, Ratpoison.). I thought I was going to stick with Stumpwm. Then I tried Exwm (4 times), the first three times I set it up wrong so it didn't work right. Fourth time I looked at System Crafter's videos about Exwm and set it up right. I love it! I had to use Stumpwm for when I messed up the Configuration and was happy to be back in Exwm.
Yes, it's not multi-threaded, hopefully that will change, but other than that, I love it! (Check the top of my message for a current screenshot of my box!)
SaggingLeftNut · 2022-06-01 04:16
I've found that exwm is great for most things but also limited. Id say try it for a few months and see how you like it. You may never encounter my edge case issues. I prefer to use it but for certain activities I fall back on I3.