[HN Gopher] Worm: A dynamic, tag-based window manager written in...
___________________________________________________________________
Worm: A dynamic, tag-based window manager written in Nim
Author : memorable
Score : 128 points
Date : 2022-06-11 07:01 UTC (15 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| lf-non wrote:
| Looks 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 wrote:
| Borrow checker is a good motivator
|
| And rust is hard: https://hirrolot.github.io/posts/rust-is-
| hard-or-the-misery-...
| zer0-c00l wrote:
| I'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 wrote:
| http://way-cooler.org/blog/2019/04/29/rewriting-way-
| cooler-i...
|
| Is a really good write up, though very specific to Wayland.
| zorr wrote:
| Screenshots on the wiki:
| https://github.com/codic12/worm/wiki/Screenshots
| planetis wrote:
| Good 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 wrote:
| I 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 wrote:
| > 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?
| yewenjie wrote:
| Is there a feature rich Wayland WM? I really miss the
| customisability of AwesomeWM since I moved to Sway.
| woodrowbarlow wrote:
| i'm using dwl (a wayland fork of dwm) (awesomewm is based on
| dwm).
|
| 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://hg.sr.ht/~scoopta/wofi
| https://github.com/francma/wob
| t0astbread wrote:
| Slightly 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.
| mftb wrote:
| Nothing 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/riverwm/river
|
| (I'm also on Sway, FWIW)
| bool3max wrote:
| I have never used Awesome but have been on Sway for the past ~3
| years. What features are you missing?
| entropie wrote:
| Can someone outline why its better than x or some key features?
| twic wrote:
| > 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?
| memorable wrote:
| - 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.
| opan wrote:
| dynamic = 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 wrote:
| I believe struts are reserved margins along the sides of the
| desktop, similar to gaps.
| burntsushi wrote:
| With respect to "strut," they're part of the EWMH:
| https://specifications.freedesktop.org/wm-spec/wm-
| spec-1.3.h...
| Kalq wrote:
| Not 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.
| kseistrup wrote:
| Oh, another window manager in Nim -- how sweet.
|
| There also Nimdow: https://github.com/avahe-kellenberger/nimdow
| goodpoint wrote:
| Wow, nimdow is even better!
| encryptluks2 wrote:
| Does this support Wayland?
| forgotpwd16 wrote:
| It'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.
___________________________________________________________________
(page generated 2022-06-11 23:01 UTC)