Last active
July 16, 2017 15:14
-
-
Save rderewianko/3c89b705d89eea46d01e to your computer and use it in GitHub Desktop.
iconizes folders in osx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import Cocoa | |
import sys | |
Cocoa.NSWorkspace.sharedWorkspace().setIcon_forFile_options_(Cocoa.NSImage.alloc().initWithContentsOfFile_(sys.argv[1].decode('utf-8')), sys.argv[2].decode('utf-8'), 0) or sys.exit("Unable to set file icon") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment