Skip to content

aspizu/mac-set-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mac-set-view

Apply Finder view settings recursively across folders on macOS.

mac-set-view opens each folder with Finder, applies your preferred view options, then closes the window so Finder writes the folder metadata into .DS_Store. It is a Python 3.14 CLI managed with uv.

Features

  • Set Finder view style: icon, list, column, or gallery.
  • Limit recursion with --depth.
  • Skip noisy folders and macOS package bundles.
  • Configure icon size and text size.
  • Arrange icon view by name, kind, size, date, label, or grid.
  • Configure list sort column, sort direction, visible columns, and folder size calculation.
  • Preview target folders with --dry-run.

Install

uv tool install git+https://github.com/aspizu/mac-set-view

Or from a local checkout:

uv tool install .

Quick Start

Create the default config:

uv run mac-set-view --init-config

Preview folders that would be changed:

uv run mac-set-view --dry-run

Apply settings to a subtree:

uv run mac-set-view --start "$HOME/Documents" --depth 2

Override config from CLI:

uv run mac-set-view --view list --sort-by size --sort-direction reversed --columns name,size,kind --calculate-all-sizes
uv run mac-set-view --view icon --arrange-by kind

--group-by remains accepted as a deprecated alias for --arrange-by. Finder AppleScript exposes icon arrangement, not true Finder "Group By".

Config

Default config path:

~/Library/Application Support/dev.aspizu.mac-set-view/config.toml

Example:

ignore = [
  "Library/",
  ".Trash/",
  ".git/",
  "node_modules/",
  "target/",
  ".cache/",
  "*.app/",
  "*.bundle/",
  "*.framework/",
  "*.key/",
  "*.kext/",
  "*.numbers/",
  "*.pages/",
  "*.photoslibrary/",
  "*.pkg/",
  "*.rtfd/",
]
depth = 3

[view]
style = "list"
icon_size = 64
text_size = 12
arrange_by = "kind"
sort_by = "size"
sort_direction = "reversed"
columns = ["name", "modification-date", "size", "kind"]
calculate_all_sizes = true

Ignore patterns use gitignore syntax. Use --config /path/to/config.toml to choose another config file.

Options

--start <PATH>             Start directory. Defaults to home directory.
--config <PATH>            Config file path.
--init-config              Create default config file if missing.
--dry-run                  Print folders without changing Finder metadata.
--depth <N>                Maximum walk depth. 0 applies only start directory.
--view <STYLE>             icon, list, column, gallery.
--icon-size <N>            Finder icon size. List view maps <=16 to small, larger to large.
--text-size <N>            Finder item text size.
--arrange-by <FIELD>       none, grid, name, modification-date, creation-date, size, kind, label.
--sort-by <COLUMN>         name, modification-date, creation-date, size, kind, label, version, comment.
--sort-direction <DIR>     normal or reversed.
--columns <LIST>           Comma-separated list view columns.
--calculate-all-sizes      Calculate folder sizes in list view.

Notes

  • macOS only.
  • Finder may prompt for automation permission on first run.
  • App bundles and common package directories are skipped because Finder opens them as files or documents, not normal folders.
  • True Finder "Group By" is not exposed by Finder AppleScript; arrange_by controls icon arrangement.

Development

uv sync
uv run ruff format --check .
uv run ruff check .
uv run pytest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages