Sample Conky (system monitor) configuration file with weather, CPU graph, memory graph, network traffic graph and processes
Révision | 441eebb08656830f920473f17416ceb1178b556f (tree) |
---|---|
l'heure | 2020-08-13 16:38:19 |
Auteur | shitamo <shitamo@user...> |
Commiter | shitamo |
update
@@ -16,9 +16,13 @@ conky.config = { | ||
16 | 16 | out_to_console = false, |
17 | 17 | out_to_stderr = false, |
18 | 18 | extra_newline = false, |
19 | - own_window = true, | |
20 | 19 | own_window_class = 'Conky', |
20 | + own_window = true, | |
21 | 21 | own_window_type = 'override', |
22 | + own_window_transparent = no, | |
23 | + own_window_colour = '363047', | |
24 | + border_inner_margin = 0, | |
25 | + border_outer_margin = 0, | |
22 | 26 | stippled_borders = 0, |
23 | 27 | update_interval = 1.0, |
24 | 28 | uppercase = false, |
@@ -27,51 +31,26 @@ conky.config = { | ||
27 | 31 | show_graph_range = false, |
28 | 32 | imlib_cache_flush_interval = 30, |
29 | 33 | |
30 | - | |
31 | - | |
32 | 34 | alignment = 'top_right', |
33 | 35 | gap_y = 20, |
34 | 36 | double_buffer = true, |
35 | 37 | maximum_width = 400, |
36 | 38 | minimum_width = 400, minimum_height = 1200, |
37 | 39 | text_buffer_size = 1024, |
38 | - own_window_transparent = true, | |
39 | 40 | override_utf8_locale = true, |
40 | 41 | use_xft = true, |
41 | 42 | font = 'TakaoGothic:style=Regular:size=11', |
42 | 43 | |
43 | - template1 = '~/.cache/weather.xml', | |
44 | 44 | template2 = [[ |
45 | 45 | ${color #eae5e3}${top name \1} ${top pid \1} ${top cpu \1} ${top mem \1} ${top time \1}]], |
46 | - template3 = [[ | |
47 | -${execi 300 cp -f ~/.conky/icons/$(ruby -ne 'cnt ||= 0; $_.scan(/yweather:forecast.*?code="(.+?)"/) { cnt+=1; print $1 if cnt == \1; }' ${template1}).png ~/.cache/weather-\1.png}${image ~/.cache/weather-\1.png -p \2 -s 32x32}]], | |
48 | - template4 = [[ | |
49 | -${rss http://weather.livedoor.com/forecast/rss/warn/16.xml 60 item_title \1}]], | |
50 | - | |
46 | + template4 = '~/.cache/weather.txt', | |
51 | 47 | }; |
52 | 48 | |
53 | 49 | conky.text = [[ |
54 | -#pre_execは削除された模様 | |
55 | -# ${pre_exec /usr/sbin/smartctl --scan | awk '{print "/usr/sbin/hddtemp " $1 " -n -unit=C"}' > ~/.cache/hdddev.sh; chmod +x ~/.cache/hdddev.sh}\ | |
56 | -# https://weather.yahoo.com/japan/ -> Toyama Prefecture -> Toyama-shi | |
57 | -# https://weather.yahoo.com/japan/toyama-prefecture/toyama-shi-1118400/ | |
58 | -${execi 300 curl -s 'https://query.yahooapis.com/v1/public/yql' -d q='select * from weather.forecast where woeid=1118400 and u="c"' -o ${template1}} | |
59 | -\ | |
60 | -# Weather | |
61 | -\ | |
62 | -${goto 36}${voffset 0}${font mono:size=36}${color1}${execi 300 ruby -ne 'if /yweather:condition .*? temp="(.+?)"/ then printf("%s℃", $1 ); end' ${template1}}${font}${color} | |
63 | -${goto 46}${voffset 14}${font mono:size=12}${color1}${execi 300 ruby -ne 'if /yweather:condition .*? text="(.+?)"/ then print $1; end' ${template1}}${font}${color} | |
64 | -\ | |
65 | -${color1}${alignr 55}${voffset -72}${execi 300 ruby -ne 'if /yweather:atmosphere .*? pressure="(.+?)"/ then print $1; end' ${template1}}${execi 300 ruby -ne 'if /yweather:units .*? pressure="(.+?)"/ then print $1; end' ${template1}} | |
66 | -${color1}${alignr 55}${voffset 7}${execi 300 ruby -ne 'if /yweather:atmosphere .* humidity="(.+?)"/ then print $1; end' ${template1}}%${color} | |
67 | -${color1}${alignr 55}${voffset 7}${execi 300 ruby -ne 'if /yweather:wind .* speed="(.+?)"/ then print $1; end' ${template1}}${execi 300 ruby -ne 'if /yweather:units .*? speed="(.+?)"/ then print $1; end' ${template1}}${color} | |
68 | -\ | |
69 | -${color3}${voffset 30}${alignc}${execi 300 ruby -ne 'cnt ||= 0; $_.scan(/day="(.+?)"/){ if (cnt < 3) then cnt+=1; printf(" %s ", $1 ); end }' ${template1}}${color} | |
70 | -\ | |
71 | -${color2}${voffset 40}${alignc}${execi 300 ruby -ne 'cnt ||= 0; $_.scan(/high="(.+?)" low="(.+?)"/){ if (cnt < 3) then cnt+=1; printf("%3s℃/%3s℃ ", $1, $2); end }' ${template1}}${color} | |
72 | 50 | ${hr 2} |
73 | 51 | \ |
74 | 52 | ${color #d8e698}System information :${color #eae5e3} |
53 | + ${color #ffffff}System : ${alignr}${color #eae5e3}${kernel} | |
75 | 54 | ${color #ffffff}Uptime : ${alignr}${color #eae5e3}${uptime} |
76 | 55 | ${color #ffffff}Frequency(GHz): ${color #eae5e3}${freq_g} ${color #ffffff}Processes:${color #eae5e3} ${processes} |
77 | 56 | ${color #ffffff}CPU Usage : ${color #eae5e3}${cpu}% - ${cpubar 5} |
@@ -80,31 +59,27 @@ ${color #d8e698}System information :${color #eae5e3} | ||
80 | 59 | ${color #d8e698}${stippled_hr} |
81 | 60 | ${color #d8e698}Device temperature :${color #eae5e3} |
82 | 61 | ${execi 58 ~/.cache/hdddev.sh > ~/.cache/hddtemp.txt}\ |
83 | -${color #ffffff} CPU0:${color #eae5e3}${execi 60 sensors | grep -A 0 'Core0' | cut -c 14-22} ${color #ffffff}HDD1: ${color #eae5e3}${execi 60 sed -e '1!d' ~/.cache/hddtemp.txt}.0℃ | |
84 | -${color #ffffff} CPU1:${color #eae5e3}${execi 60 sensors | grep -A 0 'Core1' | cut -c 14-22} ${color #ffffff}HDD2: ${color #eae5e3}${execi 60 sed -e '2!d' ~/.cache/hddtemp.txt}.0℃ | |
85 | -${color #ffffff} M/B :${color #eae5e3}${execi 60 sensors | grep -A 0 'MB' | cut -c 25-33} ${color #ffffff}HDD3: ${color #eae5e3}${execi 60 sed -e '3!d' ~/.cache/hddtemp.txt}.0℃ | |
86 | -${color #d8e698}${stippled_hr} | |
87 | -${color #d8e698}Weather report :${color #eae5e3} | |
88 | - 富山空港 ${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ RJNT weather } ${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ RJNT temperature} ℃ | |
62 | +${color #ffffff} CPU:${color #eae5e3}${execi 60 sensors k10temp-pci-00c3 | grep -A 0 'Tdie' | cut -c 14-22} | |
63 | +${color #ffffff} HDD1: ${color #eae5e3}${execi 60 sed -e '1!d' ~/.cache/hddtemp.txt}.0℃ | |
64 | +${color #ffffff} HDD2: ${color #eae5e3}${execi 60 sed -e '2!d' ~/.cache/hddtemp.txt}.0℃ | |
65 | +${color #ffffff} HDD3: ${color #eae5e3}${execi 60 sed -e '3!d' ~/.cache/hddtemp.txt}.0℃ | |
66 | +${color #ffffff} HDD4: ${color #eae5e3}${execi 60 sed -e '4!d' ~/.cache/hddtemp.txt}.0℃ | |
89 | 67 | ${color #d8e698}${stippled_hr} |
90 | -${color #d8e698}Storm warning :${color #eae5e3} | |
91 | - ${template4 1} | |
92 | - ${template4 2} | |
93 | - ${template4 3} | |
94 | - ${template4 4} | |
95 | - ${template4 5} | |
68 | +${color #d8e698}天気予報 :${color #eae5e3} | |
69 | +${font mono:size=9}${execi 3600 cat ${template4}}${font} | |
96 | 70 | ${color #d8e698}${stippled_hr} |
97 | 71 | ${color #d8e698}File systems : ${color #eae5e3} |
98 | 72 | / ${fs_used /}/${fs_size /} ${fs_bar 5 /} |
99 | - /var/backups ${fs_used /var/backups}/${fs_size /var/backups} ${fs_bar 5 /var/backups} | |
73 | + /home ${fs_used /home}/${fs_size /home} ${fs_bar 5 /home} | |
74 | + /var/www/text ${fs_used /var/www/text}/${fs_size /var/www/text} ${fs_bar 5 /var/www/text} | |
100 | 75 | ${color #d8e698}${stippled_hr}${color #eae5e3} |
101 | 76 | ${color #d8e698}Disk IO : ${color #eae5e3} |
102 | - / Read ${execpi 3600 mount | grep " / " | awk '{print "${diskio_read " $1 "}"}'}/s | |
103 | - / Write ${execpi 3600 mount | grep " / " | awk '{print "${diskio_write " $1 "}"}'}/s | |
77 | + /home Read ${execpi 3600 mount | grep " /home " | awk '{print "${diskio_read " $1 "}"}'}/s | |
78 | + /home Write ${execpi 3600 mount | grep " /home " | awk '{print "${diskio_write " $1 "}"}'}/s | |
104 | 79 | ${color #ffffff}\ |
105 | -${execpi 3600 mount | grep " / " | awk '{print "${diskiograph_read " $1 " 20,190 fef4f4 eebbcb}"}'}\ | |
80 | +${execpi 3600 mount | grep " /home " | awk '{print "${diskiograph_read " $1 " 20,190 fef4f4 eebbcb}"}'}\ | |
106 | 81 | ${alignr}${color #ffffff}\ |
107 | -${execpi 3600 mount | grep " / " | awk '{print "${diskiograph_write " $1 " 20,190 fef4f4 eebbcb}"}'} | |
82 | +${execpi 3600 mount | grep " /home " | awk '{print "${diskiograph_write " $1 " 20,190 fef4f4 eebbcb}"}'} | |
108 | 83 | ${color #d8e698}${stippled_hr} |
109 | 84 | ${color #d8e698}Name PID CPU% MEM% TIME |
110 | 85 | ${template2 1} |
@@ -114,20 +89,11 @@ ${color #d8e698}Name PID CPU% MEM% TIME | ||
114 | 89 | ${template2 5} |
115 | 90 | ${color #d8e698}${stippled_hr} |
116 | 91 | ${color #d8e698}Networking : |
117 | - ${color #ffffff}Up size : ${color #eae5e3}${totalup} | |
118 | - ${color #ffffff}Down size : ${color #eae5e3}${totaldown} | |
119 | - ${color #ffffff}Up speed : ${color #eae5e3}${upspeed eth0} | |
120 | - ${color #ffffff}Down speed : ${color #eae5e3}${downspeed eth0} | |
92 | + ${color #ffffff}Up size : ${color #eae5e3}${totalup enp3s0} | |
93 | + ${color #ffffff}Down size : ${color #eae5e3}${totaldown enp3s0} | |
94 | + ${color #ffffff}Up speed : ${color #eae5e3}${upspeed enp3s0} | |
95 | + ${color #ffffff}Down speed : ${color #eae5e3}${downspeed enp3s0} | |
121 | 96 | ${color #d8e698}${stippled_hr} |
122 | 97 | ${font mono:size=9}${execi 60 gcal -i -H no . |sed -e "1,5d" -e "6,$ s/^\(.\{21\}\).\{26\}/\1/"} |
123 | -# ${color #d8e698}${stippled_hr} | |
124 | 98 | ${font mono:size=12}${execi 60 gcal -i | sed -e "1d" } |
125 | -# Various images including the icons of the forecast # | |
126 | -\ | |
127 | -${image ~/.conky/images/pressure.png -p 350,24 -s 16x16}\ | |
128 | -${image ~/.conky/images/humidity.png -p 350,46 -s 16x16}\ | |
129 | -${image ~/.conky/images/wind.png -p 350,68 -s 16x16}\ | |
130 | -${template3 1 84,130}\ | |
131 | -${template3 2 183,130}\ | |
132 | -${template3 3 277,130}${font} | |
133 | 99 | ]]; |