yuuiko
September 23, 2019, 10:04am
1
Continuing the discussion from Adding Finder Tags / Labels to BTT touchbar? :
I don't seem to have a way to implement this finder tag stuff in BTT. I've made a replacement bar for Finder but it's missing this tags stuff, which I use really often. Would be great if there was a way to add it in BTT
Could you check whether the Apple Script described here (last post) does what you need?
I think the main problem is that Finder takes a bit to "refresh".
You can try whether doing it with Apple Script & the xattr command is faster:
tell application "Finder" to repeat with filename in (get selection)
set filePath to POSIX path of (filename as alias)
end repeat
do shell script "xattr -w com.apple.metadata:_kMDItemUserTags '<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"><plist version=\"1.0\"><array><string>Red</string></a…
yuuiko
September 23, 2019, 10:59am
3
Interesting, but the widget would require a way to retrieve the list of tags and apply them to that script. Will test it now
Edit: The script seems to work well
I’m not using these tags a lot, do you know where they are defined? Is this done completely in Finder?
yuuiko
September 24, 2019, 12:44am
5
Yes they are native to finder and can be set in the preferences:
Assign them to files using right click:
Or in inspector:
You can also sort and group by tags:
Applescript dictionary seems to have some kind of work-in-progress commands, interesting how its called "Labels" in there:
I'm using Mojave.