Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Change finder view for a specific folder programmatically

+1
−0

I'm trying to change the view for a specific folder in finder from the command line. Specifically, I want to switch to icon view and set the icon size to 512 pixel.

Currently, my approach is to use an Automator.app workflow with a "Set Folders Views" action

Screenshot of the "Set Folder Views" automator action. On the left hand side, the icon size etc. gets set, in the centre are more settings like that the items should be arranged by name and on the right hand site is a selection with radio buttons for the background, listing white, colour or picture as choices

and then call the workflow from the command line with

automator name_of_my_workflow.workflow

this works mostly fine and sets the view and icon size as desired, but also changes the background colour of the finder. The action forces me to either choose a white background, which will be bad in dark mode, or a specific colour, which will at best look meh in all modes and at worst bad in either dark or light mode.

Are there any other ways to change the view of a specific folder or are there ways how to change the background colour of a specific folder back to default from the command line?

History

0 comment threads

Sign up to answer this question »