-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDashboard Recent.glet
199 lines (190 loc) · 8.46 KB
/
Dashboard Recent.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
<?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 v4.5
# Changelog
# 4.5
# New: Added a Changelog
# New: Users can set customizable options for:
# Heading titles
# Recent files dot
# User directory
# Update: Reworked the headings to show/hide if there are find results
# Update: Reworked headings to show number of results
# Update: Added nicer formatting to headings and results
# Fix: Bug preventing all focus areas from getting displayed
# Fix: Cleaned up the code
#---add custom options---#
userDir='/Users/XXX/Library/Mobile\ Documents/iCloud\~co\~noteplan\~NotePlan/Documents/Notes'
titles='recent,waiting,old' # add customs titles, separate with a comma
dot='•' # custom dot for results
#---end custom options---#
#---add variables---#
IFS=',' read -r -a t <<< "$titles" # make an array for custom titles
IFS=',' read -r -a c <<< "$colors" # make an array for custom titles
format_heading=$(printf '\033[1;37;45m') # ansi formatting for headings
format_reset=$(printf '\033[0m') # reset ansi formatting
bullet='»' # bullet for headings
#---end variables---#
#---add recent---#
eval cd $userDir
# determine when files were last modified
mod_in_3=$(find *.txt -type f -mtime -3 | wc -l | sed -e 's/^[ \t]*//')
mod_3_to_30=$(find *.txt -type f -mtime -30 ! -mtime -3 | wc -l | sed -e 's/^[ \t]*//')
mod_over_30=$(find *.txt -type f ! -mtime -30 | wc -l | sed -e 's/^[ \t]*//')
# if there are files then display them, if not display nothing
if [[ $mod_in_3 ]]
then
IFS=$'\n'
echo "$format_heading $bullet ${t[0]} ($mod_in_3) $format_reset" | tr [a-z] [A-Z]
echo
for i in $(find *.txt -type f -mtime -3 | cut -d "." -f 1)
do
echo "$i" | sed -e 's/^/ '"$dot"' /'
done
echo
else
continue
fi
if [[ $mod_3_to_30 ]]
then
IFS=$'\n'
echo "$format_heading $bullet ${t[1]} ($mod_3_to_30) $format_reset" | tr [a-z] [A-Z]
echo
for i in $(find *.txt -type f -mtime -30 ! -mtime -3 | cut -d "." -f 1 )
do
echo "$i" | sed -e 's/^/ '"$dot"' /'
done
echo
else
continue
fi
if [[ $mod_over_30 ]]
then
IFS=$'\n'
echo "$format_heading $bullet ${t[2]} ($mod_over_30) $format_reset" | tr [a-z] [A-Z]
echo
for i in $(find *.txt -type f ! -mtime -30 | cut -d "." -f 1 )
do
echo "$i" | sed -e 's/^/ '"$dot"' /'
done
echo
else
continue
fi
#---end recent---#</string>
<key>DisplayID</key>
<integer>69992770</integer>
<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
AAAAAAAAAAQHAgJkSS0t9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j1wAA
VHsAAEzNAACZmgAAJmYAAA9cAABQDQAAVDkAAdF0AAHRdAAB0XQAAAAAAAAAAHNmMzIA
AAAAAAEMQgAABd7///MmAAAHkwAA/ZD///ui///9owAAA9wAAMBu
</data>
<key>FontFamily</key>
<string>Menlo-Regular</string>
<key>FontSize</key>
<real>12</real>
<key>GeekletFrame</key>
<string>{{240, 35}, {250, 1000}}</string>
<key>HasShadow</key>
<false/>
<key>Identifier</key>
<string>org.tynsoe.geeklet.shell</string>
<key>Name</key>
<string>NotePlan Dashboard Recent</string>
<key>RefreshInterval</key>
<integer>10</integer>
<key>SetLocale</key>
<true/>
<key>SuccessImage</key>
<data>
TU0AKgAABAj///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAGgAAACAAAAAaAAAA
DQAAAAAAAAAAAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAgBAQFYFhUWqygn
KOEvLi/9KCco4RYVFqsBAQFYAAAACAAAAAAAAAAAAAAAAP///wAAAAAAAAAAAAAAAAgG
AwZ8Pj0+8peYl//S0tP/4+Tl/9LS0/+XmJf/Pj0+8gYDBnwAAAAIAAAAAAAAAAD///8A
AAAAAAAAAAUDAQJlLTEt9HqRff+40Ln/1efT/9jo1f/V59P/uNG5/3qRff8tMS30AwEC
ZQAAAAUAAAAA////AAAAAAAAAAAmEBYQyz1tP/9Xm03/eLJX/4e6YP+HuWL/h7pg/3ix
V/9Wmk3/PWw//xAWEMsAAAAmAAAAAP///wAAAAAAAAAAThY8Gvc8jjD/TJwb/2CnHf9r
ryz/bLEv/2ywLP9iqR7/TJ4b/zyQMP8WPBr3AAAATQAAAAD///8AAAAAAQAIAGgeYRv/
VaUq/2WvIP91uzb/gsZI/4bIS/+DyEj/d743/2exIP9WqSr/HmIb/wAIAGcAAAAB////
AAAAAAgADABsJ3MY/3C6Nv9/xz3/kNNT/57dYv+i32f/n99k/5HWVP+AyD3/cr02/yd0
GP8ADQBsAAAACf///wAAAAAMAAYAY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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
DGRlc2MAAAEUAAAAdGNwcnQAAAGIAAAAI3d0cHQAAAGsAAAAFHJYWVoAAAHAAAAAFGdY
WVoAAAHUAAAAFGJYWVoAAAHoAAAAFHJUUkMAAAH8AAAADnZjZ3QAAAIMAAAAMG5kaW4A
AAI8AAAAPmNoYWQAAAJ8AAAALGJUUkMAAAH8AAAADmdUUkMAAAH8AAAADmRlc2MAAAAA
AAAAGkNhbGlicmF0ZWQgUkdCIENvbG9yc3BhY2UAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAdGV4dAAAAABDb3B5cmlnaHQgQXBwbGUgSW5jLiwgMjAxOAAAWFlaIAAAAAAA
APNRAAEAAAABFsxYWVogAAAAAAAAb6AAADj1AAADkFhZWiAAAAAAAABilwAAt4cAABjZ
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>