aboutsummaryrefslogtreecommitdiff
path: root/TMV/.conkyrc
blob: 71a158400d773f0f78a7da4b9f65f87c2457a5bb (plain)
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
conky.config = {

font = 'Roboto:size=11:bold',
background = true,
cpu_avg_samples = 2,
diskio_avg_samples = 10,
double_buffer = true,
if_up_strictness = 'address',
net_avg_samples = 2,
no_buffers = true,
temperature_unit = 'celsius',
text_buffer_size = 2048,
update_interval = 1,
imlib_cache_size = 0,
alignment = 'middle_right',
gap_x = 20,
gap_y = 0,
minimum_height = 600,
minimum_width = 240,
maximum_width = 260,
border_inner_margin = 10,
border_outer_margin = 1,
border_width = 1,
default_bar_width = 250,
default_bar_height = 10,
default_gauge_height = 25,
default_gauge_width = 40,
default_graph_height = 40,
default_graph_width = 153,
default_shade_color = '#000000',
default_outline_color = '#000000',
draw_borders = true,
draw_graph_borders = true,
draw_shades = false,
draw_outline = false,
stippled_borders = 0,
extra_newline = false,
format_human_readable = true,
max_text_width = 0,
max_user_text = 16384,
override_utf8_locale = true,
short_units = true,
top_name_width = 21,
top_name_verbose = false,
uppercase = false,
use_spacer = 'none',
use_xft = true,
xftalpha = 1,
own_window = true,
own_window_argb_value =230,
own_window_argb_visual = true,
own_window_class = 'Conky',
own_window_hints = 'undecorated,below,above,sticky,skip_taskbar,skip_pager',
own_window_transparent = false,
own_window_title = 'system_conky',
own_window_type = 'normal',

-- CONKYMATIC VARIABLES -------------------------------------------------------------

color0 = '#6C2E8B', -- Time
color1 = '#3D2D83', -- Date
color2 = '#C583B6', -- Weather
color3 = '#C583B6', -- Headings
color4 = '#972E73', -- Sub-headings
color5 = '#6C2D7A', -- Text (extra. Not used in default template)
color6 = '#6C2E8B', -- Data values
color7 = '#231C51', -- Horizontal rules
color8 = '#31276E', -- Data bars, normal state
color9 = '#fc1b0f', -- Data bars, warning state
default_color = '#972E73', -- Window border
own_window_colour = '#040217', -- Window background color

};

