@ -0,0 +1,172 @@ | 
				
			|||||||
 | 
					background no | 
				
			||||||
 | 
					use_spacer right | 
				
			||||||
 | 
					no_buffers true | 
				
			||||||
 | 
					short_units true              # 显示缩写单位,比如 kiB -> k, GB -> G | 
				
			||||||
 | 
					pad_percents 2 | 
				
			||||||
 | 
					temperature_unit celsius      # 温度,默认为摄氏度 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Use Xft? | 
				
			||||||
 | 
					use_xft yes         # 开启自定义字体 | 
				
			||||||
 | 
					xftfont Droid Sans Light:size=10     # 自定义字体 | 
				
			||||||
 | 
					xftalpha 1 | 
				
			||||||
 | 
					text_buffer_size 2048 | 
				
			||||||
 | 
					uppercase false       # TEXT大小写 | 
				
			||||||
 | 
					override_utf8_locale yes | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Update interval in seconds 更新时间间隔 | 
				
			||||||
 | 
					update_interval 1 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# This is the number of times Conky will update before quitting. | 
				
			||||||
 | 
					# Set to zero to run forever. | 
				
			||||||
 | 
					total_run_times 0 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Create own window instead of using desktop (required in nautilus) | 
				
			||||||
 | 
					own_window yes            # 创建窗口绘制 | 
				
			||||||
 | 
					own_window_title NET | 
				
			||||||
 | 
					own_window_class Conky | 
				
			||||||
 | 
					own_window_colour 9f9a9a | 
				
			||||||
 | 
					own_window_transparent no | 
				
			||||||
 | 
					own_window_type desktop      # override 等选项 | 
				
			||||||
 | 
					own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager # 设置没有边框 | 
				
			||||||
 | 
					own_window_argb_visual yes  # 只有启用argb才能透明 | 
				
			||||||
 | 
					own_window_argb_value 180   # 设置透明度 0为不透明,255 100% 透明 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Use double buffering (reduces flicker, may not work for everyone) | 
				
			||||||
 | 
					double_buffer yes   # 双缓存,解决闪烁问题 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					minimum_size 282 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Draw shades? | 
				
			||||||
 | 
					draw_shades no | 
				
			||||||
 | 
					default_shade_color 292421 | 
				
			||||||
 | 
					# Draw outlines 绘制文本或图案轮廓 | 
				
			||||||
 | 
					draw_outline no | 
				
			||||||
 | 
					default_outline_color black | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Draw borders around text | 
				
			||||||
 | 
					draw_borders no | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Stippled borders? | 
				
			||||||
 | 
					stippled_borders 0 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# border margins | 
				
			||||||
 | 
					border_inner_margin 5 | 
				
			||||||
 | 
					#border_outer_margin 0 | 
				
			||||||
 | 
					draw_graph_borders no | 
				
			||||||
 | 
					# border width | 
				
			||||||
 | 
					border_width 5 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Text alignment, other possible values are commented 默认在桌面位置 | 
				
			||||||
 | 
					#alignment top_left | 
				
			||||||
 | 
					alignment top_right | 
				
			||||||
 | 
					#alignment bottom_left | 
				
			||||||
 | 
					#alignment bottom_right | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Gap between borders of screen and text | 
				
			||||||
 | 
					# same thing as passing -x at command line | 
				
			||||||
 | 
					gap_x 20 | 
				
			||||||
 | 
					gap_y 20 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					imlib_cache_size 0 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# predefine the color for use inside TEXT segments | 
				
			||||||
 | 
					default_color 323232 | 
				
			||||||
 | 
					color1 323232 | 
				
			||||||
 | 
					color2 323232 | 
				
			||||||
 | 
					color3 01C400       # green | 
				
			||||||
 | 
					color4 6b6b6b | 
				
			||||||
 | 
					color5 20bff9       # color of bar and graph | 
				
			||||||
 | 
					color6 212121       # high temperature color | 
				
			||||||
 | 
					color7 7b7b7b       # low temperature color | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TEXT | 
				
			||||||
 | 
					${execi 300 curl -s "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20%3D%20%222151330%22%20and%20u%20%3D%20%22c%22&format=xml&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" -o ~/.cache/weather.xml} ${font Droid Sans Light:size=15}${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "city=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}, ${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "region=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}, ${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "country=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${font} | 
				
			||||||
 | 
					${font Droid Sans Light:size=70}${alignr}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°${font} | 
				
			||||||
 | 
					${voffset -10} | 
				
			||||||
 | 
					${execi 300 cp -f -T ~/.conky/conky-ev/weather-icons/$(grep -o -P "<yweather:condition .*?>" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*").png ~/.cache/weather.png}${image ~/.cache/weather.png -p 5,40 -s 78x78} | 
				
			||||||
 | 
					${goto 20}${font Droid Sans Light:size=12}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o -m 1 "text=\"[^\"]*\"" | grep -o -m 1 "\"[^\"]*\"" | grep -o -m 1 "[^\"]*" | tr '[a-z]' '[A-Z]' | tr '[:upper:]' '[:lower:]' | sed -e "s/\b\(.\)/\u\1/g"}${font} | 
				
			||||||
 | 
					${image ~/.conky/conky-ev/weather-icons/wind.png -p 0,150 -s 15x15}${goto 35}${execi 300 grep -o -P "<yweather:wind .*?>" ~/.cache/weather.xml | grep -o "speed=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} ${execi 300 grep -o -P "<yweather:units .*?>" ~/.cache/weather.xml | grep -o "speed=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} | 
				
			||||||
 | 
					${image ~/.conky/conky-ev/weather-icons/humidity.png -p 0,165 -s 15x15}${goto 35}${execi 300 grep "yweather:atmosphere" ~/.cache/weather.xml | grep -o "humidity=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}% | 
				
			||||||
 | 
					${image ~/.conky/conky-ev/weather-icons/wind.png -p 18,135 -s 1x1	}${goto 35} | 
				
			||||||
 | 
					${goto 18}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1' | tr '[a-z]' '[A-Z]'}${goto 88}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2' | tr '[a-z]' '[A-Z]'}${goto 158}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3' | tr '[a-z]' '[A-Z]'}${goto 228}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4' | tr '[a-z]' '[A-Z]'}${goto 298}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5' | tr '[a-z]' '[A-Z]'} | 
				
			||||||
 | 
					${execi 300 cp -f -T ~/.conky/conky-ev/weather-icons/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2').png ~/.cache/weather-1.png}${image ~/.cache/weather-1.png -p 8,220 -s 30x30}${execi 300 cp -f -T ~/.conky/conky-ev/weather-icons/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3').png ~/.cache/weather-2.png} | 
				
			||||||
 | 
					${image ~/.cache/weather-2.png -p 75,220 -s 30x30}${execi 300 cp -f -T ~/.conky/conky-ev/weather-icons/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4').png ~/.cache/weather-3.png}${image ~/.cache/weather-3.png -p 145,220 -s 30x30}${execi 300 cp -f -T ~/.conky/conky-ev/weather-icons/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5').png ~/.cache/weather-4.png}${image ~/.cache/weather-4.png -p 215,220 -s 30x30}${execi 300 cp -f -T ~/.conky/conky-ev/weather-icons/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==6').png ~/.cache/weather-5.png}${image ~/.cache/weather-5.png -p 285,220 -s 30x30}${voffset 28}${goto 20}${color6}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°${goto 90}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°${goto 160}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°${goto 230}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}°${goto 300}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}° | 
				
			||||||
 | 
					${voffset 4}${goto 20}${color7}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°${goto 90}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°${goto 160}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°${goto 230}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}°${goto 300}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}° | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${font Droid Sans:bold:size=12}${color Tan2}System ${color slate grey}${hr 2}${font} | 
				
			||||||
 | 
					#${color1}Computer name      $alignr${color}${nodename} | 
				
			||||||
 | 
					${color1}Kernel version     $alignr${color}${kernel}-${machine} | 
				
			||||||
 | 
					${color1}CPU frequency      $alignr${color}${freq_g}GHz | 
				
			||||||
 | 
					${color1}Load (average)     $alignr${color}${loadavg 1} | 
				
			||||||
 | 
					${color1}CPU temperature    $alignr${color}${acpitemp} degrees | 
				
			||||||
 | 
					Uptime  $alignr ${uptime_short} | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#${font Droid Sans:bold:size=12}${color Tan2}Laptop battery charge ${color slate grey}${hr 2}${font} | 
				
			||||||
 | 
					#${color1}Battery charge     $alignr${color}${battery_short BAT1} | 
				
			||||||
 | 
					${font Droid Sans:bold:size=12}${color Tan2}Processors ${color slate grey}${hr 2}${font} | 
				
			||||||
 | 
					${color1}CPU     ${color}${cpu cpu0}%  ${voffset 2}${color5}${cpubar cpu0} | 
				
			||||||
 | 
					# Processors/Memory | 
				
			||||||
 | 
					#${color}${font :bold:size=10}CPU $alignc frequency $alignr CPU %${color}${font} | 
				
			||||||
 | 
					#CPU 1 ${color1}$alignc${freq_g 1} ${color1}Ghz ${color1}$alignr${cpu cpu1}${color1} % | 
				
			||||||
 | 
					#CPU 2 ${color1}$alignc${freq_g 2} ${color1}Ghz ${color1}$alignr${cpu cpu2}${color1} % | 
				
			||||||
 | 
					#CPU 3 ${color1}$alignc${freq_g 3} ${color1}Ghz ${color1}$alignr${cpu cpu3}${color1} % | 
				
			||||||
 | 
					#CPU 4 ${color1}$alignc${freq_g 4} ${color1}Ghz ${color1}$alignr${cpu cpu4}${color1} % | 
				
			||||||
 | 
					# 列出排名前五的CPU消耗进程 | 
				
			||||||
 | 
					#${color}${font :bold:size=10}Top Process $alignc PID$alignr CPU %${font} | 
				
			||||||
 | 
					#${top name 1} $alignc ${top pid 1} $alignr ${top cpu 1} % | 
				
			||||||
 | 
					#${top name 2} $alignc ${top pid 2} $alignr ${top cpu 2} % | 
				
			||||||
 | 
					#${top name 3} $alignc ${top pid 3} $alignr ${top cpu 3} % | 
				
			||||||
 | 
					#${top name 4} $alignc ${top pid 4} $alignr ${top cpu 4} % | 
				
			||||||
 | 
					#${top name 5} $alignc ${top pid 5} $alignr ${top cpu 5} % | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 列出排名前五的内存消耗进程 | 
				
			||||||
 | 
					${color}${font :bold:size=10}Top Memory $alignc MEM$alignr Mem %${font} | 
				
			||||||
 | 
					${top_mem name 1} $alignc ${top_mem mem_res 1} $alignr${top_mem mem 1} % | 
				
			||||||
 | 
					${top_mem name 2} $alignc ${top_mem mem_res 2} $alignr${top_mem mem 2} % | 
				
			||||||
 | 
					${top_mem name 3} $alignc ${top_mem mem_res 3} $alignr${top_mem mem 3} % | 
				
			||||||
 | 
					${top_mem name 4} $alignc ${top_mem mem_res 4} $alignr${top_mem mem 4} % | 
				
			||||||
 | 
					${top_mem name 5} $alignc ${top_mem mem_res 5} $alignr${top_mem mem 5} % | 
				
			||||||
 | 
					$alignc ${loadgraph 50,310 20bff9 20bff9 -l} | 
				
			||||||
 | 
					# 内存 | 
				
			||||||
 | 
					${font Droid Sans:bold:size=12}${color Tan2}Memory (RAM) ${color slate grey}${hr 2}${font} | 
				
			||||||
 | 
					${color1}Memory free / total $alignr${color}${memeasyfree} / ${memmax} | 
				
			||||||
 | 
					${color1}Now in use  ${color}${mem} ${color}${memperc}%   ${color5}${membar} | 
				
			||||||
 | 
					${color1}Virtual memory (swap)  $alignc${color}${swap} / ${swapmax} ${color}$alignr${swapperc} % | 
				
			||||||
 | 
					# ${memgraph 50,300 20bff9 20bff9 } | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${font Droid Sans:bold:size=12}${color Tan2}File system ${color slate grey}${hr 2}${font} | 
				
			||||||
 | 
					${color1}Root or /       $alignc${color}${fs_used /} / ${fs_size /} ${color}$alignr${fs_free_perc /} % | 
				
			||||||
 | 
					${color5}${fs_bar 5,300 /} | 
				
			||||||
 | 
					${color1}Home or /home   $alignc${color}${fs_used /home} / ${fs_size /home} ${color}$alignr${fs_free_perc /home} % | 
				
			||||||
 | 
					${color5}${fs_bar 5,300 /home} | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${font Droid Sans:bold:size=12}${color Tan2}Wireless network ${color slate grey}${hr 2}${font} | 
				
			||||||
 | 
					${if_existing /proc/net/route eth0}${color1}Wireless access point $alignr${color}${wireless_essid wlan0}${endif} | 
				
			||||||
 | 
					${color}Signal strength     $alignr${color}${wireless_link_qual_perc wlan0}   ${wireless_link_bar 5,100 wlan0} | 
				
			||||||
 | 
					# ${color1}Data traffic down / up   $alignr${color}${totaldown wlan0} ${color1}/  ${color}${totalup wlan0} | 
				
			||||||
 | 
					${color}WIFI SSID $alignr ${wireless_essid} | 
				
			||||||
 | 
					IP $alignr ${addr wlan0} | 
				
			||||||
 | 
					# 网络 | 
				
			||||||
 | 
					${if_existing /proc/net/route wlan0} | 
				
			||||||
 | 
					${color1}Up:${color1} ${color3}${upspeed wlan0}${color1}$alignr${goto 190}${color1}Down:${color1} ${color3}${downspeed wlan0} | 
				
			||||||
 | 
					${color1}${upspeedgraph wlan0 75,140 20bff9 20bff9}$alignr${goto 190}${downspeedgraph wlan0 75,140 20bff9 20bff9} | 
				
			||||||
 | 
					${color1}Sent:${color1} ${color2}${totalup wlan0}${color1}$alignr${goto 190}${color1}Received:${color1} ${color2}${totaldown wlan0}${color1} | 
				
			||||||
 | 
					${else} | 
				
			||||||
 | 
					${if_existing /proc/net/route eth0} | 
				
			||||||
 | 
					${color1}Up:${color1} ${color3}${upspeed eth0}${color1}$alignr${goto 190}${color1}Down:${color1} ${color3}${downspeed eth0} | 
				
			||||||
 | 
					${color1}${upspeedgraph eth0 75,140 20bff9 20bff9}$alignr${goto 190}${downspeedgraph eth0 75,140 20bff9 20bff9} | 
				
			||||||
 | 
					${color1}Sent:${color1} ${color2}${totalup eth0}${color1}$alignr${goto 190}${color1}Received:${color} ${color2}${totaldown eth0}${color1} | 
				
			||||||
 | 
					${else} | 
				
			||||||
 | 
					${if_existing /proc/net/route eth1} | 
				
			||||||
 | 
					${color1}Up:${color1} ${color3}${upspeed eth1}${color}$alignr${goto 190}${color1}Down:${color1} ${color3}${downspeed eth1}${color1} | 
				
			||||||
 | 
					${upspeedgraph eth1 75,140 20bff9 20bff9}$alignr${goto 190}${downspeedgraph eth1 75,140 20bff9 20bff9} | 
				
			||||||
 | 
					${color1}Sent:${color1} ${color2}${totalup eth1}${color1}$alignr${goto 190}${color1}Received:${color1} ${color2}${totaldown eth1}${color1} | 
				
			||||||
 | 
					${else} | 
				
			||||||
 | 
					${if_existing /proc/net/route ppp0} | 
				
			||||||
 | 
					${color5}Up:${color1} ${color3}${upspeed ppp0} ${color}$alignr${goto 190}${color1}Down:${color1} ${color3}${downspeed ppp0}${color} | 
				
			||||||
 | 
					${upspeedgraph ppp0 75,140 20bff9 20bff9}$alignr ${goto 190}${downspeedgraph ppp0 75,140 20bff9 20bff9} | 
				
			||||||
 | 
					${color1}Sent:${color1} ${color2}${totalup ppp0}${color1}$alignr${goto 190}${color5}Received:${color1} ${color2}${totaldown ppp0}${color1} | 
				
			||||||
 | 
					${else} | 
				
			||||||
 | 
					Network disconnected | 
				
			||||||
 | 
					${color3}Connect to a network to see statistics${color1} | 
				
			||||||
 | 
					${endif}${endif}${endif}${endif} | 
				
			||||||
