/JankyBorders

A lightweight window border system for macOS

Primary LanguageCGNU General Public License v3.0GPL-3.0

JankyBorders

Screenshot

JankyBorders is a lightweight tool designed to add colored borders to user windows on macOS 14.0+. It enhances the user experience by visually highlighting the currently focused window without relying on the accessibility API, thereby being faster than comparable tools.

Usage

Install

The binary can be made available by installing it through Homebrew:

brew tap FelixKratz/formulae
brew install borders

For a comprehensive overview of all available options and commands, consult the man page: man borders. A rendered version of the man page is available in the Wiki.

Bootstrap with yabai

For example, if you are using yabai, you could add:

borders active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0 &

to the very end of your yabairc. This will start the borders with the specified options along with yabai.

Bootstrap with AeroSpace

You could add:

after-startup-command = [
  'exec-and-forget borders active_color=0xffe1e3e4 inactive_color=0xff494d64 width=5.0'
]

to you aerospace.toml. This will start borders with the specified options along with AeroSpace.

Bootstrap with brew

If you want to run this as a separate service, you could use:

brew services start borders

Configuring the appearance

You can either configure the appearance directly when starting the borders process (as shown in "Bootstrap with yabai") or use a configuration file. The appearance can be adapted at any point in time.

Using a configuration file (Optional)

If the primary borders process is started without any arguments (or launched as a service by brew), it will search for a file at ~/.config/borders/bordersrc and execute it on launch if found.

An example configuration file could look like this: ~/.config/borders/bordersrc

#!/bin/bash

options=(
	style=round
	width=6.0
	hidpi=off
	active_color=0xffe2e2e3
	inactive_color=0xff414550
)

borders "${options[@]}"

Updating the border properties during runtime

If a borders process is already running, invoking a new borders instance with any combination of the available options will update the properties of the already running instance.

Documentation

Local documentation is available as man borders and as a rendered version in the Wiki.