szymonkaliski / hhtwm

hackable tiling window manager for macOS and Hammerspoon
MIT License
237 stars 11 forks source link

Default values? #1

Closed cmsj closed 5 years ago

cmsj commented 5 years ago

This is looking pretty cool, but I noticed that things like the margin and enabled layouts don't seem to have default values, so the OOTB experience is a traceback and a failure to start. Might be a good idea to have some defaults there.

Also, do you think this would be worth converting into a Spoon?

szymonkaliski commented 5 years ago

Yeah, default values are a good idea, I'll add this to my todo.

As for spoon, I'm depending on two modules that aren't Spoons, so not sure how could that work? Honestly I never looked closely at Spoons so not sure about the limitations / best practices :)

cmsj commented 5 years ago

Spoons intentionally have no way to declare dependencies, so that wouldn’t really change from installing the wm right now, and those two modules are really out-of-tree core modules rather than other Lua modules, so I don’t think it would be better or worse on that front.

Also FWIW we’d like to get axuielement into core at some point (asm’s Spaces module has a less clear future though - maybe that could be made optional?)

szymonkaliski commented 5 years ago

Yeah without spaces module this wouldn't work at all - I'm keeping list of windows per space id, etc. So making it optional is not really possible.

I'll look into converting this into a spoon, but it's a bit of low priority for me :)

szymonkaliski commented 5 years ago

Default values are fixed with this commit: https://github.com/szymonkaliski/hhtwm/commit/37846e43ff79c2a5298ae0f10b77f33ab005dbb5 - there's no bindings by default (and by design), but to get this to work, the only thing required in init.lua is:

hhtwm = require('hhtwm')
hhtwm.start()
cmsj commented 5 years ago

👍