Programming, Topic: Productivity

All posts

Recent posts

Syncing Kobo Annotations

I’ve recently been trying out a Kobo. Amazon has some issues and Kindles are hard to do any amount of customization to, let’s just leave it at that.

So what fun tricks can one do with a Kobo?

Well, for one, it’s a Linux system. And if you attach it to your computer, you get access to a lot of the local filesystem. This includes the SQLite database holding all of teh system metadata, along with places to install all sorts of interesting scripts.

One that I’ve been wanting in particular is the ability to extract my annotations. It’s a great way to review books. Highlight, write a note, and then export right at the end.

So how do you do that on a Kobo?


read more...


Locking BGA tabs with UserScripts

I play a lot of games on Board Game Arena (BGA!). A lot of those are turn based games with random people, but I have two subsets of games that I consider ‘more important’:

  • Turn based games with people I know
  • Alpha games I’m testing

Unfortunately, the first tends to have longer ‘per turn’ times and the latter doesn’t have a timer at all, so both end up right at the very end of the sorted table list. But both, I’d rather play first and in-between other games.

Super niche problems, I know.

Generally, my solution has been to keep a tab open for each of those games in a Firefox Tab Group, but in those cases, I keep navigating off those pages accidentally (thank you next table button).

Super super niche problems, now.

In any case, I whipped up a quick userscript (I use ViolentMonkey) that will:

  • Detect if a tab I’m on is one of the games I want to ’lock’
  • Remove the next table button (buttons; there are two different ones)
  • Disable navigation (at least make it pop up a warning)
  • Periodically refresh the tab (BGA tends to go to sleep in the background)

read more...


Keyboard Chords with Hammerspoon

I love keyboard shortcuts. The less I have to switch between keyboard and mouse, the more efficient I (at least feel I) can be!

Problem statement

But there are only so many unique combinations of keys on a standard keyboard. Assume 26 letters, 10 digits, and (for now) 20 other characters, along with 4 ‘modifier’ keys (⌘ ⌃ ⌥ ⇧) that you can use in any combination of one or more. So 26 * 10 * 20 * (2^4 - 1) = 78,000 . Like I said. Limited. 😄

But we can do better!

Enter the Hammerspoon hs.hotkey.modal module!

read more...


Once Again, to Hammerspoon

Why oh why doesn’t macOS have a more powerful window manager…

Once upon a time, I moved from primarily Windows to primarily (at the time) OSX. I missed Aerospace–the ability to use Win+Left/Right to snap windows to half the screen–so I wrote a fix: Duplicating AeroSnap on OSX with Hammerspoon.

Since then, I eventually discovered and moved to Magnet and all was well.

But more recently, I’ve been wanting two things:

  • a bit more control (once again), to define more arbitrary sizes and keystrokes
  • the ability to automatically arrange windows to various Mission Control Spaces

And what a journey it’s been…

read more...