@ -0,0 +1,35 @@ | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					Make sure conky is installed, and install this PPA: | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    sudo apt-add-repository -y ppa:teejee2008/ppa | 
				
			||||||
 | 
					    sudo apt-get update | 
				
			||||||
 | 
					    sudo apt-get install conky-manager | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Make sure to install "curl" in order to display the weather! (sudo apt-get install curl) | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Install this conkyrc: | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. Install the "DroidSans" fonts. | 
				
			||||||
 | 
					2. Run `/.install_conky.sh` to copy files to .conky dir | 
				
			||||||
 | 
					3. Replace your own yahoo weather. | 
				
			||||||
 | 
					    - go to https://developer.yahoo.com/weather/ | 
				
			||||||
 | 
					    - select XML, copy and paste (with your woeid): select * from weather.forecast where woeid = "2151330" and u = "c" , you need to change the text content to your own city. | 
				
			||||||
 | 
					    - then copy the url to edit in .conkyrc file | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					4. The first day in the conky displays the forecast for today.(in blue color) | 
				
			||||||
 | 
					5. Run conky | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					------------------------------------------------------------------------------------------------------- | 
				
			||||||
 | 
					NOTE* | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Be careful when changing fonts as well as font sizes!The images in conky have a set position, so if you change the font or size of the text, the text will move up/down while the images will stay in position, making it look out of place. | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If you wish to change the font you can fix the problem in 3 ways: | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. Either change the size of the font until your images are in position | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2. Change the position off the corresponding images.Search for "-p" and manipulate the neccesary values. | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					3. You can also move the text up/down by adding empty lines in the conkyrc.(enter/backspace) | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					------------------------------------------------------------------------------------------------------- | 
				
			||||||
| 
		 After Width: | Height: | Size: 2.3 MiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.9 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.1 KiB  | 
| 
		 After Width: | Height: | Size: 2.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 2.0 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 2.2 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.2 KiB  | 
| 
		 After Width: | Height: | Size: 4.3 KiB  | 
| 
		 After Width: | Height: | Size: 2.2 KiB  | 
| 
		 After Width: | Height: | Size: 2.2 KiB  | 
| 
		 After Width: | Height: | Size: 2.2 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.4 KiB  | 
| 
		 After Width: | Height: | Size: 1.7 KiB  | 
| 
		 After Width: | Height: | Size: 2.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.9 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 1.7 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.4 KiB  | 
| 
		 After Width: | Height: | Size: 1.0 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 1.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.7 KiB  | 
| 
		 After Width: | Height: | Size: 2.8 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 2.4 KiB  | 
| 
		 After Width: | Height: | Size: 1.8 KiB  | 
| 
		 After Width: | Height: | Size: 564 B  | 
| 
		 After Width: | Height: | Size: 749 B  | 
@ -1,310 +0,0 @@ | 
				
			|||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" => Judge current OS is Windows or Linux | 
					 | 
				
			||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
if(has("win32") || has("win64") || has("win95") || has("win16")) | 
					 | 
				
			||||||
	let g:iswindows = 1 | 
					 | 
				
			||||||
else | 
					 | 
				
			||||||
	let g:iswindows = 0 | 
					 | 
				
			||||||
endif | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" => Judge current process is vim or gvim | 
					 | 
				
			||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
if has("gui_running") | 
					 | 
				
			||||||
	let g:isGUI = 1 | 
					 | 
				
			||||||
else | 
					 | 
				
			||||||
	let g:isGUI = 0 | 
					 | 
				
			||||||
endif | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" 引用vundle_vimrc | 
					 | 
				
			||||||
" 引用python_vimrc配置文件 | 
					 | 
				
			||||||
if g:iswindows | 
					 | 
				
			||||||
	source $VIM/vundle_vimrc | 
					 | 
				
			||||||
	source $VIM/python_vimrc | 
					 | 
				
			||||||
else | 
					 | 
				
			||||||
	source ~/.vim/startup/vundle_vimrc | 
					 | 
				
			||||||
	source ~/.vim/startup/python_vimrc | 
					 | 
				
			||||||
endif | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
source $VIMRUNTIME/vimrc_example.vim | 
					 | 
				
			||||||
source $VIMRUNTIME/mswin.vim | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" => General | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" Sets how many lines of history VIM has to remember | 
					 | 
				
			||||||
set history=1000 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" set to auto read when a file is changed outside | 
					 | 
				
			||||||
set autoread | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" with a map leader it's possible to do extra key combinations | 
					 | 
				
			||||||
" like <leader>w saves the current file | 
					 | 
				
			||||||
