17 ms·
XMonad – The Automated Tiling WM
- georgewsinger 5y agoSimulaVR[1] (also written in Haskell) one considered naming itself "3DMonad" in homage to XMonad. [1] https://simulavr.com https://simulavr.com
- Syntonicles 5y agoI came to the comments looking for a project like this! I almost asked the XMonad maintainer above to consider it. I've been waiting so long...
- assbuttbuttass 5y agoI love xmonad and use it on all my desktops. I haven't had one crash in 8-10 years of daily use
- FullyFunctional 5y agoJust 2 0 0 0 lines?!? That's really saying something. I wish it was available on macOS. OT: I've falling back in love with Haskell after reading Ben Lynn's astonishing adventures (https://crypto.stanford.edu/~blynn/compiler/ https://crypto.stanford.edu/~blynn/compiler/) and it's still super awesome for explorative programming.
- BrianB 5y agoI missed xmonad when switching to MacOS but found spectacle to be a decent replacement https://www.spectacleapp.com/ https://www.spectacleapp.com/
- kule 5y agoFYI I’ve used this on the Mac it works pretty well: https://ianyh.com/amethyst/ https://ianyh.com/amethyst/
- hresvelgr 5y agoI believe dwm[1] by suckless is around 2000 lines of C. That used to be my go-to for a WM until I got too used gnome. As much as I loved the simplicity of that style of window manager, I am far past the days where I'd delight in tweaking my Linux installation to my personal tastes. If I could have a git repo with a static config that just built my OS the way I like it with minimal messing around, I would love that. I've heard NixOS is meant to work like that but I haven't found the time to try it. Perhaps someone here can enlighten me? [1] http://dwm.suckless.org/ http://dwm.suckless.org/
- snvzz 5y agoDwm is quite slick. If it had unicode support upstream, it would be an option. But they refuse unicode, and I refuse dwm. i3 is workable, and that's what I am using.
- leephillips 5y agoWhat do you mean by Unicode support in this context? I use dwm and constantly use Unicode, and I don’t see what’s missing, so I’m curious.
- wtallis 5y agoI haven't used dwm. Where does a minimal window manager need unicode support?
- tikhonj 5y agoThat's exactly how I use Nix—I have a repo that can reproducibly build the same NixOS setup across my machines, and I can even share a large chunk of the config with my work Macbook. Once I got over the hump with Nix, I found it easier to manage and improve my Linux configuration than on "traditional" distros I've tried (Fedora, Ubuntu... etc). Unfortunately, the learning curve was pretty brutal, and I don't think I would have made it over without using Nix for development (without NixOS) first on both my projects and at work.
- fiddlerwoaroof 5y ago
- forgotpwd16 5y agoAnd actually XMonad itself is less than that. Running `scc xmonad/src` shows 1800 lines of code (excludes blanks and comments). Including the Hashell binding to X11, developed by XMonad's team, that is ~760 lines of code, means the entire project is above 2000, which is still close. Indeed impressive.
- ozmaverick72 5y agoThe link to Ben Lynn's page looks really interesting - that should probably be a post of HN on its own. Thanks for sharing it.
- ozmaverick72 5y agoI just submitted it as an HN story to give it the attention it deserves
- solomonb 5y agoto be fair, there is a ton of complexity offloaded to `xmonad-contrib`. I don't think very many people use `xmonad` without `xmonad-contrib`.
- neilv 5y agoI've used numerous X window managers, and XMonad is my favorite. (I've tried to switch to i3, by using it for a couple years at work, while still XMonad at home, but XMonad is still more productive for me.) One thing that I set up in `xmonad.hs` is `additionalKeys` that switch to or launch particular programs. For example: ((mod3Mask, xK_f), raiseNextMaybe (spawn "/usr/bin/firefox-esr") (className =? "Firefox-esr")) For programs run in a terminal window, `-name` works well enough for distinguishing them: ((mod3Mask, xK_r), raiseNextMaybe (spawn "urxvt -name mtr -e mtr 123.45.67.89") (className =? "URxvt" >> title =? "mtr")) My layouts are standard, and I mostly work from the large window on the left, and then the windows on the right are only wide enough to fit 80 columns in terminal or Emacs. myLayout = tiled ||| Mirror tiled ||| noBorders Full where tiled = Tall nmaster delta ratio nmaster = 1 ratio = 1/2 delta = 3/100 Occasionally I switch a window to fullscreen or switch to the big window taking the full width. When work needs the full screen or multiple windows at once for long at all, I usually switch to desktops 2 and later, and keep 1 for comms like email and chat. When docking laptop, work ends up on the external monitor in front, and then comms/monitoring is on laptop to the side. I used to have a status bar and system tray, but got rid of them. The only thing I miss is having a clock I can glance at, so I wrote a key sequence that runs a script that uses `osd_cat` to temporarily overly the current time and date, time in other zones I'm dealing with, and battery status.
- somnic 5y agoOne thing I find missing in xmonad vs dwm is the notion of tags. Being able to summon and banish groups of windows at a time was something I found pretty handy.
- lolcat_cowsay 5y agoXMonad has tags: https://hackage.haskell.org/package/xmonad-contrib-0.16/docs/XMonad-Actions-TagWindows.html https://hackage.haskell.org/package/xmonad-contrib-0.16/docs...
- clircle 5y agoI've always found tiling WMs to be quite nice on small screens, but a chore on large screens. I use a 27 inch 4k screen currently and much prefer gnome or xfce. i3/dwm/xmonad was great on my x220 thinkpad.
- qudat 5y ago27inch + 1440p single monitor here — window managers are awesome
- ssivark 5y agoI’d have imagined exactly the opposite — Single window likely maximized on small screens but much fancier tiling on large screens!
- hyperhopper 5y agoAs an xmonad user I'll echo that this fits my workflow. Small screens I'll use 0-1 non-Fullscreen layouts, and large screens I'll use many more.
- vidarh 5y agoSome tiling wms at least can handle floating windows just fine so you can pick and choose. My bspwm setup uses one floating workspace and the rest tiling, so I switch to the floating one for apps or tasks where it feels easier. But I prefer tiling most of the time on a large screen too, mostly because makes manipulating windows with a keyboard faster to have a simple, predictable layout. In practice I usually end up with 2-4 windows per workspace, with a few with 1.
- cycomanic 5y agoI'm on a 32 and 27 in monitor and there is nothing better than having a tiling wm. The available space is so large I really don't want to touch the mouse to put something into the right position. To add to the rest of the discussion. I've tried different tiling wms. Starting with qtile (written in python) to awesome, xmonad i3 and now I'm on sway. I think xmonad has the best way of dealing with multiple screens (tags are essentially independent of screen), which I missed originally when moving away from it. Fortunately there are some python scripts to emulate the same behavior on i3/sway.
- kmod 5y agoFirst, I strongly recommend using a tiling window manager. There aren't many logistical things you can do to improve your programming output but this is one. I used XMonad for many years and finally had to give up and switch to i3, so I would recommend using that The first problem was that they broke my configuration file with every release. I'm not a Haskell expert so fixing it was very time consuming The second is that their gnome integration is quite bad. Also it's different for every combination of XMonad version and Ubuntu version and eventually I hit a combination that I couldn't get to work So it was great when it worked but it didn't always work, and I'm now a happy i3 user
- leephillips 5y agoI agree about the effectiveness of tiling WMs. I use dwm, which I think is nearly perfect software, but I guess not to everyone’s taste.
- Shared404 5y agoCurrently using dwm on OpenBSD, and I gotta say, it's one of my favorite environments I've tried yet.
- colonwqbang 5y agoDwm is extremely pleasant to use.
- sidpatil 5y ago> The first problem was that they broke my configuration file with every release. This is the same reason I gave up on AwesomeWM—sometimes things would break and it would take a long time for me to figure out how to fix them. Nowadays I use i3 as well. Sometimes I do wish the configuration language was more powerful, but I value the stability a lot more.
- Elv13 5y agoJust a little note that we (AwesomeWM team) have stable APIs since 4.0 and each releases no longer break the API. We also have reached 90% code/behavior coverage (from 0% in < 4.0 days). From a maintainer PoV, this is often a pain since AwesomeWM exposes most of its internal guts, but with enough compatibility code and Android style API levels, we still manage compatibility pretty well.
- tbabej 5y agoThis is relatively new, but XMonad is currently running a crowdsourcing campaign to sustain its further development (and maintenance). I hopped in to sponsor recently, and would recommend to do so to all XMonad fans! https://github.com/sponsors/xmonad https://github.com/sponsors/xmonad
- lolcat_cowsay 5y agoI am going to eventually support the devs behind XMonad aswell, it is such an amazing project...
- grafelic 5y agoThanks for sharing! I am also now a sponsor (with 99% of my computer time is spent in XMonad it seems fitting).
- cletus 5y agoI haven't used a tiling WM but I'm intrigued by the idea. I have reservations, specifically that I have really poor eyesight so I honestly don't know how many windows I could usefully put on a screen anyway. But still, piles of windows are a mess. But here's where I always get stuck on such things with Linux in particular: 1. It's usually a whole new set of keybinds I have to learn. I feel the same way about tmux/screen, emacs and vim and the like. For the others I get that there is a point because you can use all of them in vt-environments (eg over ssh connections). Whatever the case, they all represent a cognitive load that I have difficulty motivating myself to summit. You just get a lot of behaviour for free with a traditional mouse UI; 2. An esoteric scripting/configuration language, in this case Haskell for XMonad (it seems?). Often the out-of-the-box defaults will be sparse and/or rough and you'll have a whole bunch of conflicting advice on how you should modify that. This works for many people and I"m genuinely happy for you. Are there any tiling WMs that are a little more... accessible?
- thinkmassive 5y agoOne big advantage of most tiling WMs is being able to navigate without the mouse, so there's always going to be some keybindings to learn. You might like Regolith, which is basically an opinionated i3 setup you can install on top of Ubuntu as a set of packages. It integrates with Gnome and is ready-to-go out of the box, compared to manually installing and configuring i3 and its accessories. It's also available as a LiveUSB and complete install if you prefer that route. https://regolith-linux.org/ https://regolith-linux.org/
- jbaber 5y agoratpoison's config file is just a list of settings like a .gitconfig The bindings are pretty simple like screen/tmux. It's quite bare and simple. An advantage for low vision of tiling WMs like ratpoison is that you can keep all applications full screen and flip between them very fast.
- cletus 5y agoThere was a time when I knew a few screen/tmux bindings but I'm afraid that's been relegated to history. For years now I've used tmux in concern with iterm2 so everything I do is with a mouse/trackpad. But flipping between full screen apps is probably where I need to be so I'll check it out. I appreciate the suggestion.
- jchw 5y agoI wonder what will happen to XMonad as the Wayland future actually seems to be approaching. I suppose nothing yet. But, I was an i3wm user, and now it’s hard to imagine going back to X11. I run SwayWM on NixOS and using Linux any other way feels archaic now. Yes, I do genuinely understand how that seems absolutely ridiculous, but honestly, it does. Other than the occasional stability issue or bug, it really feels like the future is arriving: smooth rendering, predictable latency, hardly an imperfect frame, heterogeneous DPI with no effort, no need to string along GNOME or KDE services to configure input devices or manage displays, yet to experience any problems with sleep/resume, and with NixOS, a simple, centrally managed configuration for my whole OS (including Sway) and any patches, git-versioned. It isn’t perfect, but it is almost as good as promised. I just recently setup a new desktop by grabbing a recent NixOS USB stick, formatting the drives, git cloning my configs, and running the installer, and one reboot later I was in my environment with Sway, all of my applications, my configuration… I’ve tried versioning my dotfiles before, but this seemed to both be more tedious and still not really accomplish what I wanted. My desktops and laptops are single user, so I can just use NixOS to manage system-wide configs instead and get 99% of what I actually wanted. I’ve digressed a bit into stuff very unrelated to WMs, but the software around your WM is important when dealing with tiling WMs. Nobody wants a bespoke pile of complex configurations that could break on an upgrade without warning, and that has never been more important than with minimal WMs.
- exdsq 5y agoWhich laptop do you use for NixOS?
- jchw 5y agoI am currently running NixOS on my desktop primarily, which is just off-the-shelf AMD CPU/GPU parts. X570, 5950X, RX590. I picked AMD (repeatedly) because it offers excellent performance grunt and good open source drivers. I do have a laptop running NixOS, but it is just a Thinkpad T60p from a few years back. It works OK, but I can’t say I strongly recommend this. I was at least able to get Intel’s cool GPU virtualization technology working under NixOS, but the iGPU in that laptop makes me wonder why one would do that.
- POiNTx 5y agoBspwm is great too if you're interested in trying a tiling window manager. Have been using it almost exclusively for the last 2 years without too many problems. [1] https://github.com/baskerville/bspwm https://github.com/baskerville/bspwm
- lsuresh 5y agoXMonad is the one thing I miss dearly from Linux since I had to switch to a Mac. With some effort, yabai [1] on Mac can approximate XMonad well enough (mainly, multiple workspaces, automatic tiling, focus follows mouse, and a few other key bits). [1] https://github.com/koekeishiya/yabai/ https://github.com/koekeishiya/yabai/
- psanford 5y agoI've used XMonad for >10 years. I love it and hate it at the same time. I love XMonad layouts! I hate that I have to write Haskell to configure it. I no longer have the patience to relearn the minimal amount of Haskell necessary to make config changes, so I've frozen my config and not touched it for the last 4 years. But its really hard to switch off it! I've tried i3 and really like that it has a network based API, but not having automatic layouts is really a deal breaker for me. It seems like you should be able to port the XMonad layouts to i3, but in reality their models are different enough that I doubt you could ever make the same layouts in i3 and have it work exactly as it does in XMonad.
- kobalsky 5y ago> but not having automatic layouts is really a deal breaker for me there is layout saving on i3 now and it works pretty well. basically you build a layout on a workspace, dump it to a file, adjust window selectors so that they swallow the correct windows, and then you can apply it a piacere. https://i3wm.org/docs/layout-saving.html https://i3wm.org/docs/layout-saving.html
- hyperhopper 5y agoTo be fair, there is a difference between saving layouts that you have made, and having a library of algorithms to programmatically generate layouts. Personally I prefer the latter.
- lmm 5y agoI wonder if one could make something like XMonad using Dhall for config. It seems like the perfect use case for it.
- forgotpwd16 5y agoi3 has manual tiling by choice and it isn't necessary to port automatic tiling to i3 itself. You can make a service that utilizes i3's IPC that does that. And of course people have done so[1-3]. [1]: https://github.com/olemartinorg/i3-alternating-layout https://github.com/olemartinorg/i3-alternating-layout [2]: https://github.com/chmln/i3-auto-layout https://github.com/chmln/i3-auto-layout [3]: https://github.com/nwg-piotr/autotiling https://github.com/nwg-piotr/autotiling
- yewenjie 5y agoI have recently moved to Sway on Wayland from AwesomeWM. While I like most of it, I miss the level of customization though - is there some really advanced Sway config out there?
- shimonabi 5y agoI tried but couldn't get used to tiling window managers. Even learned a bit of Haskell to write XMonad config files once. I like to be able to have one application on top of another and especially not using the WHOLE partition. Don't create artificial constrictions for yourself. Some applications are designed to work only with a specified width and height. I guess it's fine if you use your computer just for the command line stuff.
- sullyj3 5y agoI don't know about other wms, but in i3, floating a window is just a matter of pressing super+space. Moving it around and resizing is very ergonomic as well, it's just super+left click drag and right click drag respectively. The really nice thing about the resizing is that you don't have to hit a tiny window border target with your mouse, super+right click just snaps to the nearest border of the window you're in. My guess is that most other tiling wms would have a straightforward way to float windows as well.
- autophagian 5y agoWith XMonad it's also pretty straightforward. You can do it for specific applications by using the window class in your config's manageHook (like: className =? "KeePassXC" --> doFloat). In my configuration, I also have it set up that if I hold the mod key and drag a window with the left mouse button, it becomes floating. Mod+drag with the right mouse button resizes it, pretty similar to the i3 setup you mention.
- leephillips 5y agoThey all do. People who leave comments like this have never actually used a tiling WM. Or they claim to have “tried” but never bothered to find out how it works.
- rawoke083600 5y agomod+f full screen ?
- _-david-_ 5y agoDoes anybody have good suggestions for a good WM on Wayland? I know SwayWM is quite popular, but I was wondering if there are any other good ones out there.
- gundamdoubleO 5y agodwl is a dwm port to Wayland. Haven't used it myself but I do use dwm and find it quite enjoyable, although with a bit of a learning curve if you want to get into configuring it or adding functionality yourself.
- frankish 5y agoI do miss being able to use Xmonad, but definitely checkout Amethyst[0] if using MacOS. [0]: https://ianyh.com/amethyst/ https://ianyh.com/amethyst/
- beshrkayali 5y agoIf Sway had the support it deserves and a larger developer base to actually work decently with Nvidia cards, there would be no competition really. Under Wayland, it’s definitely the best WM experience anyone can wish for. I understand the whole issue with nvidia and their asinine drivers, so no need to come down on me. Hopefully things change in the future with Nvidia cards, I absolutely love the experience Sway provides on integrated intel gpus.
- pimeys 5y agoI just got a cheap Radeon for sway and use my 2080ti with qemu and gpu passthrough, playing games on virtualized windows. Good enough for me.
- nullwarp 5y agoYeah this is what I do as well. Really honestly surprised how good it works sometimes.
- beshrkayali 5y agoMind sharing a bit more about which Radeon you got? And how you achieve proper gpu pass through? Do you run Windows on Qemu?
- pimeys 5y agoRX 580 for Sway. A RX 6800 XT would be great, but they still cost a lot. The new ones work really well with linux, is what I hear. But you should follow the latest kernel versions, due to lots of bugs being fixed at the moment by AMD. For passthrough, just have another graphics card and follow the Arch wiki for installation. It works quite well: https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF
- beshrkayali 5y agoThanks! I'll check out the RX 580. They're a bit more pricy now than usual even on the second hand market, I guess due to chip shortage and miners.
- inclemnet 5y agoSince various people are asking about xmonad-like tiling in wayland: I wrote Vivarium[0] specifically to be a wayland compositor that behaves exactly like my (fairly simple) xmonad config, but it's a relatively new/unstable compositor and nothing like xmonad internally. River[1] has a fantastic tiling model via user-provided executables, which makes it very flexible and probably a good fit for many people wanting something xmonad-like. Waymonad[2] exists as a direct xmonad-like compositor, but I think development has been basically stalled for a long time. Sometimes there's discussion about reviving it though (edit: see https://news.ycombinator.com/item?id=28796909 https://news.ycombinator.com/item?id=28796909 for more up to date detail). Japokwm[3] is another compositor with xmonad user roots, but again its own tiling model. [0] https://github.com/inclement/vivarium https://github.com/inclement/vivarium [1] https://github.com/ifreund/river https://github.com/ifreund/river [2] https://github.com/waymonad/waymonad https://github.com/waymonad/waymonad [3] https://github.com/werererer/japokwm https://github.com/werererer/japokwm
- yonrg 5y agoMaybe 12 yrs ago, I developed some scripting in FVWM to simulate tiling. My thinking was, why do I need background and overlapping windows? It worked kind of, then I came very quickly to xmonad, but abandoned it (I do not understand haskell; maybe I should) So then came i3 for some time, but I never became a big fan of the tree layout. Eventually, I found my way with qtile [0], written and configured in python (which I do speak sort of). It is extensible, simple and just works. I use it daily for nearly a decade now. What I like, qtile has modules to manage the window layouts. My favorite is the xmonad-clone which mimcs basic features. But efficient enough for me 0: http://www.qtile.org/ http://www.qtile.org/ Another tilingwm I like to mention is spectrwm [1] which I use as a backup. I cannot say that qtile never had issues. But it is also a long time ago I used my backup. qitle is now in my OS repo, so I don't need to build and install my self anymore. 1: https://github.com/conformal/spectrwm https://github.com/conformal/spectrwm That said, many thanks to xmonad for opening a path and inspiring other projects
- hyperstar 5y agoI switched to StumpWM, but I miss layouts.
- Symmetry 5y agoI've been using XMonad for over 10 years now. Originally I went with Awesome but then decided I liked still having a normal desktop environment and XMonad's integration with Gnome was really easy. The way I've done this has changed a bit over the years, these days I drop a file in .config/autostart letting xmonad replace the normal window manager after Gnome gets itself sorted out. https://github.com/aclough/dotfiles https://github.com/aclough/dotfiles
- upofadown 5y ago>per-screen workspaces My killer feature. It makes having multiple monitors so much more productive. I don't want one larger screen with a big dead spot in the middle. If I want a large/wide screen I will just go out and buy one. I want more places to put stuff.
- tomcooks 5y agoIs there a website comparing XMonad to suckless dwm? Judging from the site the incentives seem equal or similar.
- alwaysjoe 5y agoHow can there not be any screenshots?
- scbrg 5y agoThat's a very good question, since the page shows five screenshots and one photo of a multi monitor setup for me. In addition, there's a link to https://wiki.haskell.org/Xmonad/Screenshots https://wiki.haskell.org/Xmonad/Screenshots
- Liskni_si 5y agoI think the screenshots disappear (instead of just going into a single column mode) on very small screens, so people looking at xmonad.org from a mobile phone may not see them. Hm, we might want to fix that, perhaps.
- temptemptemp111 5y agoThe reality of Wayland's benefit doesn't match the push for it on HN. If you want to improve security, then do what OBSD did to Xorg in Linux.
- lolcat_cowsay 5y agoAdvice to anyone who wants to start using XMonad, READ the docs..
- flippinburgers 5y agoI guess I will have to avoid wayland if xmonad never makes the move.