mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-26 13:20:24 +00:00
11 lines
335 B
Python
11 lines
335 B
Python
#!/usr/bin/env python
|
|
|
|
import Cocoa
|
|
import sys
|
|
|
|
image = Cocoa.NSImage.alloc().initWithContentsOfFile_(sys.argv[1].decode('utf-8'));
|
|
binary = sys.argv[2].decode('utf-8');
|
|
options = 0;
|
|
|
|
result = Cocoa.NSWorkspace.sharedWorkspace().setIcon_forFile_options_(image, binary, options);
|
|
if result == 0: print("could not set icon for file..");
|