let mapleader = "," | 
					 | 
				
			||||||
let g:mapleader = "," | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" fast saving | 
					 | 
				
			||||||
nmap <leader>w :w!<cr> | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
"编辑vimrc之后,重新加载 | 
					 | 
				
			||||||
if g:iswindows | 
					 | 
				
			||||||
	autocmd! bufwritepost _vimrc source $VIM/_vimrc | 
					 | 
				
			||||||
else | 
					 | 
				
			||||||
	autocmd! bufwritepost *.vimrc source $HOME/.vimrc | 
					 | 
				
			||||||
endif | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" => VIM user interface | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" set 8 lines to the cursor - when moving vertically using j/k | 
					 | 
				
			||||||
" j/k移动时光标距离文件上下n行 缩写 set so = 8 | 
					 | 
				
			||||||
set scrolloff=8 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" gVim automatically maximize when it open | 
					 | 
				
			||||||
" 启动时最大化gVim | 
					 | 
				
			||||||
" http://superuser.com/questions/140419/how-to-start-gvim-maximized | 
					 | 
				
			||||||
if g:iswindows | 
					 | 
				
			||||||
	au GUIEnter * simalt ~x | 
					 | 
				
			||||||
endif | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" 如下命令使鼠标用起来象微软 Windows | 
					 | 
				
			||||||
behave mswin | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" 高亮整行 | 
					 | 
				
			||||||
set cursorline | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" always show current position | 
					 | 
				
			||||||
set ruler | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" height of the command bar | 
					 | 
				
			||||||
set cmdheight=2 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" in many terminal emulators the mouse works just fine, thus enable it | 
					 | 
				
			||||||
if has('mouse') | 
					 | 
				
			||||||
	set mouse=a | 
					 | 
				
			||||||
endif | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Ignore case when searching 忽略大小写 | 
					 | 
				
			||||||
set ignorecase | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" When searching try to be smart about cases  | 
					 | 
				
			||||||
set smartcase | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Highlight search results | 
					 | 
				
			||||||
set hlsearch | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Makes search act like search in modern browsers | 
					 | 
				
			||||||
set incsearch | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" for regular expressions turn magic on | 
					 | 
				
			||||||
set magic | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set showcmd | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if has('multi_byte_ime') | 
					 | 
				
			||||||
	"未开启IME时光标背景色 | 
					 | 
				
			||||||
	hi Cursor guifg=bg guibg=Orange gui=NONE | 
					 | 
				
			||||||
	"开启IME时光标背景色 | 
					 | 
				
			||||||
	hi CursorIM guifg=NONE guibg=Skyblue gui=NONE | 
					 | 
				
			||||||
	" 关闭Vim的自动切换IME输入法(插入模式和检索模式) | 
					 | 
				
			||||||
	set iminsert=0 imsearch=0 | 
					 | 
				
			||||||
	" 插入模式输入法状态未被记录时,默认关闭IME | 
					 | 
				
			||||||
	"inoremap <silent> <ESC> <ESC>:set iminsert=0<CR> | 
					 | 
				
			||||||
endif | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" => Colors and Fonts | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
"语法高亮 | 
					 | 
				
			||||||
syntax on | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" using monokai color | 
					 | 
				
			||||||
" there should be molokai.vim file under ~/vimfile/colors/ | 
					 | 
				
			||||||
" https://github.com/tomasr/molokai | 
					 | 
				
			||||||
colorscheme molokai | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
"vim内部编码 | 
					 | 
				
			||||||
set encoding=utf-8 | 
					 | 
				
			||||||
" set current file encoding | 
					 | 
				
			||||||
set fileencoding=utf-8 | 
					 | 
				
			||||||
"按照utf-8 without bom,utf-8,顺序识别打开文件 | 
					 | 
				
			||||||
set fileencodings=ucs-bom,utf-8,gbk,gb2312,cp936,big5,gb18030,shift-jis,latin1 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
"防止菜单乱码 | 
					 | 
				
			||||||
if(g:iswindows && g:isGUI) | 
					 | 
				
			||||||
    source $VIMRUNTIME/delmenu.vim | 
					 | 
				
			||||||
    source $VIMRUNTIME/menu.vim | 
					 | 
				
			||||||
    language messages zh_CN.utf-8 | 
					 | 
				
			||||||
endif | 
					 | 
				
			||||||
"默认以双字节处理那些特殊字符 | 
					 | 
				
			||||||
if v:lang =~? '^\(zh\)\|\(ja\)\|\(ko\)' | 
					 | 
				
			||||||
    set ambiwidth=double | 
					 | 
				
			||||||
endif | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set nobomb "不自动设置字节序标记 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if g:iswindows | 
					 | 
				
			||||||
	set guifont=Courier\ New\:h12 | 
					 | 
				
			||||||
	" set guifont=Droid\ Sans\ Mono\ for\ Powerline\:h12 | 
					 | 
				
			||||||
	set guifontwide=NSimsun\:h12 | 
					 | 
				
			||||||
else | 
					 | 
				
			||||||
	set guifont=Monaco:h12 | 
					 | 
				
			||||||
endif | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" => Files, backups and undo | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" Turn backup off, since most stuff is in SVN, git et.c anyway... | 
					 | 
				
			||||||
" no backup file, no write backup file, no swap file | 
					 | 
				
			||||||
set nobackup | 
					 | 
				
			||||||
