Show HN: dol – Detect dark/light mode on the CLI

Hi HN,

I built a small macOS/Linux CLI tool called dol (dark or light).

Why? Modern operating systems can automatically switch between dark and light mode. However, many CLI tools assume a fixed dark or light background unless told otherwise. This is an attempt to make that less painful.

The output is intentionally minimal; it just prints `dark` or `light`. This allows you to construct command lines with it.

Examples:

`fzf --color=$(dol)`

`difft --background $(dol) file1 file2`

This is the first release (0.1.1). Feedback is very welcome.

Repo: https://github.com/netmute/dol

1 points netmute 9 months ago 0 comments

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton