Skip to content(if available)orjump to list(if available)

Plwm – An X11 window manager written in Prolog

eikenberry

I'm hoping one day someone will write a window-manager service for Wayland that replaces the compositor API with a protocol. To once again enable window managers to be implemented in any language, regardless of it having a Wayland/compositor library.

pyinstallwoes

I wish more things were protocols instead of APIs.

linux2647

Could you explain the difference?

spicybright

I'm not the most knowledgeable, but a protocol talks to another process through a specific format.

I personally think its more powerful than writing a new process to replace and existing.

My favorite example is an X11 windows manager implementing in about 18 lines of python.

Obviously there's dependencies to talk to the X server, but the power of a protocol comes from any program written in any la gage communicate with existing code.

smikhanov

Looked at the source, it’s so compact, wow.

B1FF_PSUVM

Why am I reminded of the all-Erlang HN first page?

pona-a

Fun fact: the first version of Erlang interpreter was written in Prolog.

YeGoblynQueenne

Oh wow, I gotta try this.

Lots of documentation! Awesome!

gatane

Time to do one in Scheme, I guess.

igorhvr

This one is customizable in Lisp, and overall pretty neat: https://sawfish.tuxfamily.org/ - I have been happily using it daily for many years now. :-)

mhd

Done a while ago: https://en.wikipedia.org/wiki/Scwm

There was also "GWM", based on its own lisp dialect, "WOOL", which was around from at least the early 90s.

On the more popular side, you had sawfish (using an elisp-alike, IIRC) and stumpwm (Common Lisp).

tmtvl

Already exists: https://github.com/mwitmer/guile-wm

There might also be ones in other Schemes, but as FFI hasn't been standardised across Schemes yet I doubt there's an implementation-agnostic one.

DonHopkins

Here's an X11 window manager, with pie menus and tabbed windows, entirely written in object oriented NeWS PostScript, from around 1991:

https://donhopkins.com/home/archive/NeWS/owm.ps.txt

And some design notes and emails on that NeWS based window manager for X11 windows:

https://donhopkins.com/home/archive/NeWS/i39l.txt

It incorporated NeWS tabbed windows written in PostScript, which could wrap around X11 windows (and frame NeWS windows too of course):

https://donhopkins.com/home/archive/NeWS/win/tab.ps

And NeWS pie menus written in PostScript, which you could pop up on tabbed window frames and manage X11 windows (and use in NeWS apps too of course):

https://donhopkins.com/home/archive/NeWS/win/pie.ps

There was also a virtual large scrolling desktop, and virtual multi-screen "rooms", both purely written in PostScript, which all plugged together with the tabbed windows and pie menus and X window manager seamlessly. They were all independent of each other and could be used separately, but worked together synergistically. Take that, ICCCM! ;)

Also here's a (pre-ICCCM, pre-X11) X10 window manager with pie menus, written in C and scripted in Forth, from around 1986:

https://donhopkins.com/home/archive/piemenu/uwm/fuwm-main.f

And some of my thoughts on X-Windows and ICCCM window management in general:

https://donhopkins.medium.com/the-x-windows-disaster-128d398...

>In summary, ICCCM is a technological disaster: a toxic waste dump of broken protocols, backward compatibility nightmares, complex nonsolutions to obsolete nonproblems, a twisted mass of scabs and scar tissue intended to cover up the moral and intellectual depravity of the industry’s standard naked emperor.

>Using these toolkits is like trying to make a bookshelf out of mashed potatoes." -Jamie Zawinski

agumonkey

First time I ever get the chance to see object postcript/forth, thank you

rclkrtrzckr

Isn't ".pl" actually used for perl?

Well, there might be a Prolog interpreter written in (a) perl (regex) ...

ajdude

Prolog was using .pl for a bit over a decade before Perl existed.

tikhonj

It's used for both which consistently confuses logic that guess programming language purely based on file extensions.

jimjimjim

Prolog is a older than Perl and there doesn't need to be any exclusive claim on file extensions.

leephillips

Very nice. If you’re used to dwm this should be natural. Unless you use dwm’s tags as more than workspaces, which I do. The author does not, so he implemented workspaces instead of tags. So this can not replace dwm for me.

reramuyc

[dead]