set nowb | 
					 | 
				
			||||||
set noswapfile | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Turn off undo file, keep annoying "un~" file away | 
					 | 
				
			||||||
set noundofile | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" => Text, tab and indent related | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
"去掉讨厌的有关vi一致性模式,避免以前版本的一些bug和局限 | 
					 | 
				
			||||||
set nocompatible | 
					 | 
				
			||||||
"设置自动缩进 | 
					 | 
				
			||||||
set autoindent | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
"C语言自动缩进 | 
					 | 
				
			||||||
set cindent | 
					 | 
				
			||||||
"设置Tab缩进4格 | 
					 | 
				
			||||||
set tabstop=4 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" 设置">"操作符 缩进,增加的缩进量是使用'shiftwidth'指定,默认是8 | 
					 | 
				
			||||||
set shiftwidth=4 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
"显示行号 | 
					 | 
				
			||||||
set nu | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" set smart indent | 
					 | 
				
			||||||
set si | 
					 | 
				
			||||||
" wrap lines | 
					 | 
				
			||||||
set wrap | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" YAML | 
					 | 
				
			||||||
autocmd Filetype yaml setlocal tabstop=2 shiftwidth=2 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Web | 
					 | 
				
			||||||
autocmd Filetype json setlocal tabstop=2 shiftwidth=2 | 
					 | 
				
			||||||
autocmd Filetype javascript setlocal tabstop=2 shiftwidth=2 | 
					 | 
				
			||||||
autocmd Filetype html setlocal tabstop=2 shiftwidth=2 | 
					 | 
				
			||||||
autocmd Filetype css setlocal tabstop=2 shiftwidth=2 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" => Moving around, tabs, windows and buffers | 
					 | 
				
			||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" Treat long lines as break lines (useful when moving around in them) | 
					 | 
				
			||||||
map j gj | 
					 | 
				
			||||||
map k gk | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
"""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" => Status line | 
					 | 
				
			||||||
"""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
"状态栏显示内容 | 
					 | 
				
			||||||
"define 3 custom highlight groups | 
					 | 
				
			||||||
hi User1 ctermbg=green ctermfg=red   guibg=green guifg=red | 
					 | 
				
			||||||
hi User2 ctermbg=gray   ctermfg=blue  guibg=gray   guifg=blue | 
					 | 
				
			||||||
hi User3 ctermbg=blue  ctermfg=green guibg=blue  guifg=green | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" always show the status line | 
					 | 
				
			||||||
set laststatus=2 | 
					 | 
				
			||||||
set statusline= | 
					 | 
				
			||||||
" full filename	modified flag	read only flag 	help file flag	Preview | 
					 | 
				
			||||||
set statusline=%1*%F%m%r%h%w\  | 
					 | 
				
			||||||
set statusline+=%2*[%{strlen(&fenc)?&fenc:'none'}, "file encoding | 
					 | 
				
			||||||
set statusline+=%{&ff}] "file format | 
					 | 
				
			||||||
set statusline+=%y		"file type | 
					 | 
				
			||||||
set statusline+=%=		"divider left/right separator" | 
					 | 
				
			||||||
set statusline+=%3*%c,		"column | 
					 | 
				
			||||||
set statusline+=%l/%L	"line no/all line" | 
					 | 
				
			||||||
set statusline+=\ %P | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Plugin settings | 
					 | 
				
			||||||
" Normal mode F2 to call NERDTree | 
					 | 
				
			||||||
nmap <F2> :NERDTreeToggle<cr> | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" plasticboy/vim-markdown | 
					 | 
				
			||||||
" disable folding | 
					 | 
				
			||||||
let g:vim_markdown_folding_disabled=1 | 
					 | 
				
			||||||
" Highlight YAML frontmatter as used by Jekyll | 
					 | 
				
			||||||
let g:vim_markdown_frontmatter=1 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" intend guides | 
					 | 
				
			||||||
let g:indent_guides_enable_on_vim_startup = 1 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" jedi-vim plugin config | 
					 | 
				
			||||||
let g:jedi#completions_command = "<C-N>" | 
					 | 
				
			||||||
let g:jedi#popup_on_dot = 0 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" powerline | 
					 | 
				
			||||||
" hide the default mode text (e.g. -- INSERT -- below the statusline) | 
					 | 
				
			||||||
" set t_Co=256 | 
					 | 
				
			||||||
" let g:Powerline_symbols='fancy' | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" general mapping | 
					 | 
				
			||||||
" no <up> ddkP | 
					 | 
				
			||||||
" no <down> ddp | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" =>Others | 
					 | 
				
			||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | 
					 | 
				
			||||||
" Delete trailing white space on save, useful for Python and CoffeeScript ;) | 
					 | 
				
			||||||
func! DeleteTrailingWS() | 
					 | 
				
			||||||
  exe "normal mz" | 
					 | 
				
			||||||
  %s/\s\+$//ge | 
					 | 
				
			||||||
  exe "normal `z" | 
					 | 
				
			||||||
endfunc | 
					 | 
				
			||||||
autocmd BufWrite *.py :call DeleteTrailingWS() | 
					 | 
				
			||||||
autocmd BufWrite *.coffee :call DeleteTrailingWS() | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" smart way to move between windows | 
					 | 
				
			||||||
map <C-j> <C-W>j | 
					 | 
				
			||||||
map <C-k> <C-W>k | 
					 | 
				
			||||||
