• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

Sample Conky (system monitor) configuration file with weather, CPU graph, memory graph, network traffic graph and processes


Commit MetaInfo

Revisioneabc1698870672bc32cabe98a6ad77c85bc1b2e9 (tree)
Zeit2015-07-03 00:03:08
Autorshitamo <shitamo@user...>
Commitershitamo

Log Message

Conky 1.10.0 introduces a new Lua-based configuration format

Ändern Zusammenfassung

Diff

--- a/conkyrc
+++ b/conkyrc
@@ -1,76 +1,58 @@
1-# Conky, a system monitor, based on torsmo
2-#
3-# Any original torsmo code is licensed under the BSD license
4-#
5-# All code written since the fork of torsmo is licensed under the GPL
6-#
7-# Please see COPYING for details
8-#
9-# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
10-# Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
11-# All rights reserved.
12-#
13-# This program is free software: you can redistribute it and/or modify
14-# it under the terms of the GNU General Public License as published by
15-# the Free Software Foundation, either version 3 of the License, or
16-# (at your option) any later version.
17-#
18-# This program is distributed in the hope that it will be useful,
19-# but WITHOUT ANY WARRANTY; without even the implied warranty of
20-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21-# GNU General Public License for more details.
22-# You should have received a copy of the GNU General Public License
23-# along with this program. If not, see <http://www.gnu.org/licenses/>.
24-#
1+conky.config = {
2+ background = true,
3+ border_width = 1,
4+ cpu_avg_samples = 2,
5+ default_color = 'white',
6+ default_outline_color = 'white',
7+ default_shade_color = 'white',
8+ draw_borders = false,
9+ draw_graph_borders = true,
10+ draw_outline = false,
11+ draw_shades = false,
12+ use_xft = true,
13+ minimum_width = 5, minimum_height = 5,
14+ net_avg_samples = 2,
15+ no_buffers = true,
16+ out_to_console = false,
17+ out_to_stderr = false,
18+ extra_newline = false,
19+ own_window = true,
20+ own_window_class = 'Conky',
21+ own_window_type = 'override',
22+ stippled_borders = 0,
23+ update_interval = 1.0,
24+ uppercase = false,
25+ use_spacer = 'none',
26+ show_graph_scale = false,
27+ show_graph_range = false,
28+ imlib_cache_flush_interval = 30,
2529
26-background yes
27-border_width 1
28-cpu_avg_samples 2
29-default_color white
30-default_outline_color white
31-default_shade_color white
32-draw_borders no
33-draw_graph_borders yes
34-draw_outline no
35-draw_shades no
36-use_xft yes
37-minimum_size 5 5
38-net_avg_samples 2
39-no_buffers yes
40-out_to_console no
41-out_to_stderr no
42-extra_newline no
43-own_window yes
44-own_window_class Conky
45-own_window_type override
46-stippled_borders 0
47-update_interval 1.0
48-uppercase no
49-use_spacer none
50-show_graph_scale no
51-show_graph_range no
52-imlib_cache_flush_interval 30
5330
5431
32+ alignment = 'top_right',
33+ gap_y = 20,
34+ double_buffer = true,
35+ maximum_width = 400,
36+ minimum_width = 400, minimum_height = 1200,
37+ text_buffer_size = 1024,
38+ own_window_transparent = true,
39+ override_utf8_locale = true,
40+ use_xft = true,
41+ font = 'TakaoGothic:style=Regular:size=11',
5542
56-alignment top_right
57-gap_y 20
58-double_buffer yes
59-maximum_width 400
60-minimum_size 400 1200
61-text_buffer_size 1024
62-own_window_transparent yes
63-override_utf8_locale yes
64-use_xft yes
65-xftfont TakaoGothic:style=Regular:size=11
43+ template1 = '~/.cache/weather.xml',
44+ template2 = [[
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; if /yweather:forecast.*code="(.+?)"/ then cnt+=1; print $1 if cnt == \1; end' ${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}]],
6650
67-template1 ~/.cache/weather.xml
68-template2 ${color \\#eae5e3}${top name \1} ${top pid \1} ${top cpu \1} ${top mem \1} ${top time \1}
69-template3 ${execi 300 cp -f ~/.conky/icons/$(ruby -ne 'cnt ||= 0; if /yweather:forecast.*code="(.+?)"/ then cnt+=1; print $1 if cnt == \1; end' ${template1}).png ~/.cache/weather-\1.png}${image ~/.cache/weather-\1.png -p \2 -s 32x32}
70-template4 ${rss http://weather.livedoor.com/forecast/rss/warn/16.xml 60 item_title \1}
51+};
7152
72-TEXT
73-${pre_exec /usr/sbin/smartctl --scan | awk '{print "/usr/sbin/hddtemp " $1 " -n -unit=C"}' > ~/.cache/hdddev.sh; chmod +x ~/.cache/hdddev.sh}\
53+conky.text = [[
54+#pre_execは削除された模様
55+${execi 3600 /usr/sbin/smartctl --scan | awk '{print "/usr/sbin/hddtemp " $1 " -n -unit=C"}' > ~/.cache/hdddev.sh; chmod +x ~/.cache/hdddev.sh}\
7456 # https://weather.yahoo.com/japan/ -> Toyama Prefecture -> Toyama-shi
7557 # https://weather.yahoo.com/japan/toyama-prefecture/toyama-shi-1118400/
7658 ${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=1118400&u=c" -o ${template1}}
@@ -97,7 +79,7 @@ ${color #d8e698}System information :${color #eae5e3}
9779 ${color #ffffff}Swap Usage : ${color #eae5e3}${swap}/${swapmax} - ${swapperc}% - ${swapbar 5}
9880 ${color #d8e698}${stippled_hr}
9981 ${color #d8e698}Device temperature :${color #eae5e3}
100-${execi 60 ~/.cache/hdddev.sh > ~/.cache/hddtemp.txt}\
82+${execi 100 ~/.cache/hdddev.sh > ~/.cache/hddtemp.txt}\
10183 ${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℃
10284 ${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℃
10385 ${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℃
@@ -137,7 +119,7 @@ ${color #d8e698}Networking :
137119 ${color #ffffff}Up speed : ${color #eae5e3}${upspeed eth0}
138120 ${color #ffffff}Down speed : ${color #eae5e3}${downspeed eth0}
139121 ${color #d8e698}${stippled_hr}
140-${font mono:size=9}${execi 60 cal -h3 |sed -e "1d" -e "2s/^\(.\{16\}\).\{21\}/\1/" -e "3s/^\(.\{15\}\).\{15\}/\1/" -e "4,$ s/^\(.\{20\}\).\{22\}/\1/"}
122+${font mono:size=9}${execi 60 cal -h3 |sed -e "1s/^\(.\{16\}\).\{21\}/\1/" -e "2s/^\(.\{15\}\).\{15\}/\1/" -e "3,$ s/^\(.\{20\}\).\{22\}/\1/"}
141123 ${color #d8e698}${stippled_hr}
142124 ${font mono:size=12}${execi 60 cal -h}
143125 # Various images including the icons of the forecast #
@@ -148,3 +130,4 @@ ${image ~/.conky/images/wind.png -p 350,68 -s 16x16}\
148130 ${template3 1 84,130}\
149131 ${template3 2 183,130}\
150132 ${template3 3 277,130}${font}
133+]];