Boris Buliga

I grow under the sun. When I am not writing code, I am either drinking wine or drinking tea (with these little cups). Cheese is my bread and tracking everything in Emacs is my cheese.

P.S. d12frosted means dice with 12 sides from the Chessex™ frosted series. I used to play. Just a little bit.

(tagged 'macos)

Automatic setup of spaces with yabai

April 23, 2022

The idea behind tiling window managers is brilliant - frames on the screen are organised in a non-overlapping fashion. In practice that means productivity boost because (1) all non-hidden frames are always visible and (2) all resizing and movement is done automatically by window manager whenever a frame becomes visible or hidden. It might take some time to get used to this approach, but in the end it’s love or hate relationship without position in-between.

My story with tiling window managers started in macOS, where window manager can’t be changed, but… you have applications that imitate them either in a non-intrusive manual manner (à la Spectacle) or in an automatic manner (à la Amethyst and yabai). So around 4 years ago I started using chunkwm (former yabai) and I’ve been happy user since then.

Since I am too lazy to setup macOS spaces manually, I want yabai to enforce specific configuration on startup - constant amount of spaces (with labels), meaning that missing are created and extra are removed. In addition, I want some applications to start on specific spaces (e.g. I love my browser to always be in the 3rd space) and to start some application silently (without stealing focus).

In this article we are going to learn how to achieve these goals.

Read more →

AppleScript and the GitHub API

June 15, 2017

AppleScript is a powerful scripting language that allows to directly control scriptable applications and some parts of macOS. The language itself can be a little bit frustrating for those who are not familiar with natural language programming paradigm. For example, with AppleScript, you can tell application "Preview" to quit or ask someone to print pages 1 thru 5 of document 2.

But my goal is not to promote or demote AppleScript. Instead, I wish to share a little script that I’ve fetched while experimenting with OmniFocus 2. I hate to manually capture issues that I care about, so I started to work on a script that takes URL from an active tab in Safari and sends it to OmniFocus into the right project with useful title and body.

For example, I want d12frosted/flyspell-correct#30 to go into the flyspell-correct project with title and description taken from that issue.

Read more →