map <C-h> <C-W>h | 
					 | 
				
			||||||
map <C-l> <C-W>l | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set diffexpr=MyDiff() | 
					 | 
				
			||||||
function! MyDiff() | 
					 | 
				
			||||||
  let opt = '-a --binary ' | 
					 | 
				
			||||||
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif | 
					 | 
				
			||||||
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif | 
					 | 
				
			||||||
  let arg1 = v:fname_in | 
					 | 
				
			||||||
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif | 
					 | 
				
			||||||
  let arg2 = v:fname_new | 
					 | 
				
			||||||
  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif | 
					 | 
				
			||||||
  let arg3 = v:fname_out | 
					 | 
				
			||||||
  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif | 
					 | 
				
			||||||
  let eq = '' | 
					 | 
				
			||||||
  if $VIMRUNTIME =~ ' ' | 
					 | 
				
			||||||
    if &sh =~ '\<cmd' | 
					 | 
				
			||||||
      let cmd = '""' . $VIMRUNTIME . '\diff"' | 
					 | 
				
			||||||
      let eq = '"' | 
					 | 
				
			||||||
    else | 
					 | 
				
			||||||
      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"' | 
					 | 
				
			||||||
    endif | 
					 | 
				
			||||||
  else | 
					 | 
				
			||||||
    let cmd = $VIMRUNTIME . '\diff' | 
					 | 
				
			||||||
  endif | 
					 | 
				
			||||||
  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq | 
					 | 
				
			||||||
endfunction | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function! Xml() | 
					 | 
				
			||||||
	set filetype=xml | 
					 | 
				
			||||||
	:%s/></>\r</g 	"把><替换成>回车< | 
					 | 
				
			||||||
	:normal gg=G<cr> | 
					 | 
				
			||||||
endfunction | 
					 | 
				
			||||||
map <leader>xml :call Xml() | 
					 | 
				
			||||||
@ -0,0 +1,8 @@ | 
				
			|||||||
 | 
					#!/bin/bash | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# install conky | 
				
			||||||
 | 
					sudo apt-get install conky | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ln -s $PWD/.conky/conky-ev $HOME/.conky/conky-ev  | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# start conky in Conky Manager | 
				
			||||||
@ -1,90 +0,0 @@ | 
				
			|||||||
" vimrc file for following the coding standards specified in PEP 7 & 8. | 
					 | 
				
			||||||
" | 
					 | 
				
			||||||
" To use this file, source it in your own personal .vimrc file (``source | 
					 | 
				
			||||||
" <filename>``) or, if you don't have a .vimrc file, you can just symlink to it | 
					 | 
				
			||||||
" (``ln -s <this file> ~/.vimrc``).  All options are protected by autocmds | 
					 | 
				
			||||||
" (read below for an explanation of the command) so blind sourcing of this file | 
					 | 
				
			||||||
" is safe and will not affect your settings for non-Python or non-C files. | 
					 | 
				
			||||||
" | 
					 | 
				
			||||||
" | 
					 | 
				
			||||||
" All setting are protected by 'au' ('autocmd') statements.  Only files ending | 
					 | 
				
			||||||
" in .py or .pyw will trigger the Python settings while files ending in *.c or | 
					 | 
				
			||||||
" *.h will trigger the C settings.  This makes the file "safe" in terms of only | 
					 | 
				
			||||||
" adjusting settings for Python and C files. | 
					 | 
				
			||||||
" | 
					 | 
				
			||||||
" Only basic settings needed to enforce the style guidelines are set. | 
					 | 
				
			||||||
" Some suggested options are listed but commented out at the end of this file. | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Number of spaces that a pre-existing tab is equal to. | 
					 | 
				
			||||||
" For the amount of space used for a new tab use shiftwidth. | 
					 | 
				
			||||||
au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=8 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" What to use for an indent. | 
					 | 
				
			||||||
" This will affect Ctrl-T and 'autoindent'. | 
					 | 
				
			||||||
" Python: 4 spaces | 
					 | 
				
			||||||
" C: tabs (pre-existing files) or 4 spaces (new files) | 
					 | 
				
			||||||
au BufRead,BufNewFile *.py,*pyw set shiftwidth=4 | 
					 | 
				
			||||||
au BufRead,BufNewFile *.py,*.pyw set expandtab | 
					 | 
				
			||||||
fu! Select_c_style() | 
					 | 
				
			||||||
    if search('^\t', 'n', 150) | 
					 | 
				
			||||||
        set shiftwidth=8 | 
					 | 
				
			||||||
        set noexpandtab | 
					 | 
				
			||||||
    el  | 
					 | 
				
			||||||
        set shiftwidth=4 | 
					 | 
				
			||||||
        set expandtab | 
					 | 
				
			||||||
    en | 
					 | 
				
			||||||
endf | 
					 | 
				
			||||||
au BufRead,BufNewFile *.c,*.h call Select_c_style() | 
					 | 
				
			||||||
au BufRead,BufNewFile Makefile* set noexpandtab | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Use the below highlight group when displaying bad whitespace is desired. | 
					 | 
				
			||||||
highlight BadWhitespace ctermbg=red guibg=red | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Display tabs at the beginning of a line in Python mode as bad. | 
					 | 
				
			||||||
au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/ | 
					 | 
				
			||||||
" Make trailing whitespace be flagged as bad. | 
					 | 
				
			||||||
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Wrap text after a certain number of characters | 
					 | 
				
			||||||
