Friday 5 December 2014

Howm Version 0.5

I've decided that I want to do write ups of new releases of software that I create, in order to gather my thoughts and share some extra information with those that are interested.

With that said, I have just released a new version of howm. Version 0.5 brings some of the biggest changes to howm, including:
  • Configuration is done through cottage.
  • Howm no longer requires recompiling.
  • sxhkd is used for handling keypresses.

Why?

Why go to the effort of 106 commits, spanning 2 months? When I first created howm I just wanted something fun to hack on and hadn't considered the architecture particularly. When I first shared howm on Hacker News and also reddit I began to realise that recompiling after each configuration change wasn't going to cut it. I also realised that scripting howm was an important idea.

This led me to write cottage - a small utility to allow users to run howm commands over a local UNIX socket. This idea flourished as I realised that configuration should be moved out of howm also.

Configuration

Howm is now configured using cottage. The syntax is easy to understand (you don't need to understand C to make changes to howm anymore) and you're told when you make an error. Here's an example that shows how to change the border width:

    cottage -c border_px 4

By collecting multiple cottage commands together, it is possible to create a configuration file in the form of a shell script. This is heavily inspired by baskerville's bspwm, but takes the idea further by adding more descriptive error messages when something goes wrong.

Keybindings

Keeping a config.h file crammed with keybindings felt archaic, so I decided to switch over to using sxhkd. sxhkd listens for keypresses and then runs predefined commands. Joining sxhkd together with cottage allows for keybinding logic to be removed from howm - instead allowing all commands to be passed through a UNIX socket. This means that there is no longer a distinction between commands sent by cottage over the UNIX socket and commands resulting from keypresses.

Future Releases 

As more howm releases are made, I have a list of features that I want to see incorporated. Here's a brief summary of them:
  • Unit testing: I want most of howm to be covered by unit tests.
  • Cottage query howm's state: I think it would be great to be able to see howm's configuration as it is running. I also want to prevent people from having to hack shellscripts around howm's ugly output - cottage should be able to tell you everything you need to know.
  • Visual Mode: Being able to select certain windows and then perform an operation upon them would be excellent.
  • Better mouse support: The ability to move and resize windows using the mouse is a feature that howm should have.

 Conclusion

I hope that people enjoy the new features and new way of doing things with howm. I understand that some people may not like the addition of extra dependencies - but the move away from recompiling after a configuration change has removed howm's depencies on a compiler and working build system.

6 comments:

  1. Hey Harvey, Simgin here :) Nice page mate.

    ReplyDelete
  2. Great stuff Mr Hunt. Nice write up.

    ReplyDelete
    Replies
    1. Thanks dkeg, I plan to do one for every major release.

      I'm going to collect some different ideas here too.

      Delete
  3. Honestly, the decision to move away from only changing headers for customizing makes a lot of sense for howm. Most of the wm's who have stuck to that method do so to make them as sparse on dependencies as possible. It's no longer a lean-to, but a much more functional house. Also, nice blog. :)

    ReplyDelete
    Replies
    1. Thanks Joe, I think it makes things much neater. It's a bit of a false economy really - reducing dependencies by requiring a compiler...

      Delete