-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDashboard Calendar.glet
258 lines (226 loc) · 9.39 KB
/
Dashboard Calendar.glet
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Command</key>
<string># NotePlan Dashboard Calendar v4.5
# 4.5
# New: Added a Changelog
# New: Users can set customizable options for:
# User directory
# Productivity meter tick
#---add custom options---#
#
userDir='/Users/XXX/Library/Mobile\ Documents/iCloud\~co\~noteplan\~NotePlan/Documents/Calendar'
tick='▊'
#
#---end custom options---#
#---add variables---#
# formatting
format_heading=$(printf '\e[44m') # ansi formatting for headings
format_reset=$(printf '\033[0m') # reset ansi formatting
format_today=$(printf '\033[1;30;47m') # ansi formatting for today highlight
format_month=$(printf '\033[1;30;47m') # ansi formatting for month headings
format_tick_done=$(printf '\033[32m') # ansi formatting for ticks
format_tick_open=$(printf '\033[31m') # ansi formatting for ticks
format_tick_sched=$(printf '\033[34m') # ansi formatting for ticks
format_tick_canx=$(printf '\033[30m') # ansi formatting for ticks
# titles
title_this_month=$(date +"%B %Y")
title_next_month=$(date -v +1m +"%B %Y")
title_counter="Productivity"
title_active="Active"
title_waiting="Waiting"
title_delayed="Delayed"
# dates
day=$(date +"%A, %B %d")
today=$(date +%Y%m%d)
tomorrow=$(date -v+1d +%Y%m%d)
this_month=`date +"%m %Y"`
next_month=`date -v+1m +"%m %Y"`
highlight=`date "+%e"`
# create current month calendar
current_month=`cal -h $this_month | tail -7 | tr [a-z] [A-Z]`
upcoming_month=`cal $next_month`
#---end variables---#
#---add calendars---#
echo "$format_today $day $format_reset\n" | tr [a-z] [A-Z]
# display current month calendar
echo "$format_month $title_this_month $format_reset\n" | tr [a-z] [A-Z]
echo "${current_month/${highlight}/$format_today${highlight}$format_reset}"
# display next month calendar
echo "\n$format_month $title_next_month $format_reset\n" | tr [a-z] [A-Z]
cal -h $next_month | tail -7 | tr [a-z] [A-Z]
#---end calendars---#
#---add meters---#
eval cd "$userDir"
echo "$format_month $title_counter $format_reset\n" | tr [a-z] [A-Z]
# echo "Day Done Graph" | tr [a-z] [A-Z]
# echo "--- ---- -----"
for (( i=1; i<=7; i++ ))
do
d=$(date -v-"$i"d +"%Y%m%d")
dname=$(date -v-"$i"d +"%a %b %d")
count_open=$(grep -v $'\t' $d.txt | grep -c '\[ \]')
count_done=$(grep -v $'\t' $d.txt | grep -c '\[x\]')
count_sched=$(grep -v $'\t' $d.txt | grep -c '\[>\]')
count_canx=$(grep -v $'\t' $d.txt | grep -c '\[-\]')
printf "$dname ("
if (( $done < 10 ))
then
printf %02d $count_done
else
printf $count_done
fi
printf "):"
echo
for (( t=0; t<$count_open; t++ ))
do
printf "$format_reset"
printf "$format_tick_open"
printf $tick
printf "$format_reset"
done
for (( t=0; t<$count_done; t++ ))
do
printf "$format_tick_done"
printf $tick
done
for (( t=0; t<$count_sched; t++ ))
do
printf "$format_reset"
printf "$format_tick_sched"
printf $tick
printf "$format_reset"
done
for (( t=0; t<$count_canx; t++ ))
do
printf "$format_reset"
printf "$format_tick_canx"
printf $tick
printf "$format_reset"
done
echo "$format_reset\n"
done
#---end meters---#</string>
<key>DisplayID</key>
<integer>69992768</integer>
<key>DisplayStatusImage</key>
<false/>
<key>DropShadow</key>
<false/>
<key>FailureImage</key>
<data>
TU0AKgAABAj///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAGgAAACAAAAAaAAAA
DQAAAAAAAAAAAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAgAAQFYGBYWqyso
KOExLy/9Kygo4RgWFqoAAQFXAAAACAAAAAAAAAAAAAAAAP///wAAAAAAAAAAAAAAAAgG
BgZ8Rz4+8qWXl//c09P/6+Tl/93T0/+ll5f/Rz4+8gYGBnwAAAAIAAAAAAAAAAD///8A
AAAAAAAAAAQHAgJkSS0t9Kt9ff/ct7j/7NHS/+7T0//s0dL/3be4/6t9ff9JLS30BwIC
ZQAAAAUAAAAA////AAAAAAAAAAAmLhAQzJA+P/+1TEv/xmNe/8twav/LcGr/y3Bq/8Zj
Xf+0TEv/kD4//y4QEMwAAAAmAAAAAP///wAAAAAABgAATmAZGvitMi//uSwh/8E+Mf/H
TED/yU9D/8hNQP/DPjL/uiwi/64xL/9gGRr4BwAATQAAAAD///8AAAAAARUAAGiJGBr/
wzgx/8tCNP/TV0n/3WZa/+BqXf/eaFr/1VhL/85DNP/GOTL/ihga/xYAAGcAAAAB////
AAAAAAkYAABslRoW/9JNQP/dYFL/63Jm//KAdv/2hXv/9IF3/+10Zv/gYVP/1k5B/5Ya
Fv8YAABrAAAACP///wAAAAANDAAAY4UZEu/iXU3/8Hhr//yFef/+lYn//puP//+Xiv/8
h3r/8Xlr/+ZdTv+HGRLwDQAAZAAAAAv///8AAAAADwAAAE5aDAfL4FZI//6LgP//mI7/
/qSY//+rnv/+p5r//5qP//+Ngf/n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kMAAAH8AAAADnZjZ3QAAAIMAAAAMG5kaW4A
AAI8AAAAPmNoYWQAAAJ8AAAALGJUUkMAAAH8AAAADmdUUkMAAAH8AAAADmRlc2MAAAAA
AAAAGkNhbGlicmF0ZWQgUkdCIENvbG9yc3BhY2UAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAdGV4dAAAAABDb3B5cmlnaHQgQXBwbGUgSW5jLiwgMjAxOAAAWFlaIAAAAAAA
APNRAAEAAAABFsxYWVogAAAAAAAAb6AAADj1AAADkFhZWiAAAAAAAABilwAAt4cAABjZ
WFlaIAAAAAAAACSfAAAPhAAAtsNjdXJ2AAAAAAAAAAEB0QAAdmNndAAAAAAAAAABAAEA
AAAAAAAAAQAAAAEAAAAAAAAAAQAAAAEAAAAAAAAAAQAAbmRpbgAAAAAAAAA2AACj1wAA
VHsAAEzNAACZmgAAJmYAAA9cAABQDQAAVDkAAdF0AAHRdAAB0XQAAAAAAAAAAHNmMzIA
AAAAAAEMQgAABd7///MmAAAHkwAA/ZD///ui///9owAAA9wAAMBu
</data>
<key>FontFamily</key>
<string>Menlo-Regular</string>
<key>FontSize</key>
<real>12</real>
<key>GeekletFrame</key>
<string>{{10, 35}, {220, 1000}}</string>
<key>HasShadow</key>
<false/>
<key>Identifier</key>
<string>org.tynsoe.geeklet.shell</string>
<key>Name</key>
<string>NotePlan Dashboard Calendar</string>
<key>PinToSpace</key>
<false/>
<key>RefreshInterval</key>
<integer>10</integer>
<key>RelativePosition</key>
<integer>1</integer>
<key>SetLocale</key>
<false/>
<key>StatusImagePosition</key>
<integer>1</integer>
<key>SuccessImage</key>
<data>
TU0AKgAABAj///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAGgAAACAAAAAaAAAA
DQAAAAAAAAAAAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAA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ABFsxYWVogAAAAAAAAb6AAADj1AAADkFhZWiAAAAAAAABilwAAt4cAABjZ
WFlaIAAAAAAAACSfAAAPhAAAtsNjdXJ2AAAAAAAAAAEBzQAAdmNndAAAAAAAAAABAAEA
AAAAAAAAAQAAAAEAAAAAAAAAAQAAAAEAAAAAAAAAAQAAbmRpbgAAAAAAAAA2AACj1wAA
VHsAAEzNAACZmgAAJmYAAA9cAABQDQAAVDkAAczOAAHMzgABzM4AAAAAAAAAAHNmMzIA
AAAAAAEMQgAABd7///MmAAAHkwAA/ZD///ui///9owAAA9wAAMBu
</data>
<key>TextColor</key>
<data>
BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
ZmZmAYNS/n8/g27/fz8Bhg==
</data>
<key>TextStrikethrough</key>
<integer>0</integer>
<key>TextUnderline</key>
<integer>0</integer>
</dict>
</plist>