" Python: 79  | 
					 | 
				
			||||||
" C: 79 | 
					 | 
				
			||||||
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h set textwidth=79 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Turn off settings in 'formatoptions' relating to comment formatting. | 
					 | 
				
			||||||
" - c : do not automatically insert the comment leader when wrapping based on | 
					 | 
				
			||||||
"    'textwidth' | 
					 | 
				
			||||||
" - o : do not insert the comment leader when using 'o' or 'O' from command mode | 
					 | 
				
			||||||
" - r : do not insert the comment leader when hitting <Enter> in insert mode | 
					 | 
				
			||||||
" Python: not needed | 
					 | 
				
			||||||
" C: prevents insertion of '*' at the beginning of every line in a comment | 
					 | 
				
			||||||
au BufRead,BufNewFile *.c,*.h set formatoptions-=c formatoptions-=o formatoptions-=r | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Use UNIX (\n) line endings. | 
					 | 
				
			||||||
" Only used for new files so as to not force existing files to change their | 
					 | 
				
			||||||
" line endings. | 
					 | 
				
			||||||
" Python: yes | 
					 | 
				
			||||||
" C: yes | 
					 | 
				
			||||||
au BufNewFile *.py,*.pyw,*.c,*.h set fileformat=unix | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" auto add #! /usr/bin/env python | 
					 | 
				
			||||||
autocmd BufNewfile *.py call append(0,'#!/usr/bin/env python') | 
					 | 
				
			||||||
autocmd BufNewfile *.py call append(1,'# -*- coding: UTF-8 -*-') | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" ---------------------------------------------------------------------------- | 
					 | 
				
			||||||
" The following section contains suggested settings.  While in no way required | 
					 | 
				
			||||||
" to meet coding standards, they are helpful. | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Set the default file encoding to UTF-8: ``set encoding=utf-8`` | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Puts a marker at the beginning of the file to differentiate between UTF and | 
					 | 
				
			||||||
" UCS encoding (WARNING: can trick shells into thinking a text file is actually | 
					 | 
				
			||||||
" a binary file when executing the text file): ``set bomb`` | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" For full syntax highlighting: | 
					 | 
				
			||||||
"``let python_highlight_all=1`` | 
					 | 
				
			||||||
"``syntax on`` | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Automatically indent based on file type: ``filetype indent on`` | 
					 | 
				
			||||||
" Keep indentation level from previous line: ``set autoindent`` | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Folding based on indentation: ``set foldmethod=indent`` | 
					 | 
				
			||||||
@ -1,45 +0,0 @@ | 
				
			|||||||
set nocompatible              " be iMproved, required | 
					 | 
				
			||||||
filetype off                  " required | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" set the runtime path to include Vundle and initialize | 
					 | 
				
			||||||
if has("win32") | 
					 | 
				
			||||||
	set rtp+=$VIM/vimfiles/bundle/Vundle.vim | 
					 | 
				
			||||||
	call vundle#begin('$VIM/vimfiles/bundle') | 
					 | 
				
			||||||
else | 
					 | 
				
			||||||
	set rtp+=~/.vim/bundle/Vundle.vim | 
					 | 
				
			||||||
	call vundle#begin() | 
					 | 
				
			||||||
endif | 
					 | 
				
			||||||
" alternatively, pass a path where Vundle should install plugins | 
					 | 
				
			||||||
"call vundle#begin('~/some/path/here') | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" let Vundle manage Vundle, required | 
					 | 
				
			||||||
Plugin 'VundleVim/Vundle.vim' | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" The following are examples of different formats supported. | 
					 | 
				
			||||||
" Keep Plugin commands between vundle#begin/end. | 
					 | 
				
			||||||
" plugin on GitHub repo | 
					 | 
				
			||||||
Plugin 'tpope/vim-fugitive' | 
					 | 
				
			||||||
Plugin 'vim-perl/vim-perl' | 
					 | 
				
			||||||
Plugin 'godlygeek/tabular' | 
					 | 
				
			||||||
Plugin 'plasticboy/vim-markdown' | 
					 | 
				
			||||||
Plugin 'scrooloose/nerdtree' | 
					 | 
				
			||||||
Plugin 'davidhalter/jedi-vim' | 
					 | 
				
			||||||
Plugin 'ervandew/supertab' | 
					 | 
				
			||||||
Plugin 'Raimondi/delimitMate' | 
					 | 
				
			||||||
"show tabs | 
					 | 
				
			||||||
Plugin 'nathanaelkane/vim-indent-guides' | 
					 | 
				
			||||||
Plugin 'vim-scripts/taglist.vim' | 
					 | 
				
			||||||
" Plugin 'powerline/powerline', {'rtp': 'powerline/bindings/vim/'} | 
					 | 
				
			||||||
" Plugin 'Lokaltog/vim-powerline' | 
					 | 
				
			||||||
" Plugin 'bling/vim-airline' | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" plugin from http://vim-scripts.org/vim/scripts.html | 
					 | 
				
			||||||
Plugin 'L9' | 
					 | 
				
			||||||
Plugin 'perl-support.vim' | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
" Git plugin not hosted on GitHub | 
					 | 
				
			||||||
Plugin 'git://git.wincent.com/command-t.git' | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
call vundle#end()            " required | 
					 | 
				
			||||||
filetype plugin indent on    " required | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||