-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAP-Weather-Orange-Red.conkyrc
277 lines (244 loc) · 8.84 KB
/
AP-Weather-Orange-Red.conkyrc
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
--[[
#=====================================================================================
#
# Date : 07/10/2017
# Author : Adhi Pambudi - https://plus.google.com/u/0/+AdhiPambudi
# Editor : Erik Dubois
# Version : v3.0.3
# License : Distributed under the terms of GNU GPL version 2 or later
#=====================================================================================
# CONKY
# For commands in conky.config section:
# http://conky.sourceforge.net/config_settings.html
#
# For commands in conky.text section:
# http://conky.sourceforge.net/variables.html
#
# A PDF with all variables is provided
#=====================================================================================
# FONTS
# To avoid copyright infringements you will have to download
# and install the fonts yourself sometimes.
#=====================================================================================
# GENERAL INFO ABOUT FONTS
# Go and look for a nice font on sites like http://www.dafont.com/
# Download and unzip - double click the font to install it (font-manager must be installed)
# No font-manager then put fonts in ~/.fonts
# Change the font name in the conky
# The name can be known with a command in the terminal: fc-list | grep "part of name"
# Change width and height of the conky according to font
# Reboot your system or fc-cache -fv in terminal
# Enjoy
#=====================================================================================
# FONTS FOR THIS CONKY
# no extra font(s) needed
#======================================================================================
#
# Readme from Adhi Pambudi
#
# These conky configs tested in ArchMerge (Conky version 1.10)
# How to use
# edit one of the conky files that you want to use, replace the variables.
# to get an API Key, first you have to sign up here https://openweathermap.org/appid
# find your city id here http://openweathermap.org/help/city_list.txt
# after you replace those variables with your own, save.
# open the conky chooser, tick your edited conkyrc, then press OK.
# Credits
#1. zagortenay333 for Jelly Conky
#2. Kestrel8891 for BARS Conky
#3. aresgon for Workspace Indicator Conky
#4. Classic Crunchbang Conky (I can't find who wrote that code)
#======================================================================================
]]
conky.config = {
-------------------------------------
-- Generic Settings
-------------------------------------
background=true,
update_interval=1,
double_buffer=true,
no_buffers=true,
imlib_cache_size=10,
draw_shades=false,
draw_outline=false,
draw_borders=false,
use_xft = true,
font = 'Roboto:size=11',
total_run_times = 0,
mpd_port = 6600,
-------------------------------------
-- Window Specifications
-------------------------------------
gap_x=15,
gap_y=50,
minimum_height=700,
minimum_width=200,
alignment = 'top_right',
own_window=true,
own_window_type="normal",
own_window_transparent=false,
own_window_hints="undecorated,below,sticky,skip_taskbar,skip_pager",
own_window_class = 'Conky',
own_window_argb_visual=true,
own_window_argb_value=100,
double_buffer = true,
draw_shades = false,
default_shade_color = '#000000',
draw_borders = false,
border_width = 0,
-------------------------------------
-- Text Settings
-------------------------------------
use_xft=true,
xftalpha=1,
font="Droid Sans:size=10",
text_buffer_size=256,
override_utf8_locale=true,
draw_graph_borders = false,
draw_outline = false,
default_outline_color = '#828282',
no_buffers = true,
uppercase = false,
cpu_avg_samples = 4,
pad_percents = 2,
-------------------------------------
-- Color Scheme
-------------------------------------
default_color="ffffff",
color0="FE4515", -- red
color1="a8adb5", -- grey
color2="ffffff", -- white
-------------------------------------
-- Icon Sources
-------------------------------------
template0="~/.config/conky/images/weather-icons/64px-orange-red",
-------------------------------------
-- API Key
-- To get API Key, first you have to sign up here https://openweathermap.org/appid
-------------------------------------
template6="637d149a43ee9c94d3a683911986c2f7",
-------------------------------------
-- City ID
-- Find your City ID here http://openweathermap.org/help/city_list.txt
-------------------------------------
template7="2803138",
-------------------------------------
-- Temp Unit (default, metric, imperial)
-------------------------------------
template8="metric",
-------------------------------------
-- Locale (e.g. "es_ES.UTF-8")
-- Leave empty for default
-------------------------------------
template9=""
}
-------------------------------------
-------------------------------------
conky.text = [[
\
\
# Here is code I have taken from Jelly Conky from zagortenay333
#${image ~/.path-to-image -p 0,0 -s 200x700}
${execi 300 l=${template9}; l=${l%%_*}; curl -s "api.openweathermap.org/data/2.5/forecast/daily?APPID=${template6}&id=${template7}&cnt=5&units=${template8}&lang=$l" -o ~/.cache/forecast.json}\
${execi 300 l=${template9}; l=${l%%_*}; curl -s "api.openweathermap.org/data/2.5/weather?APPID=${template6}&id=${template7}&cnt=5&units=${template8}&lang=$l" -o ~/.cache/weather.json}\
\
\
\
\
${font Roboto :size=64}${color0}\
${time %H}\
\
\
\
\
${font Roboto :size=52}${color1}:\
\
\
\
\
${font Roboto :size=40}${color1}\
${time %M}${font}${color}
\
\
\
\
${font Roboto :size=12}${color1} ${voffset 12}${execi 300 LANG=${template9} LC_TIME=${template9} date +"%A"},${color}\
${font Roboto :size=20}${color0} ${execi 300 LANG=${template9} LC_TIME=${template9} date +"%d"}${color}\
${font Roboto :size=12}${color1} ${execi 300 LANG=${template9} LC_TIME=${template9} date +"%B"}${font}${color}
\
\
\
\
${font Roboto :size=24}${color0}\
${voffset 5}\
$alignr${execi 300 jq ".main.temp" ~/.cache/weather.json | awk '{print int($1+0.5)}' # round num}°${font}${color}
\
\
\
\
${font Roboto :size=12}\
${voffset 5}\
$alignr${color1}${execi 300 jq ".list[0].temp.min" ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}° ${color}| \
${color1}${execi 300 jq ".list[0].temp.max" ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°${font}${color}
\
\
\
\
${font Roboto :size=14}${color1}\
${voffset 5}\
${execi 300 jq -r ".weather[0].description" ~/.cache/weather.json}${font}${color}
\
\
\
\
${execi 300 cp -f ${template0}/$(jq .weather[0].id ~/.cache/weather.json).png ~/.cache/current.png}${image ~/.cache/current.png -p 0,120 -s 64x64}
\
${font Roboto :size=14}${color1}\
${voffset -10}\
${execi 300 jq -r ".name" ~/.cache/weather.json}${font}${color}
# Here is end of code I have taken from Jelly Conky from zagortenay333
\
${color2}
${alignc}S Y S T E M I N F O
${hr}
# Here is code I have taken from BARS Conky Vertical by Kestrel8891
$alignr${color1}${font Roboto:pixelsize=12}${cpu cpu0} % CPU${font}
${color0}${cpubar cpu0}
$alignr${color1}${font Roboto:pixelsize=12}${voffset 12}${mem} / ${memperc} % RAM${font}
${color0}${membar}
$alignr${color1}${font Roboto:pixelsize=12}${voffset 12}${fs_free /} / ${fs_free_perc /} % HDD${font}
${color0}${fs_bar /}
#$alignr${color1}${font Roboto:pixelsize=10}${voffset 10}${kernel} ${machine}${font}
$alignr${color1}${font Roboto:pixelsize=12}${voffset 10}${uptime} UPTIME${font}
# Here is end of code I have taken from BARS Conky Vertical by Kestrel8891
# And now classic conky
# ${color0}Host:$alignr${color1}$nodename
# ${color0}Uptime:$alignr${color1}$uptime
# ${color0}RAM:$alignr${color1}$mem/$memmax
# ${color0}Swap usage:$alignr${color1}$swap/$swapmax
# ${color0}Disk usage:$alignr${color1}${fs_used /}/${fs_size /}
# ${color0}CPU usage:$alignr${color1}${cpu cpu0}%
${font Roboto:pixelsize=14}${color2}\
${alignc}S H O R T C U T K E Y S
${hr}
${color0}Alt+F2$alignr${color1} Run Dialog
${color0}Alt+F3$alignr${color1} Alt Menu
${color0}Super+Space$alignr${color1} Main Menu
${color0}Super+Tab$alignr${color1} Client Menu
${color0}Super+t$alignr${color1} Terminal
${color0}Super+f$alignr${color1} File Manager
${color0}Super+e$alignr${color1} Editor
${color0}Super+m$alignr${color1} Media Player
${color0}Super+w$alignr${color1} Web Browser
${color0}Super+h$alignr${color1} Task Manager
${color0}Super+l$alignr${color1} Lock Screen
${color0}Super+v$alignr${color1} Volume Control
${color0}Super+x$alignr${color1} Logout
${color0}PrtSc$alignr${color1} Screenshot
# End of classic conky
# Here is code I have taken from Workspace Indicator by from aresgon
${goto 100}${font Droid Sans :size=25}${if_match ${desktop}==1}${color0}${endif}•${color1}${offset 10}${if_match ${desktop}==2}${color0}${endif}•${color1}${offset 10}${if_match ${desktop}==3}${color0}${endif}•${color1}${offset 10}${if_match ${desktop}==4}${color0}${endif}•${color1}${font}
# Here is end of code I have taken from Workspace Indicator by from aresgon
${hr}
${execi 6000 lsb_release -d | grep 'Descr'|awk {'print $2 " " $3" " $4" " $5'}}${alignr}${execi 6000 lsb_release -a | grep 'Release'|awk {'print $2""$3""$4""$5'}}${color}
]]