
Show HN: Xlambda – A window manager extensible in Guile - lmilon
https://github.com/kori/Xlambda
======
neilv
Related projects to look at for ideas, and a handhelds opportunity...

Scwm is an old but interesting X window manager using Scheme:
[https://en.wikipedia.org/wiki/Scwm](https://en.wikipedia.org/wiki/Scwm)

Rwind is a more recent related project, in Racket (a big Scheme variant), and
probably needs a developer to build higher-level features:
[https://pkgs.racket-lang.org/package/rwind](https://pkgs.racket-
lang.org/package/rwind)

Although it's in Haskell rather than a Scheme, Xmonad has been solid as a
daily driver, and presumably is worth looking at for a relatively modern WM
implementation (compared to trying to figure out the whats and whys of how
Fvwm works):
[https://en.wikipedia.org/wiki/Xmonad](https://en.wikipedia.org/wiki/Xmonad)

Also the popular tiling window manager i3, and how its Wayland drop-in, Sway,
work:
[https://en.wikipedia.org/wiki/I3_(window_manager)](https://en.wikipedia.org/wiki/I3_\(window_manager\))

If you make a Guile-based WM that does a good job of smartphone-like one-app-
displayed-at-a-time window management (like the old Matchbox WM did), with
status bar and popup keyboard, then I would like to use it on GNU/Linux
handhelds, and might be tempted to switch the entire project from Racket to
Guile:
[https://www.neilvandyke.org/postmarketos/](https://www.neilvandyke.org/postmarketos/)

~~~
lmilon
Yeah, I've seen scwm, I figured it was too old to try and adapt for today.

I haven't heard of Rwind! I used Racket mainly, before this, so it's
definitely interesting to me. I'll definitely look into that.

Xmonad is one of my favorite projects and Xlambda is a reference to its name
:D

I usually use one-app-at-a-time window management, so I'll want to make sure
that sort of setup is very comfortable.

Also, wow! Your project of combining PostmarketOS and Racket is amazing!

A reason why I didn't use Racket for Xlambda is because the FFI wasn't as easy
to figure out as Guile's was. Otherwise, I would have gone with Racket.

~~~
neilv
If you can do Xlambda with Guile, that's probably preferable to doing it with
Racket, for purposes such as getting it into GNU/Linux distros. This is
exactly one of the kinds of purposes for which Guile was intended. I'm also
very happy to see the recent energy put into Guile, including your project.

~~~
lmilon
Ideally it would be amazing to have Xlambda be a good fit for GuixSD, as I
really like that project.

Also, same! Guile (and Scheme, in general) are growing in popularity a lot and
it makes me really happy.

------
Y_Y
Wouldn't hurt to have a demo video. How easy is this to actually use as a WM,
and is it any different to say EXWM?

~~~
lmilon
I'll record a demo this week! I wouldn't recommend trying it as a standalone
window manager right now. Maybe by V3 it should be usable. I don't know much
about EXWM, but I would guess the fact it uses Guile affords different powers
than using Elisp.

~~~
bin0
Honest question: is there a major difference? I thought they were just
dialects of lisp (guile is technically scheme, but isn't scheme just a
descendant of lisp?)? I figured they might have slightly different syntax and
that's it.

~~~
lmilon
There are differences in how you'd use them. Scheme is very focused on a
minimal core and extension through macros and similar constructs, whereas, as
far as I know (nb: I don't use emacs) Elisp has a lot of pre-built constructs
that are used far more.

Also, Guile being the implementation chosen is not incidental, the GNU project
is moving towards Guile as an extension language everywhere (The big example
here would be GuixSD).

------
c256
You might be interested in a similar project from a (quite) long time ago: Not
A Window Manager

    
    
      http://web.mit.edu/nawm/www/

------
amirouche
Why did you not use guile-wm [https://github.com/mwitmer/guile-
wm](https://github.com/mwitmer/guile-wm)?

I love the idea of a wm calculus I hope that it comes to life somehow.

What I can recommend you to look at, not sure it is very on-topic, is related
to layouting is cassowary and constraint-based layout systems, autolayout is
one of them, along the browser layout engine like css grid and flexbox.

A question to finish: what do you think of
[https://github.com/paperwm/PaperWM](https://github.com/paperwm/PaperWM)?

~~~
lmilon
I wrote about why I didn't go with guile-wm here:
[https://lobste.rs/s/ssl8wx/xlambda_v1_released_window_manage...](https://lobste.rs/s/ssl8wx/xlambda_v1_released_window_manager#c_5b9mzp)

Reproduced below: I actually have a pretty good reason for doing so, libwm
already had most of the functionality I needed (I had used wmutils in the
past, and that’s where I got most of my ideas for this project. (You can see
the end result of me modifying the basic wmutils scripts here:
[https://github.com/kori/wm](https://github.com/kori/wm)), and it was small
enough that extending it with Guile would be the fastest way to get a working
prototype, and it would help me learn about how to use its FFI, which is
actually very important, too, because I plan to integrate Guile with other
software I use!

I'll definitely look into all kinds of layouts. I think it's important to be
as flexible as possible, when it comes to a window manager.

PaperWM seems nice, I like the idea of a scrollable window manager, I think
it's a great idea for touchscreens, not so much for the standard
keyboard+mouse combo, though.

------
bitwize
Since X is now officially deprecated, we're gonna need a Wayland compositor
version of this.

~~~
namibj
The moment I come across a well-behaved Wayland version of Xmonad, I'll switch
personal systems from Xmonad/Xorg and work systems from Unity/default Ubuntu
(Wayland-based) to it. They are very, very powerful tools (Lisp/Scheme/Haskell
based WMs).

~~~
bitwize
Does this suffice?
[https://github.com/waymonad/waymonad](https://github.com/waymonad/waymonad)

