forked from deanishe/awgo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
icons.go
101 lines (96 loc) · 2.56 KB
/
icons.go
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//
// Copyright (c) 2016 Dean Jackson <[email protected]>
//
// MIT Licence. See http://opensource.org/licenses/MIT
//
package workflow
import "fmt"
// Ready-to-use icons based on built-in OS X system icons.
// These icons are all found in
// /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources.
//
// The icons are the same as found in the Alfred-Workflow library
// for Python. Preview them here:
// http://www.deanishe.net/alfred-workflow/user-manual/icons.html#list-of-icons
var (
// Accounts.icns
IconAccount *Icon
// BurningIcon.icns
IconBurn *Icon
// Clock.icns
IconClock *Icon
// ProfileBackgroundColor.icns
IconColor *Icon
// ProfileBackgroundColor.icns
IconColour *Icon
// EjectMediaIcon.icns
IconEject *Icon
// AlertStopIcon.icns
IconError *Icon
// ToolbarFavoritesIcon.icns
IconFavorite *Icon
// ToolbarFavoritesIcon.icns
IconFavourite *Icon
// GroupIcon.icns
IconGroup *Icon
// HelpIcon.icns
IconHelp *Icon
// HomeFolderIcon.icns
IconHome *Icon
// ToolbarInfo.icns
IconInfo *Icon
// GenericNetworkIcon.icns
IconNetwork *Icon
// AlertNoteIcon.icns
IconNote *Icon
// ToolbarAdvanced.icns
IconSettings *Icon
// ErasingIcon.icns
IconSwirl *Icon
// General.icns
IconSwitch *Icon
// Sync.icns
IconSync *Icon
// TrashIcon.icns
IconTrash *Icon
// UserIcon.icns
IconUser *Icon
// AlertCautionIcon.icns
IconWarning *Icon
// BookmarkIcon.icns
IconWeb *Icon
)
func systemIcon(filename string) *Icon {
icon := &Icon{}
var path string
path = fmt.Sprintf(
"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/%s.icns", filename)
icon.Value = path
icon.Type = ""
return icon
}
func init() {
IconAccount = systemIcon("Accounts")
IconBurn = systemIcon("BurningIcon")
IconClock = systemIcon("Clock")
IconColor = systemIcon("ProfileBackgroundColor")
IconColour = systemIcon("ProfileBackgroundColor")
IconEject = systemIcon("EjectMediaIcon")
IconError = systemIcon("AlertStopIcon")
IconFavorite = systemIcon("ToolbarFavoritesIcon")
IconFavourite = systemIcon("ToolbarFavoritesIcon")
IconGroup = systemIcon("GroupIcon")
IconHelp = systemIcon("HelpIcon")
IconHome = systemIcon("HomeFolderIcon")
IconInfo = systemIcon("ToolbarInfo")
IconNetwork = systemIcon("GenericNetworkIcon")
IconNote = systemIcon("AlertNoteIcon")
IconSettings = systemIcon("ToolbarAdvanced")
IconSwirl = systemIcon("ErasingIcon")
IconSwitch = systemIcon("General")
IconSync = systemIcon("Sync")
IconTrash = systemIcon("TrashIcon")
IconUser = systemIcon("UserIcon")
IconWarning = systemIcon("AlertCautionIcon")
IconWeb = systemIcon("BookmarkIcon")
}