conky.text = [[
#
# -----------------------------------------------------------------------------------------
#
# EXECUTE EXTERNAL SCRIPTS
#
# DOWNLOAD AND CACHE WEATHER DATA FROM YAHOO EVERY 5 MINUTES
#${execi 300 curl -f -s -S -k "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22paris%2C%20france%22)%20and%20u%3D%22c%22&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" -o ./Cache/weather.json}\
#
# COPY AND CACHE THE CURRENT WEATHER AND FORECAST ICONS
#${execi 300 cp -f ./Weather-Icons-PNG/$(jq .query.results.channel.item.condition.code ./Cache/weather.json   | grep -oP '"\K[^"\047]+(?=["\047])').png ./Cache/weather.png}\
#${execi 300 cp -f ./Weather-Icons-PNG/$(jq .query.results.channel.item.forecast[1].code ./Cache/weather.json | grep -oP '"\K[^"\047]+(?=["\047])').png ./Cache/forecast1.png}\
#${execi 300 cp -f ./Weather-Icons-PNG/$(jq .query.results.channel.item.forecast[2].code ./Cache/weather.json | grep -oP '"\K[^"\047]+(?=["\047])').png ./Cache/forecast2.png}\
#${execi 300 cp -f ./Weather-Icons-PNG/$(jq .query.results.channel.item.forecast[3].code ./Cache/weather.json | grep -oP '"\K[^"\047]+(?=["\047])').png ./Cache/forecast3.png}\
#${execi 300 cp -f ./Weather-Icons-PNG/$(jq .query.results.channel.item.forecast[4].code ./Cache/weather.json | grep -oP '"\K[^"\047]+(?=["\047])').png ./Cache/forecast4.png}\
#${execi 300 cp -f ./Weather-Icons-PNG/$(jq .query.results.channel.item.forecast[5].code ./Cache/weather.json | grep -oP '"\K[^"\047]+(?=["\047])').png ./Cache/forecast5.png}\
#
# -----------------------------------------------------------------------------------------
#
# CURRENT TIME
${font Roboto:size=24}${color0}${alignc}${voffset -4}\
${time %H:%M:%S}\
${font}${color}
#
# CURRENT DATE
${font Roboto:size=13}${alignc}${voffset 2}${color1}\
${time %B %d, %Y}\
${font}${color}
#
# HORIZONTAL RULE
${color7}${hr 2}
#
# -----------------------------------------------------------------------------------------
#
# SUNRISE AND SUNSET
#${font Roboto:size=11:weight:bold}${color3}${alignc}\
#SUNRISE       SUNSET
#${color}\
#${voffset 1}${alignc}${color2} \
# Use Awk to capitalize AM/PM
#${execi 300 jq -r .query.results.channel.astronomy.sunrise ./Cache/weather.json | awk '{ print toupper($0) }'}      \
#${execi 300 jq -r .query.results.channel.astronomy.sunset  ./Cache/weather.json | awk '{ print toupper($0) }'}\
#${font}${color}
#
# -----------------------------------------------------------------------------------------
#
# HORIZONTAL RULE
#${voffset -2}${color7}${hr 2}
#
# -----------------------------------------------------------------------------------------
#
# CURRENT TEMPERATURE
#${font Roboto:size=20}${color2}${voffset 0}${offset 55}\
#${execi 300 jq .query.results.channel.item.condition.temp ./Cache/weather.json | grep -oP '"\K[^"\047]+(?=["\047])' #remove quotes}°\
#${font}${color}
#
# CURRENT WEATHER ICON
# The icon gets pulled from from the cache file
#${image ./Cache/weather.png -p 147,120 -s 56x56}
#
# HIGH AND LOW TEMPERATURE DATA
# Data gets pulled from the json file. We use awk to round the number
#${font Roboto:size=10:weight:bold}${color2}${voffset -18}${offset 45}\
#${execi 300 jq -r .query.results.channel.item.forecast[0].low ./Cache/weather.json  | awk '{print int($1+0.5)}' # round num}°  |  \
#${execi 300 jq -r .query.results.channel.item.forecast[0].high ./Cache/weather.json | awk '{print int($1+0.5)}' # round num}°\
#${font}${color}
#
# WEATHER DESCRIPTION
# Data gets pulled from json file. We use awk to capitalize each word.
#${font Roboto:size=14}${alignc}${color2}${voffset 0}\
#${execi 300 jq -r .query.results.channel.item.condition.text ./Cache/weather.json | sed -e "s/\b\(.\)/\u\1/g"}\
#${font}${color}
#
# CITY NAME
# Data gets pulled from json file.
#${font Roboto:size=10:weight:bold}${alignc}${color2}${voffset 2}\
#${execi 300 jq -r .query.results.channel.location.city ./Cache/weather.json},\
#${execi 300 jq -r .query.results.channel.location.region ./Cache/weather.json}  \
#
#LONGITUDE AND LATITUDE
# Round the longitude and latitude values up
#${execi 300 jq -r .query.results.channel.item.lat ./Cache/weather.json  | awk '{print int($1+0.5)}' # round num} N  \
#${execi 30 jq -r .query.results.channel.item.long ./Cache/weather.json | awk '{print int($1+0.5)}' # round num} W    \
#${font}${color}
#
# -----------------------------------------------------------------------------------------
#
# HORIZONTAL RULE
#${voffset 0}${color7}${hr 2}
#
# -----------------------------------------------------------------------------------------
#
# WEATHER FORECAST ICONS
#${image ./Cache/forecast1.png -p 6,236 -s 35x35}\
#${image ./Cache/forecast2.png -p 56,236 -s 35x35}\
#${image ./Cache/forecast3.png -p 104,236 -s 35x35}\
#${image ./Cache/forecast4.png -p 152,236 -s 35x35}\
#${image ./Cache/forecast5.png -p 200,236 -s 35x35}\
#
# 5 DAY FORECAST TEMPERATURES
# Data gets pulled from the forecast json file. We use awk to round the number
#${font SourceSansPro:size=11:weight:bold}${color2}\
#${voffset 33}\
#${goto 27}${execi  300 jq -r .query.results.channel.item.forecast[1].high ./Cache/weather.json | awk '{print int($1+0.5)}' # round num}°\
#${goto 76}${execi  300 jq -r .query.results.channel.item.forecast[2].high ./Cache/weather.json | awk '{print int($1+0.5)}' # round num}°\
#${goto 124}${execi 300 jq -r .query.results.channel.item.forecast[3].high ./Cache/weather.json | awk '{print int($1+0.5)}' # round num}°\
#${goto 172}${execi 300 jq -r .query.results.channel.item.forecast[4].high ./Cache/weather.json | awk '{print int($1+0.5)}' # round num}°\
#${goto 222}${execi 300 jq -r .query.results.channel.item.forecast[5].high ./Cache/weather.json | awk '{print int($1+0.5)}' # round num}°\
#${font}${color}
#
# WEEKDAY NAMES
#${font SourceSansPro-:size=11:weight:bold}${color2}\
#${voffset -2}\
#${goto 25}${execi  300 jq -r  .query.results.channel.item.forecast[1].day ./Cache/weather.json }\
#${goto 71}${execi  300 jq -r  .query.results.channel.item.forecast[2].day ./Cache/weather.json }\
#${goto 122}${execi 300 jq -r  .query.results.channel.item.forecast[3].day ./Cache/weather.json }\
#${goto 168}${execi 300 jq -r  .query.results.channel.item.forecast[4].day ./Cache/weather.json }\
#${goto 217}${execi 300 jq -r  .query.results.channel.item.forecast[5].day ./Cache/weather.json }\
#${font}${color}
#
# -----------------------------------------------------------------------------------------
#
# HORIZONTAL RULE
#${voffset -5}${color7}${hr 2}
#
# -----------------------------------------------------------------------------------------
########################## REAL BEGINNING #########################
# BATTERY STATUS BAR
# Note: If the battery level drops below 20% it changes to red
${font Roboto:size=11:weight:bold} \
${if_match ${battery_percent} < 20}${color9}\
${battery_bar 10,134 BAT0}    ${color3}BAT${alignr}${color9}${battery_percent}%\
${else}${color8}\
${battery_bar 10,134 BAT0}   ${color3}BAT  ${alignr}${color6}${battery_percent}%\
${endif}\
${font}
#
# CPU BAR
# Note: If greater than 80% of the CPU is being used it turns red
${font Roboto:size=11:weight:bold}${color8} \
${cpubar cpu0 10,134}   \
${color3}CPU${alignr}\
${color6}${cpu cpu0}% \
${font}
#
# RAM BAR
${font Roboto:size=11:weight:bold}${color8} \
${membar 10,134}   \
${color3}RAM${alignr}${color6}\
${memperc}% \
${font}
#
# -----------------------------------------------------------------------------------------
#
# HORIZONTAL RULE
${voffset -5}${color7}${hr 2}
#
# -----------------------------------------------------------------------------------------
#
# CPU TEMP
${color3} CPU ${alignr}${color}${color6}${execi 10 sensors | grep 'Core 0' | awk {'print $3'}}
#
# CPU GRAPH
${voffset 5}${alignc}${color6}${cpugraph 0 15,235 0 0 -l} \
${font}${color}
#
# -----------------------------------------------------------------------------------------
#
# HORIZONTAL RULE
${voffset -2}${color7}${hr 2}
#
# -----------------------------------------------------------------------------------------
#
# Used and free space on root and home
${voffset -2}${font Roboto:size=11:weight:bold}\
${color3}R: ${fs_used /root} Used ${alignr}${color6}${fs_free /root} Free
${color3}H: ${fs_used /home} Used ${alignr}${color6}${fs_free /home} Free\
${font}${color}
#
# -----------------------------------------------------------------------------------------
#
# HORIZONTAL RULE
${voffset -2}${color7}${hr 2}
#
# -----------------------------------------------------------------------------------------
#
# UPTIME AND TOTAL NUMBER OF PROCESSES
${voffset -2}${font Roboto:size=11:weight:bold}${color3}\
 Uptime ${alignr}${color6} $uptime_short ${color3}
 Processes${alignr}${color6}${processes}
#
# -----------------------------------------------------------------------------------------
#
# HORIZONTAL RULE
${color7}${hr 2}
#
# -----------------------------------------------------------------------------------------
#
# CPU USAGE
# Top 6 processes
${voffset -2}${font Roboto:size=11:weight:bold}${color3}\
 CPU${alignr}${color6}Intel i7
 ${color4}${top name 1}${alignr}${color6}${top cpu 1}%
 ${color4}${top name 2}${alignr}${color6}${top cpu 2}%
 ${color4}${top name 3}${alignr}${color6}${top cpu 3}%
 ${color4}${top name 4}${alignr}${color6}${top cpu 4}%
 ${color4}${top name 5}${alignr}${color6}${top cpu 5}%
 ${color4}${top name 6}${alignr}${color6}${top cpu 6}% \
${font}${color}
#
# -----------------------------------------------------------------------------------------
#
# HORIZONTAL RULE
${voffset -2}${color7}${hr 2}
#
# -----------------------------------------------------------------------------------------
#
# MEMORY USAGE
# Top 6 applications
${voffset -2}${font Roboto:size=11:weight:bold}\
 ${color3}Memory${alignr}${color6}${memmax}
 ${color4}${top_mem name 1}${alignr}${alignr}${color6}${top_mem mem 1}%
 ${color4}${top_mem name 2}${alignr}${alignr}${color6}${top_mem mem 2}%
 ${color4}${top_mem name 3}${alignr}${alignr}${color6}${top_mem mem 3}%
 ${color4}${top_mem name 4}${alignr}${alignr}${color6}${top_mem mem 4}%
 ${color4}${top_mem name 5}${alignr}${alignr}${color6}${top_mem mem 5}%
 ${color4}${top_mem name 6}${alignr}${alignr}${color6}${top_mem mem 6}%
 ${color3}Total Used${alignr}${color6}${mem} \
${font}${color}
#
# -----------------------------------------------------------------------------------------
#
# HORIZONTAL RULE
${voffset -2}${color7}${hr 2}
#
# -----------------------------------------------------------------------------------------
#
# PACKAGE UPDATES
${font Roboto:size=11:weight:bold}${color3} \
Package Updates${alignr}${color6}${execi 1800 xbps-install -un | wc -l} \
${font}${color}
#
# -----------------------------------------------------------------------------------------
#
# COLOR PALETTE IMAGE
# Note: Vertical offset controls the space UNDER the image.
#${voffset -25}${image ./Cache/colorpalette.png -p 13,870}\
]]