I really like exwm but I currently prefer using StumpWM: https://stumpwm.github.io/. If there was no StumpWM I'd use Exwm.
Both have really similar designs, but for me StumpWM has a decisive advantage: it's implemented in Common Lisp and doesn't run inside of Emacs. Still, it has pretty good Emacs integration and many commands are Emacs-inspired. For example, there's a winner-mode equivalent.
Since Emacs is not multi-threaded, if something inside Emacs freezes your whole X session will become in blocked case you run Exwm. For the same reason, it is a bit more responsive.
After a decade using XMonad, I switched to StumpWM after carefully test-driving exwm and other options. I found I really prefer manual window tiling. StumpWM is really underappreciated. It's the successor of ratpoison, which kind of started the whole tiling window manager saga in Linux.
I agree with you about preferring manual tiling, the worst thing about manual tiling managers is that there are so few choices. EXWM is my favorite with StumpWM a close second and i3 a distant 3rd.
I've been using EXWM for a few years now and the fact that emacs isn't multi-threaded has caused me very little pain. It really isn't something to worry about. I've had way more issues with StumpWM than I have ever had with EXWM.
I find it slightly amusing that you list Common Lisp as a plus for StumpWM. At the time the gigamonkeys lisp book was published I was using StumpWM and had some issues I wanted to fix (which still existed when I finally switched to EXWM). Trying to learn Common Lisp exposed me to a community that is, to this day, the absolutely most toxic I have ever experienced. For a decade lisp was anathema to me until I discovered Clojure and from there realized that the Scheme and other non Common Lisp communities are great.
Speaking of tiling WMs in general - is there any tiling WM that can be controlled entirely by mouse? I find that I have to do any sort of window management rarely enough that shortcuts aren't worth learning, but I do like tiled windows, so if there's something where you can e.g. lay things out by dragging them around and having them snap etc would be much preferable.
There was such a window manager, and it was absolutely brilliant. Powerful manual tiling with application tabs, full, comfortable mouse support, scripting using Lua. It was totally ahead of it's time. I never found anything as flexible and ergonomic as it. It was also one of the predecessors of i3.
Unfortunately the developer stopped supporting it. Because of that I stopped using Linux. There is a fork which was maintained at least for some time, but I don't know how feasible to use with modern X/Wayland apps it is right now.
I'm pretty sure that KDE at least (no idea about gnome) has the same kind of tiling feature that recent Windows version have where dragging a window to the left/right/corners tiles it.
Before I discovered tiling window managers I used to use evilwm and later fvwm customized to work the same as evilwm. Both of those window managers had options to make windows snap to the screen edge or each others borders if moved within so many pixels of each other. Maybe something like that would work for you?
Tiling in Windows isn't full featured - you can tile windows by dragging, yes, but as soon as you resize them, you get disconnects. I want something where I can e.g. snap two windows side by side, and then drag the divider between them, such that it resizes both windows.
It's been years and years, but for a while I was using various Gnome Shell extensions that gave me tiling window management. I gave up only because I wanted to get out of the Gnome DE (all the associated CPU and memory hogging services that I don't want). I actually have fond memories of Gnome Shell and Mutter -- all of the functionality is exposed through the JS extension infrastructure, so it's virtually trivial to implement any kind of window manager that you want. (well... it helps that I enjoy programming in JS...) I just wish that it was decoupled from Gnome.
I believe at the time I gave up I was trying to get weather information into StumpWM by querying the NWS SOAP api over https. I vaguely remember that there was no http library that supported SSL? I was told to just use the SBCL FFI to wrap libcurl, that SSL was useless anyway and I was an idiot for even wanting to use it.
Maybe the community is better now, but I see comments on Clojure articles from Common Lispers sometimes and I have my doubts.
I'm just reporting my personal experience. That wasn't the first or only poor interaction I had asking for help trying to learn.
You also are not helping make the case that the Common Lisp community is fine. Your response completely ignores the actual issue which makes it feel like a passive aggressive attack.
I don't know, that probably wasn't your intent. But I already stated that I had extremely poor experiences with the community so I'm not exactly primed to give the benefit of the doubt.
I've been using Ratpoison and StumpWM for almost 15 years. They really hit the sweet spot for me. I don't even need to configure them, beyond changing the font and maybe adding one or two extra key bindings.
I only rarely use the splitting function; mostly, I work with one window per monitor. I've worked for years on a laptop like this. Now I have two external displays and my laptop display. The main one in front of me usually shows Emacs; a vertical one on the side shows a terminal or two.
One thing that doesn't quite line up well between stumpwm and emacs is emacs buffers and stumpwm groups. I'd like to have a single emacs running with some buffers associated with one group and others with another. However it jumps from group to group when I change buffers.
> if something inside Emacs freezes your whole X session will become in blocked case you run Exwm
I just played around with exwm a bit, and that seems like it would be a major issue for me. I love the idea of exwm, though.
BTW, I had to run exwm under emacs26 (the first blocker for emacs25 in my case was the function string-version-lessp). The wiki[0] says that it'll work with emacs24 and greater.
I also had to install it with package-check-signatures set to nil, because my emacs couldn't verify the signature on elpa package exwm-0.22. It's possible that's a spacemacs configuration issue, or something to do with switching from emacs25 to 26.
I mentioned in another post that I've found that in practice emacs blocking isn't an issue for me. What I didn't say is that I did need to do some configuration to make that happen.
Mostly I just installed the async package and enabled all its features. I could have also sworn that I spent a lot of time configuring gnus so it wouldn't freeze my X session. Looking at my init.el though I don't see anything other than the standard gnus configuration. Maybe my tweaks got rolled into gnus as defaults at some point?
Tiling is really in distant second place to cascade for window management IMO. Giving up overlaps and easy mouse window selection that you get from cascade seems a poor return vs forcing visible windows to be entirely visible.
Compared to Emacs Lisp it’s nuanced but compared to most other non-Lisps it’s very clear: you can connect your Emacs to the Lisp runtime and hack on the program while it runs, which is great for an interactive environment like a window manager.
EXWM is great but one place it is in dire need of help is managing fullscreen applications such as videogames. Right now, those windows are unmanaged, meaning they don’t show up in your buffers. If you manage to leave the unmanaged window to check something else, it is impossible to return and you need to force kill the application in question.
It is a big big problem and one that has almost driven me to leave EXWM more than once. The developer has stated this is intended behavior which is insane to me.
I just started using exwm and was wondering about the cause of this, thanks for sharing. There should really be a way to open unmanaged windows into their own individual workspaces.
The way to get around this, until (or if) this is ever fixed, is to first switch to a different numbered workspace than your primary then open the fullscreen app there. If you need to look something up without quitting the app you can then just use whatever keyboard shortcut you’ve assigned to your primary to switch.
Is it possible for emacs-exwm to run within another window manager, so that I use i3 as my main WM, but can also open X windows inside emacs?
Love emacs, but I hang/tweak/break it enough that I would be scared to use it as my main WM. But it would be awesome to open R graphics inside it, a la Rstudio.
How much configuration/yak shaving is required to get this or StumpWM running? I would love to set this up but am always afraid it will suck 3 days of my time
As someone who's used EXWM exclusively for over a year: Getting it up and running is very quick, finding the workflow you want can take a while - it depends on how familiar you already are with Emacs.
For example you might initially keep using tools like dmenu to launch applications, and over time move to using things like ivy/counsel for that instead. My window management (inside of emacs) habits also changed a lot.
My sentiment will be considered very ‘n00b’ by StumpWM and EXWM connoisseurs, but give i3 a go and see if you like the general idea. It’s generally considered the most foolproof tiling WM. You’ll also need a menu bar and a lock screen which are likely separate i3-* packages. I think I was up and running over the course of a leisurely Sunday afternoon, including changing a few keybindings, and getting everything documented and reproducible in my dot files.
Lastly, you can go the Quicklisp route (which is a Common Lisp package manager, equivalent to pip or gem). That works fine too and is distribution independent.
It's not like you really have do anything but download with your package manager and add it to your .xinitrc or xsession files if you just want a vanilla experience.
With EXWM, X windows are Emacs buffers and rendered inside of Emacs windows, so you switch between X windows the same way you switch between Emacs buffers; you use the same tiling system for both Emacs and other programs, so you don't need an extra set of key bindings, etc. It's a very nice unification.
It can, and a significant part of the community uses that setup including me. You might be interested in checking
1. Spacemacs - http://spacemacs.org/: A config for emacs with starter packs. They have a good collection of leader key and vim bindings.
2. evil mode and evil-leader - Well integrated standalone vim emulation and leader key.
I personally started building into vim keybindings in emacs via spacemacs, and then over time created my own config with the features I needed from spacemacs (which is much more than just vim emulation).
Thanks! I hopped ship from vim to emacs recently precisely because my vim setup was getting super bloated from adding hacky extensions to try to make it like an IDE. Trying to set up an ide per language in vim is an exercise in frustration.
I guess I made a good choice since emacs is able to integrate an x manager (lol).
The issue for me is my tmux leader is Ctrl-f and my vim Ctrl-p uses ctrl-p.. ctrl-d and ctrl-u are used in vim for page up and down. And some other nice Ctrlkeys are taken by vim as well. I will need to carry these key bindings into emacs evil mode...
So Really running out of good leader keys I can use !
I started on evil-mode only. Heard about space macs but I wasn’t sure how well it could work with emacs ide-packages such as SLIME for lisp (and I will want to find emacs ides for Java, Js, Python, C, Cpp, ruby, Ocaml - any suggestions here much appreciated as well)
Recommendation to a former Vimmer who wants to try Emacs to avoid Spacemacs IMO is irrational. Spacemacs and Doom-emacs are the best things to try. Spacemacs is well documented, community supported and extremely popular among former Vimmers. Trying to learn and configure Emacs from scratch usually does the opposite effect - an overwhelmed person gives up and runs back to the comfort of the familiar tool.
Emacs is my favorite software (I do "basically" everything in emacs, except I also use firefox) but how is exwm a ood idea? Emacs is single threaded... How did they solve this problem?
Not sure what you mean? I don't use exwm but my emacs gets stuck e.g. when tramp-mode is connecting to ssh. This is not a problem for tasks I use emacs for, but if my entire OS gets stuck because I'm trying to connect a server, I'd get annoyed.
What's the value of the dynamic workspace support being built in to EXWM, rather than using one of the many packages which does something similar (e.g. persp-mode.el)?
I'm using Spacemacs and Layouts (they based on persp-mode). Either way - multi-monitor setup is a pain, but that's IMO more like X11 problem. I rarely use multiple monitors with my Linux machine though.
I can share my anecdotal experience. I've used IntelliJ for about 7 years. For a long time I hesitated to switch to Emacs because IntelliJ has superb git integration. I thought Emacs simply cannot deliver same kind of experience. Oh boy - how wrong I was. Not only Magit turned out to be way more capable, but I also learned so much more about Git internals. I had no idea about so many things you can do with it. Most Git UIs are shallow and don't let you do extremely advanced stuff, like they're afraid users will be overwhelmed and perplexed. Magit doesn't lie to you, doesn't try to hide things.
I simply can't imagine my life without Magit, Org-mode and (EXWM on Linux).
Let me try to explain what so awesome about this project and why I have chosen it instead of other, more popular WMs. The function of a window manager like managing windows to me is kind of secondary - more important is to have a complete keyboard-driven workflow.
What this exactly means to me is the ability to manage as much possible with keeping fingers on the "home row", ideally without having to touch mouse or arrow keys at all. Is that achievable? Without having to introduce plethora of different keybindings?
Yes, that's possible with modality. So for example: I want to be able to control my music volume by pressing `j` and `k`. And move windows up and down also by using `j` and `k`. And resize windows vertically, again, by `j` and `k`. And move windows across multiple monitors, and resize font in my browser, scroll up and down in my pdf viewer, etc. etc. Sounds crazy? Well, maybe. But I promise you, once you get used to it - you wouldn't want to go back to your ordinary, boring and complicated old way.
My main work machine is a Mac and fortunately for OSX there's an automation tool called Hammerspoon. One day I wrote a nice config inspired by Spacemacs, so for the lack of better ideas I called it Spacehammer. You can find it here: https://github.com/agzam/spacehammer.
To my surprise sadly there's nothing similar to Hammerspoon exists for Linux. Initially I simply wanted something trivial: "how do I rebind `Ctrl+Tab`/`Shift+Ctrl+Tab` to `Win+J`/`Win+K` so I can switch between tabs in my browser more efficiently?". See? `j` and `k` again. Even something simple like that turned out to be difficult to achieve. And AFAIK none of the popular WMs let you do that sort of stuff. With the exception of StumpWM (formerly known as RatPoison).
I wanted to try StumpWM but honestly I didn't give a heartfelt attempt to actually use it. I am still skeptical and the main reason is - CommonLisp. It is an amazing language but its popularity has declined drastically and at this point it's pretty much "Latin" of PLs. Yes, it's cool to know it but practicality of that knowledge might be a bit questionable. Learning whole new language for the sake of configuring a window manager doesn't feel very enticing to me. But at some point maybe I will give it a try.
Then I found EXWM. And almost immediately regretted not trying it out sooner. It took a few days to configure it and next thing I know I wrote a plugin for it: https://github.com/agzam/exwm-edit. Yes, the project is still young and from time to time you stumble upon some rare quirks. Multimonitor setup is a pain. It doesn't support "gaps" so praised in other WMs - I personally don't care about aesthetics of my WM though.
With EXWM everything simply becomes just a buffer in Emacs - your browser, Slack, pdf-viewer, music player - you name it. Because everything goes through Emacs you can create complex keybindings and "simulate" keypresses, for example: you can make `Win+W` to act like `Ctrl+W` in your browser or any other app (no context switching between Mac and Linux).
It is indeed an awesome project and if you are an avid Emacsen and seasoned Linux user - I really encourage you to give it a try.
Both have really similar designs, but for me StumpWM has a decisive advantage: it's implemented in Common Lisp and doesn't run inside of Emacs. Still, it has pretty good Emacs integration and many commands are Emacs-inspired. For example, there's a winner-mode equivalent.
Since Emacs is not multi-threaded, if something inside Emacs freezes your whole X session will become in blocked case you run Exwm. For the same reason, it is a bit more responsive.
After a decade using XMonad, I switched to StumpWM after carefully test-driving exwm and other options. I found I really prefer manual window tiling. StumpWM is really underappreciated. It's the successor of ratpoison, which kind of started the whole tiling window manager saga in Linux.