A Mouse Grid For Jwno


I learned about Warpd in the early days of Jwno, but never used it much. Recently, when the refactoring of the ui-hint code was mostly done, I coincidentally came across it again. I stared at Warpd’s Grid Mode demo and thought, Jwno’s :ui-hint command is now decoupled from actual UI elements, and it’s able to highlight arbitrary screen areas, maybe I can build something similar on top of it?

And so I did exactly that. The code fits in a small script, and it’s much cleaner than I expected. It can even adjust the label size dynamically:

I think it’s a perfect example of implementing your own hinter.

To try it out yourself, save the script alongside your own config file, then

(import mouse-grid)
(def mouse-grid-hinter (mouse-grid/mouse-grid-hinter))
#
# For example, bind the command to `Win + A`,
# and use "UIJK" for labels
#
(:define-key some-keymap
             "Win + A"
             [:ui-hint "UIJK" mouse-grid-hinter])

Get Jwno

Buy Now$10.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.