显然有一个applescript允许人们改变取景器窗口的背景颜色。是否有任何objective-c API可以调用以更改颜色和/或设置与路径相关的Finder文件夹以显示特定的背景图像?我想创建一个git hook,在特定分支上将目录的finder文件夹更改为红色(以可视方式显示我不应对该分支进行更改)。
答案 0 :(得分:1)
在这里,我找到了如何在选择的文件夹中更改所有finder窗口,请在此处使用:
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
希望这有帮助!
答案 1 :(得分:0)
我很抱歉,但我只知道如何在Applescript中做到这一点:
带图像
tell application "Finder" to set the desktop picture to (choose file of type "png")
以下是如何使用纯色进行
tell application "Finder" to set the desktop picture to "Library:Desktop Pictures:Solid Colors:(Color Name)"
颜色名称列表: