-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdict.py
48 lines (37 loc) · 1.23 KB
/
dict.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python3
# DICT -> Returns wrappers for big NS classes that I hate writing out
import rumps
import subprocess, sys, os
from AppKit import NSWorkspace, NSAttributedString
from PyObjCTools.Conversion import propertyListFromPythonCollection
from Cocoa import (NSFont, NSFontAttributeName, NSColor, NSForegroundColorAttributeName)
# DEFINE
# font
BIG_SYSTEM = NSFont.fontWithName_size_("Helvetica Neue Bold", 15.0)
BIG_MONO = NSFont.fontWithName_size_("Monaco", 16.0)
SMALL_SYSTEM = NSFont.fontWithName_size_("Helvetica Neue Bold", 11.0)
SMALL_MONO = NSFont.fontWithName_size_("Monaco", 13.0)
# color
RED = NSColor.redColor() # r
ORANGE = NSColor.orangeColor() # o
YELLOW = NSColor.yellowColor() # y
GREEN = NSColor.greenColor() # g
BLUE = NSColor.blueColor() # b
# i & v are dumb, so:
BLACK = NSColor.blackColor()
WHITE = NSColor.colorWithCalibratedRed_green_blue_alpha_(1, 1, 1, 1)
class Font(object):
def __init__(self):
self.BIG_SYSTEM = BIG_SYSTEM
self.BIG_MONO = BIG_MONO
self.SMALL_SYSTEM = SMALL_SYSTEM
self.SMALL_MONO = SMALL_MONO
class Color(object):
def __init__(self):
self.RED = RED
self.ORANGE = ORANGE
self.YELLOW = YELLOW
self.GREEN = GREEN
self.BLUE = BLUE
self.BLACK = BLACK
self.WHITE = WHITE