1

Apparently there is an applescript which allows one to change the background color of a finder window. Is there any objective-c API I can call to change the color and/or set the Finder folder related to a path to show a specific background image? I would like to create a git hook which changes the finder folder of a directory to red when on a specific branch (to show visually I should not make changes to that branch).

Community
  • 1
  • 1
Grzegorz Adam Hankiewicz
  • 7,349
  • 1
  • 36
  • 78

2 Answers2

1

Here, I found how to change ALL finder windows inside a choosen folder, use this here:

tell application "Finder"
set ChosenFolder to (choose folder)
set TheseFolders to (every folder of entire contents of ChosenFolder)
repeat with CounterA from 1 to (count of TheseFolders)
    set background color of icon view options of window of item CounterA of TheseFolders to (choose color)
end repeat
end tell

Hope this helped!

YeaTheMans
  • 1,005
  • 8
  • 19
0

I am sorry but I only know how to do it in Applescript:

With Image

tell application "Finder" to set the desktop picture to (choose file of type "png")

Here is how to do it with a Solid Color

tell application "Finder" to set the desktop picture to "Library:Desktop Pictures:Solid Colors:(Color Name)"

List of Color Names:

  1. "Solid Aqua Blue.png"
  2. "Solid Aqua Dark Blue.png"
  3. "Solid Aqua Graphite.png"
  4. "Solid Grey Dark.png"
  5. "Solid Grey Light.png"
  6. "Solid Grey Medium.png"
  7. "Solid Grey Pro Dark.png"
  8. "Solid Grey Pro Ultra Dark.png"
  9. "Solid Kelp.png"
  10. "Solid Lavender.png"
  11. "Solid Mint.png"
  12. "Solid White.png"
YeaTheMans
  • 1,005
  • 8
  • 19