5 ms·
Worm: A dynamic, tag-based window manager written in Nim
- encryptluks2 4y agoDoes this support Wayland?
- forgotpwd16 4y agoIt's an X window manager utilizing Nim's x11 wrapper, so no. And making it into a Wayland compositor will essentially be a different project.
- zorr 4y agoScreenshots on the wiki: https://github.com/codic12/worm/wiki/Screenshots https://github.com/codic12/worm/wiki/Screenshots
- entropie 4y agoCan someone outline why its better than x or some key features?
- twic 4y ago> Worm is a tiny, dynamic, tag-based window manager written in the Nim language. It supports both a floating mode and master-stack tiling with gaps and struts. What do dynamic, tag-based, floating mode, master-stack tiling, gaps, and struts mean here?
- opan 4y agodynamic = automatic layout as opposed to manual like in i3 tag-based = instead of separate workspaces, you have tags, which let you do things like have the same window stored in multiple spots, so you can have a firefox + terminal tag and then switch to a firefox + video player tag without really moving the firefox window, like dwm/awesomewm, but again unlike i3 floating mode = you can make a window appear over others and be moved around freely in addition to the default state of tiling windows master-stack = a popular dynamic layout where you have a big main window and other smaller windows beside it, and you can cycle them to change which gets the big space gaps = empty space between windows, mostly for aesthetic purpose (there is a whole i3 fork called i3-gaps just to add this) I am not sure about "struts". Maybe has to do with leaving an empty space somewhere. I know stumpwm allows that, and I can't think of what it's called.
- sidpatil 4y agoI believe struts are reserved margins along the sides of the desktop, similar to gaps.
- burntsushi 4y agoWith respect to "strut," they're part of the EWMH: https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html#idm46400537342880 https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.h...
- memorable 4y ago- I'm assuming `tag-based` means it has multiple window sessions (like `workspace` in i3/Sway) - `floating-mode` means that the window can also be resized to be at the middle of the screen (instead of covering the entire screen) - `gaps` means the space (or gap) between windows I cannot explain the rest, but yeah, that's a lot of jargon.
- Kalq 4y agoNot sure about struts but here's what the rest mean. Dynamic tiling: When a new window is created, the window manager automatically decides where to place the window based on it's rule. This is usually contrasted with manual tiling where the user usually has to decide where a window should go before creating it. In this case, the ruleset Work uses appears to be master-stack based tiling. Which leads to that. Master-Stack Tiling: A layout where once window is considered the master window, taking about about half the screen. And the rest of the windows stack up on top of each other on one side. Floating mode: A lot of tiling window managers also allow you to designate a window as floating like a traditional desktop environment such as Gnome where every windows is floating by default and can be dragged around into any position. This is useful for certain applications, for example I like to have my media player be floating. Also I set up a certain terminal type to be floating so I can quickly popup or dropdown a terminal to run a quick command in it before dismissing the terminal. Gaps: Tiling window managers traditionally take up the entire screen. For example, with only one window it will be fullscreened. With 2 windows, they will be tiled side by side with no space in between, etc. Gaps means that the window manager allows spacing in between these tiled windows (and often between a window and the edge of the screen as well). This can allow bits of your wallpaper to peek through. Some people find this more aesthetic. Tag-based: Some window managers just call their implementation of traditional virtual desktops (workspaces), tags. They make no differentiation. However more accurately, a tag is a label that is put on a window. Most implementations allow a window to have multiple tags put on it. That's the most generic definition of tags. Usually window managers use these tags to allow for interesting virtual desktop workflows. One way this can be useful is if a window has tags 1, 4, and 5. Then if you were to switch to workspace 1, 4 or 5, that window would show up. More advanced implementations would allow you to adjust how that window looks per tag. For example in workspace 1, that window might be fullscreen, but it 4 it's tiled on the left and it 5 it's floating on the bottom half. There are other implementations of the tag concept but it gets complicated fast. Hope that helps. This is just my general understanding of these concepts. I have no idea how Worm defines or implements them.
- lf-non 4y agoLooks nice, though not being based on wayland is a bummer. It also seems like the author originally wrote it in Rust and then switched to Nim. If they are around, would love to understand the motivation.
- lonk 4y agoBorrow checker is a good motivator And rust is hard: https://hirrolot.github.io/posts/rust-is-hard-or-the-misery-of-mainstream-programming.html https://hirrolot.github.io/posts/rust-is-hard-or-the-misery-...
- jojohohanon 4y agoI think posts like these are why I haven’t even looked at rust as an alternative. Here the author has boiled the problem down to its minimal form, and it’s still 10s of lines of code. It is this weird overlap of over-verbosity a-la c++ and extreme succinctness a-la Perl. You have to spell everything out and every bit of punctuation matters.
- zer0-c00l 4y agoI'm not a Rust zealot but even I recognize that this blog post (which is about the difficulty about writing generic library code wrt lifetimes + Rust async) is pretty much a meme now that's thrown around without any sort of context. Can you explain how this blog post relates to the difficulty of using Rust for writing a window manager?
- zdragnar 4y agohttp://way-cooler.org/blog/2019/04/29/rewriting-way-cooler-in-c.html http://way-cooler.org/blog/2019/04/29/rewriting-way-cooler-i... Is a really good write up, though very specific to Wayland.
- yewenjie 4y agoIs there a feature rich Wayland WM? I really miss the customisability of AwesomeWM since I moved to Sway.
- mftb 4y agoNothing quite like AwesomeWM yet, but here's two I'm aware of that have some interesting features: https://github.com/WayfireWM/wayfire/wiki https://github.com/WayfireWM/wayfire/wiki https://github.com/riverwm/river https://github.com/riverwm/river (I'm also on Sway, FWIW)
- woodrowbarlow 4y agoi'm using dwl (a wayland fork of dwm) (awesomewm is based on dwm). https://github.com/djpohly/dwl https://github.com/djpohly/dwl it is _just_ dwm for wayland, though, so it's not what most people would call "feature-rich". it's suckless, so "features" are just "patches passed around the community" and "configuration" is "modify config.h and re-build". it can't really be packaged for re-distribution in any useful way. i use a few other pure-wayland components as well to make it more like a full desktop environment rather than just a window manager. https://git.sr.ht/~raphi/somebar https://git.sr.ht/~raphi/somebar https://hg.sr.ht/~scoopta/wofi https://hg.sr.ht/~scoopta/wofi https://github.com/francma/wob https://github.com/francma/wob
- t0astbread 4y agoSlightly off-topic but by "can't really be packaged for re-distribution in any useful way" did you mean binary packages? Because there are build systems/package managers that let you easily build a package with minor tweaks.
- woodrowbarlow 4y agoyou're right, i did mean as a binary. and yes, for example arch users can install it from the aur with e.g. paru/yay, inserting their own changes to the pkgbuild. it's also in the freebsd ports tree (under x11-wm, even though it's wayland-only).
- planetis 4y agoGood to see more ambitious Nim projects. I find Nim easy to prototype, cycle through a lot of revisions before finding the "ideal" way to express a solution. All an all it's an elegant language, which I hope gains more traction.
- fprotthetarball 4y agoI have been using Nim for everything lately. If I have a problem I would typically write a shell script for, I'll use Nim with nimcr. If the problem expands beyond a single file, I'm in a good spot to create a project and have production-ready solutions. The interoperability with other languages makes it a safe choice if I find I need to integrate into an existing project. I'm never coding myself into a corner. I've never used a language as versatile as Nim. It's my secret weapon at work. I want more people to use it, but I do like my advantage...
- goodpoint 4y ago> secret weapon at work You don't have to share your sources with the rest of the company? > I do like my advantage... Is that even allowed by your contract?
- fprotthetarball 4y ago> You don't have to share your sources with the rest of the company? Everything is checked into the company BitBucket. People just don't spend much time looking at personal repositories. Every craftsman has their jigs.
- kseistrup 4y agoOh, another window manager in Nim — how sweet. There also Nimdow: https://github.com/avahe-kellenberger/nimdow https://github.com/avahe-kellenberger/nimdow
- goodpoint 4y agoWow, nimdow is even better!