Settings

Theme

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

github.com

1 points by netmute a month ago · 0 comments · 1 min read

Reader

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

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection