Home
  
  

The AwesomeWM Dev Loop (is not great)

August 22, 2020

NOTE: This is a raw, untended note, representing a quick capture for the topic at hand. Hopefully it will soon develop into a draft of something useful!

Restarting does not maintain state by default. Which I guess is alot to ask? Was never a problem in i3, however. There are few worse situations for hacking on your window manager, restarting it to see if your code worked, then being thrust into someone else's default keybindings, losing your wallpaper (small potatoes, but annoying the 50th time).

There are ways to make it better, all of which feel a bit manual.

Ex:

  • Helper scripts to persist and reassociate tags/clients at startup
  • sanity-check your config as part of the restart process (linters/compile checkers)

But the default is very not good. I've seen recommendations from people to use Xephyr, and there is a nice tool (awmtt or something like that). I've done this and agree it's necessary given the state of things.

One thing that starts to happen is you learn the default keybindings. I constantly am wondering if I could change the default bindings, but never have the heart to look into it. It would make sense to put my whole config in there, right? It's probably at least worth the effort/exploration.

Part of what exacerbated this for me was Awesome crashing when my fennel code didn't compile - I was learning fennel at the same time, and trying to get to a basic fennel-repl that controlled awesome. I've spent a few days digging around and trying approaches to this, but finally landed on just calling fennel/lua from clojure, using awesome-client to send strings to Awesome's dbus handler.

The DBus handler is technically a repl one, which is great - you have access to your whole config. More work could be done to handle passing locals between awesome-client commands - right now each call is basically a new sandbox with access to your config. I'd really like to be able to add commands this way. I suppose I could include commands myself from the clojure side.

Where does it end?

For now, I'm enjoying the integration. One big win was realizing that fennelview, the fennel pretty-printer, converts lua tables into what is basically edn. It's not perfect, but it works for primitives out of the box, which allows for functions like these (which use a few helper wrappers) to return actual clojure data structures.

This is a great place to be, because the clojure repl lets me call these inline, in a comment block, etc. It's the happy place.

Backlinks

  • 2020-08-23
Russell Matney

Russell Matney

Writing, Stories, Software, Indie Games

 

© 2020