macOS CLI · Open source · MIT

Tint locked Desktop folders.

foldtint applies color to locked folders on the Desktop to differentiate them from unlocked ones on macOS. Unlocked folders keep the default macOS folder color.

npm install -g foldtint

macOS 14 or laterNode.js 18 or laternpmMIT License

Desktop preview

A lock on a top-level Desktop folder applies the Locked tag. An unlock removes that tag. This preview does not change your Mac.

Desktoppurple
  • Archive
  • TaxesLocked
  • Photos
  • Notes

Lock applies the Finder tag Locked in the selected color. Unlock removes only that tag. Other tags stay.

Color

Valid names are gray, green, purple, blue, yellow, red, and orange. Purple is the default. These names are Finder tag colors. Hex values are not valid.

foldtint color purple

foldtint color shows the current color. foldtint color purple writes the configuration, then scans the Desktop.

Install

  1. Open a terminal.
  2. Run npm install -g foldtint.
  3. Run foldtint on.

The on command installs a LaunchAgent. The LaunchAgent uses the installed foldtint binary. Keep the npm global install in place while the watcher runs.

Show help with foldtint --help.

The install puts a native binary on the computer. The tool does not need network access after install. The tool does not need root access.

Commands

foldtint color

Show the current color.

foldtint color purple

Set the color for locked Desktop folders. The command writes the configuration, then scans the Desktop.

foldtint scan

Apply or remove the Locked tag on top-level Desktop folders now. Use scan after a repair. You do not need scan when the watcher is on.

foldtint on

Start the watcher. The command installs a LaunchAgent. A lock then applies the color. An unlock removes the color.

foldtint off

Stop the watcher. The command does not remove current tints. The command does not unlock folders.

foldtint status

Show the color, the Desktop path, the watcher state, and the folder counts.

foldtint daemon

Run the watcher in the current process. The on command starts this process through LaunchAgent. Do not run daemon by hand unless you do a test.

foldtint uninstall

Stop the watcher, remove the LaunchAgent, remove the Locked tag, and delete the configuration. The command does not unlock folders.

foldtint --help

Show help.

How it works

  1. Locked flag

    A locked folder has the Finder Locked checkbox. That flag is the user immutable flag.

  2. Locked tag

    When a folder is locked, foldtint adds the Finder tag Locked with the configured color. Other tags stay.

  3. Unlock

    When a folder is unlocked, foldtint removes only the Locked tag. Other tags stay.

  4. Watcher

    The on command installs a LaunchAgent. The watcher uses directory events on the Desktop. The watcher does not use per-file events. Memory use stays low. When the watcher is on, the tint persists after shutdown and restart.

Limits

foldtint watches top-level folders in ~/Desktop. It does not change nested folders, files, aliases, apps, or packages.

  • The tool works on macOS only.
  • The tool works on top-level Desktop folders only.
  • The tool does not follow symbolic links.
  • The tool does not use /, /System, or /Applications.
  • The tool does not set custom icons.
  • The tool does not use hex colors.

Uninstall

  1. Run foldtint uninstall. The command stops the watcher. The command removes the LaunchAgent. The command removes the Locked tag from top-level Desktop folders. The command deletes the configuration file. The command does not unlock folders.
  2. Run npm uninstall -g foldtint.

FAQ

Which folders does foldtint change?

Top-level folders on the Desktop only. The tool does not change nested folders. The tool does not change files, aliases, apps, or packages.

What is the default color?

Purple.

Can I pass a hex color?

No. Valid names are gray, green, purple, blue, yellow, red, and orange. These names are Finder tag colors.

Does foldtint off remove the tint?

No. The off command stops the watcher. It does not remove current tints. It does not unlock folders.

Does uninstall unlock folders?

No. The uninstall command removes the Locked tag from top-level Desktop folders. It does not unlock folders.

Do I need scan when the watcher is on?

No. Use scan after a repair. You do not need scan when the watcher is on.

Does the tool need root or network access?

The install puts a native binary on the computer. The tool does not need network access after install. The tool does not need root access.

What does status show?

The color, the Desktop path, the watcher state, and the folder counts.

Should I run daemon myself?

Do not run daemon by hand unless you do a test. The on command starts that process through LaunchAgent.