使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell桌面

各种窗口管理器和美化相关
回复
头像
d.haizhui
帖子: 11
注册时间: 2012-04-02 22:45
系统: Ubuntu Kylin 14.04

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#736

帖子 d.haizhui » 2015-04-07 13:05

yq-ysy 写了:
jackwang2030 写了:Conky-colors 无法下载了
可以的,因为谷歌相关链接的影响访问不到,用代理即可。

代理怎么用 VPN吗 还是怎样 有没有共享的Conky-colors 下载包???/
因为记录所以才有趣,这趟旅行想必会成为不错的书。(求永恒,争朝夕)
头像
yq-ysy
论坛版主
帖子: 4554
注册时间: 2008-07-19 12:44
来自: 广西(桂)南宁(邕)

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#737

帖子 yq-ysy » 2015-04-10 21:04

d.haizhui 写了:
yq-ysy 写了:
jackwang2030 写了:Conky-colors 无法下载了
可以的,因为谷歌相关链接的影响访问不到,用代理即可。
代理怎么用 VPN吗 还是怎样 有没有共享的Conky-colors 下载包???/
CONKY-colors 9.0b版(百度云盘)下载: http://pan.baidu.com/s/1mgJxfLI

——这个链接也已经加到教程贴里了。
头像
d.haizhui
帖子: 11
注册时间: 2012-04-02 22:45
系统: Ubuntu Kylin 14.04

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#738

帖子 d.haizhui » 2015-04-13 15:52

感激不尽
因为记录所以才有趣,这趟旅行想必会成为不错的书。(求永恒,争朝夕)
whohome
帖子: 7
注册时间: 2015-08-14 19:42
系统: ubuntu

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#739

帖子 whohome » 2015-08-14 19:47

好厉害i呀 看的我头痛
头像
吴广德
帖子: 347
注册时间: 2006-10-26 9:24
系统: Ubuntu 18.04 LTS
来自: 中国-广西-南宁

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#740

帖子 吴广德 » 2015-09-03 7:36

保存一下,留待查询
Ubuntu 18.04 LTS使用中......

主板:MSI Z97 gaming 9 ACK
CPU:I7 4790K
内存:DDR3 8G x 4 = 32G
硬盘:60G SSD(/) + 1T HD(/home)
显示器:Philips 274E5Q
307774151
帖子: 1
注册时间: 2013-10-27 9:30

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#741

帖子 307774151 » 2015-09-19 16:25

我有两台电脑,
一 12.04 这台conky使用正常,
二 15.04 这台使用的是上面那台的配置文件,启动可以正常,几分钟,之后就会出现重复的感觉,如下图。

各位有什么解决办法吗?“我看 命令行里没有报错,感觉是上一次的画面信息没有被刷掉。
。。 这里发不了图咋办。。。请看看附件吧,谢谢了
附件
1.jpg
untitled.png
头像
yq-ysy
论坛版主
帖子: 4554
注册时间: 2008-07-19 12:44
来自: 广西(桂)南宁(邕)

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#742

帖子 yq-ysy » 2015-09-21 21:17

307774151 写了:我有两台电脑,
一 12.04 这台conky使用正常,
二 15.04 这台使用的是上面那台的配置文件,启动可以正常,几分钟,之后就会出现重复的感觉,如下图。

各位有什么解决办法吗?“我看 命令行里没有报错,感觉是上一次的画面信息没有被刷掉。
。。 这里发不了图咋办。。。请看看附件吧,谢谢了
730 楼 bwilling 有过类似的问题,最后他的解决方法是

代码: 全选

own_window_type widget
不会消失,不会重叠...但貌似不是嵌入桌面的...
头像
yq-ysy
论坛版主
帖子: 4554
注册时间: 2008-07-19 12:44
来自: 广西(桂)南宁(邕)

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#743

帖子 yq-ysy » 2015-09-21 21:18

CONKY-colors的原作者似乎放弃更新了。已经两年多没有更新了。或者这个软件有了更好的替代品?
头像
fudaming
帖子: 37
注册时间: 2005-09-09 20:42
系统: ubuntu18.04 &manjaro

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#744

帖子 fudaming » 2015-11-04 21:02

bwilling 写了:
yq-ysy 写了:
bwilling 写了:不知楼主是否还在
我碰到的问题是,鼠标一点击conky就会消失
原代码是 own_window_type desktop 我又改成 own_window_type override
改成这样后,是不会消失了,但是图像貌似不会重绘,会一直重叠的画下去
就会变成这样:
请教楼主如何解决
你这个问题w没有碰到过,网上搜索了一下,找到一篇:
也许对你有用: http://www.gooth.org/archives/561

代码: 全选

own_window yes | no 
这下就重叠的问题是解决了……
多谢,不过 own_window 参数不管是yes 还是 No 都不行...

我改了这个

代码: 全选

own_window_type widget
不会消失,不会重叠...但貌似不是嵌入桌面的...唉 ...
5.png
鱼和熊掌不可兼得啊...

对了我是 ubuntu14.04 64位版本... 不知道还有没有更好的解决办法
试试看
double_buffer yes
SeraphJacky
帖子: 1
注册时间: 2015-10-23 9:29
系统: ubuntu

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#745

帖子 SeraphJacky » 2015-11-05 10:44

yq-ysy 写了:
307774151 写了:我有两台电脑,
一 12.04 这台conky使用正常,
二 15.04 这台使用的是上面那台的配置文件,启动可以正常,几分钟,之后就会出现重复的感觉,如下图。

各位有什么解决办法吗?“我看 命令行里没有报错,感觉是上一次的画面信息没有被刷掉。
。。 这里发不了图咋办。。。请看看附件吧,谢谢了
730 楼 bwilling 有过类似的问题,最后他的解决方法是

代码: 全选

own_window_type widget
不会消失,不会重叠...但貌似不是嵌入桌面的...
不是嵌入桌面的只要show desktop一下就不见了。。。
重叠貌似是某些操作会卡住刷新,比如一直按ctrl + v这种的
我试了own_window_type dock,貌似目前看来就没问题了。
头像
Archer123
帖子: 146
注册时间: 2008-05-18 10:16

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#746

帖子 Archer123 » 2016-05-04 14:36

都更新到16.04了 求破 网卡显示IP这块. 网卡名称在16.04都变
enp4s0f1 对应以前的eth0

wlp3s0 对应以前的wlan0
头像
hai1212
帖子: 154
注册时间: 2009-09-15 10:26
系统: Ubuntu、WIN7、XP、WIN8
联系:

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#747

帖子 hai1212 » 2016-05-20 17:04

刚刚开始搞!!!为什么是乱码呢!字体也拷贝到/usr/share/fonts/conkycolors/下面
选区_005.png
以下是我的代码:

代码: 全选

######################
以下是我的代码:
[code]######################
# - Conky settings - #
######################
update_interval 1
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1

imlib_cache_size 0
double_buffer yes
no_buffers yes

format_human_readable

#####################
# - Text settings - #
#####################
use_xft yes
xftfont WenQuanYi Micro Hei:size=8
override_utf8_locale yes
text_buffer_size 2048

#############################
# - Window specifications - #
#############################
own_window_class Conky
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

alignment top_right
gap_x 25
gap_y 40
minimum_size 185 600
maximum_width 185

default_bar_size 60 8

#########################
# - Graphics settings - #
#########################
draw_shades no

default_color cccccc

color0 cyan
color1 green
color2 orange
color3 green

TEXT
${font WenQuanYi Micro Hei:style=Bold:size=8}系统状态 $stippled_hr${font}
##############
# - SYSTEM - #
##############
${color0}${voffset 6}${font OpenLogos:size=19}u${font}${color}${goto 32}${voffset -14}内核版本:  ${alignr}${color2}${kernel}${color}
${goto 32}开机时长: ${alignr}${color2}${uptime}${color}
# |--UPDATES
${goto 32}等待升级: ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 360 aptitude search "~U" | wc -l | tail}${color}${font} ${color2}个软件包${color}
# |--CPU
${offset 1}${color0}${font Poky:size=16}P${font}${offset -19}${voffset 9}${cpubar cpu0 4,18}${color}${voffset -16}${goto 32}CPU1 负荷: ${font Ubuntu:style=Bold:size=8}${color1}${cpu cpu1}%${font} ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 30 sensors | grep 'Core0' | awk '{print $3}' | sed 's/+//' | sed 's/\.0//g'}${color}${font}  ${color2}${cpugraph cpu1 8,50 }${color}
${goto 32}CPU2 负荷: ${font Ubuntu:style=Bold:size=8}${color1}${cpu cpu2}%${font} ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 30 sensors | grep 'Core1' | awk '{print $3}' | sed 's/+//' | sed 's/\.0//g'}${color}${font}  ${color2}${cpugraph cpu2 8,50 }${color}
# |--MEM
${color0}${font Poky:size=16}M${font}${color}${goto 32}${voffset -7}内存占用率: ${font Ubuntu:style=Bold:size=8}${color1}$memperc%${color}${font}
${offset 1}${voffset 2}${color0}${membar 4,18}${color}${goto 32}${voffset -2}总共: ${font Ubuntu:style=Bold:size=8}${color2}${memeasyfree}${color}${font} 使用: ${font Ubuntu:style=Bold:size=8}${color2}${mem}${color}${font}
# |--PROC
${voffset 2}${color0}${font Poky:size=15}a${font}${color}${goto 32}${voffset -10}最占用资源的进程: ${color2}${alignr 13}CPU${alignr}RAM${color}
${voffset -1}${goto 42}${color2}${top name 1}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 1}${alignr }${top mem 1}${color}${font}
${voffset -1}${goto 42}${color2}${top name 2}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 2}${alignr }${top mem 2}${color}${font}
${voffset -1}${goto 42}${color2}${top name 3}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 3}${alignr }${top mem 3}${color}${font}
#############
# - CLOCK - #
#############
${voffset 4}${font WenQuanYi Micro Hei:style=Bold:size=8}日期时间 $stippled_hr${font}
${voffset 4}${goto 32}${font clockfaces:size=40}O${font}
${voffset -34}${goto 41}${font zoraclockH:size=30}${color2}${execpi 120 /usr/share/conkycolors/bin/conkyClock hour}${color}${font}
${voffset -39}${goto 35}${font zoraclockM:size=40}${color2}${execpi 60 /usr/share/conkycolors/bin/conkyClock minute}${color}${font}
${goto 100}${voffset -50}${font Ubuntu:style=Bold:size=11}${color2}${time %H}${time :%M}${time :%S}${color}${font}
${goto 100}${voffset 0}${time %Y年 %b%d日}${voffset 8}
${goto 100}${voffset -8}${font WenQuanYi Micro Hei:style=Bold:size=8}${color2}${time %A}${color}${font}
${goto 100}${voffset 0}${font WenQuanYi Micro Hei:size=8}${alignc}${execpi 300 ~/.conkycolors/bin/lunar}${font}
################
# - CALENDAR - #
################
${voffset -2}${color0}${font Poky:size=16}D${font}${voffset -8}${font Ubuntu:style=Bold:size=7}${offset -17}${voffset 4}${time %d}${font}${color}${voffset -1}${font Monospace:size=7}${execpi 300 DJS=`date +%_d`; cal -h | sed 's/日 一 二 三 四 五 六/${font WenQuanYi Micro Hei Mono:size=8} 日 一 二 三 四 五 六${font Monospace:size=7}/' |sed '2,8!d'| sed '/./!d' | sed 's/^/${goto 58} /'| sed 's/$/ /' | sed 's/^/ /' | sed /" $DJS "/s/" $DJS "/" "'${font Arial:style=Bold:size=8}${voffset -2}${offset 0}${color1} '"$DJS"'${color}${font Monospace:size=7}'" "/}${voffset -1}
${voffset -60}${font WenQuanYi Micro Hei:size=8}今夜月相${font}
${goto 10}${font weather:size=30}${execpi 300 ~/.conkycolors/bin/mond}${font}
${voffset 0}
#############
# - PHOTO - #
#############
# For a working photo widget you need to specify a file or directory in conkyPhoto or conkyPhotoRandom script in  ~/.conkycolors/bin /usr/share/conkycolors/bin folders
${voffset -8}${font WenQuanYi Micro Hei:style=Bold:size=8}我的相册 $stippled_hr${font}
${execi 60 ~/.conkycolors/bin/conkyPhotoRandom}${image /tmp/conkyPhoto.png -s 174x110 -p 14,350}
${voffset 75}
###############
# - NETWORK - #
###############
${voffset 4}${font WenQuanYi Micro Hei:style=Bold:size=8}网络 $stippled_hr${font}
# |--WLAN0
${if_up wlan0}
${voffset -13}${color0}${font VariShapes Solid:size=14}q${font}${color}${goto 32}${voffset -6}上传: ${font Ubuntu:style=Bold:size=8}${color1}${upspeed wlan0}${color}${font} ${alignr}${color2}${upspeedgraph wlan0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totalup wlan0}${color}${font}
${voffset -2}${color0}${font VariShapes Solid:size=14}Q${font}${color}${goto 32}${voffset -6}下载: ${font Ubuntu:style=Bold:size=8}${color1}${downspeed wlan0}${color}${font} ${alignr}${color2}${downspeedgraph wlan0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totaldown wlan0}${color}${font}
${voffset -2}${color0}${font Poky:size=14}Y${font}${color}${goto 32}${voffset -2}Signal: ${font Ubuntu:style=Bold:size=8}${color1}${wireless_link_qual_perc wlan0}%${color}${font} ${alignr}${color2}${wireless_link_bar 8,60 wlan0}${color}
${voffset 4}${color0}${font Poky:size=13}w${font}${color}${goto 32}${voffset -8}本地 IP: ${alignr}${color2}${addr wlan0}${color}
${goto 32}对外 IP: ${alignr}${color2}${execi 10800 /usr/share/conkycolors/bin/conkyIp}${color}
# |--ETH0
${else}${if_up eth0}
${voffset -13}${color0}${font VariShapes Solid:size=14}q${font}${color}${goto 32}${voffset -6}上传: ${font Ubuntu:style=Bold:size=8}${color1}${upspeed eth0}${color}${font} ${alignr}${color2}${upspeedgraph eth0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totalup eth0}${color}${font}
${voffset -2}${color0}${font VariShapes Solid:size=14}Q${font}${color}${goto 32}${voffset -6}下载: ${font Ubuntu:style=Bold:size=8}${color1}${downspeed eth0}${color}${font} ${alignr}${color2}${downspeedgraph eth0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totaldown eth0}${color}${font}
${voffset -2}${color0}${font Poky:size=13}w${font}${color}${goto 32}${voffset -4}本地 IP: ${alignr}${color2}${addr eth0}${color}
${goto 32}对外 IP: ${alignr}${color2}${execi 60 /usr/share/conkycolors/bin/conkyIp}${color}
# |--PPP0
${else}${if_up ppp0}
${voffset -13}${color0}${font VariShapes Solid:size=14}q${font}${color}${goto 32}${voffset -6}上传: ${font Ubuntu:style=Bold:size=8}${color1}${upspeed ppp0}${color}${font} ${alignr}${color2}${upspeedgraph ppp0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totalup ppp0}${color}${font}
${voffset -2}${color0}${font VariShapes Solid:size=14}Q${font}${color}${goto 32}${voffset -6}下载: ${font Ubuntu:style=Bold:size=8}${color1}${downspeed ppp0}${color}${font} ${alignr}${color2}${downspeedgraph ppp0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totaldown ppp0}${color}${font}
${voffset -2}${color0}${font Poky:size=13}w${font}${color}${goto 32}${voffset -4}本地 IP: ${alignr}${color2}${addr ppp0}${color}
${else}${voffset 4}${color0}${font PizzaDude Bullets:size=12}4${font}${color}${goto 32}网络不可用${voffset 14}${endif}${endif}${endif}
##################
# - CN WEATHER - #
##################
# http://www.weather.com.cn/
${voffset -10}${font WenQuanYi Micro Hei:style=Bold:size=8}天气预报 $stippled_hr${font}
${execi 600 curl -s --connect-timeout 30 "http://m.weather.com.cn/data/101300111.html" >/tmp/forcast }${execi 600 curl -s --connect-timeout 30 "http://wap.weather.com.cn/data/sk/101300111.html" >/tmp/current }
${voffset 0}${font ConkyWeather:style=Bold:size=18}${color0}${voffset -10}${execi 600 sed  's/^.*"img_title_single":"//' /tmp/forcast | sed 's/",".*$//' | sed 's/大到暴雪/r/;t w-0;s/暴雪/r/;t w-0;s/中到大雪/q/;t w-0;s/大雪/q/;t w-0;s/小到中雪/p/;t w-0;s/中雪/p/;t w-0;s/小雪/o/;t w-0;s/雷雨/l/;t w-0;s/雷阵雨/k/;t w-0;s/大到暴雨/j/;t w-0;s/暴雨/j/;t w-0;s/中到大雨/i/;t w-0;s/大雨/i/;t w-0;s/小到中雨/h/;t w-0;s/中雨/h/;t w-0;s/小雨/s/;t w-0;s/阵雨/g/;t w-0;s/阴/f/;t w-0;s/多云/e/;t w-0;s/雾/u/;t w-0;s/晴/a/;t w-0;s/转//;t w-0;:w-0;'}${color}${font}
${goto 105}${voffset -15}${font Arrows:style=Bold:size=18}${color0}${voffset -10}${execi 600 sed  's/^.*"WD":"//' /tmp/current | sed 's/",".*$//' | sed 's/无持续风向/v/;t w-0;s/旋转风/v/;t w-0;s/西北风/g/;t w-0;s/西南风/c/;s/东北风/k/;t w-0;s/东南风/o/;t w-0;t w-0;s/南风/a/;t w-0;s/西风/e/;t w-0;s/北风/i/;t w-0;s/东风/m/;t w-0;s/转//;t w-0;:w-0;'}${color}${font}
${voffset -22}${goto 35}${color2}${execi 600 sed  's/^.*"city":"//' /tmp/current | sed 's/",".*$//' }: ${execi 600 sed  's/^.*"img_title_single":"//' /tmp/forcast | sed 's/",".*$//' } ${alignr}湿度:${execi 600 sed  's/^.*"SD":"//' /tmp/current | sed 's/",".*$//' }${color} 
${voffset 0}${goto 35}${color2}${execi 600 sed  's/^.*"WD":"//' /tmp/current | sed 's/",".*$//' } ${execi 600 sed  's/^.*"WS":"//' /tmp/current | sed 's/",".*$//' } ${alignr}${execbar sed  's/^.*"SD":"//' /tmp/current | sed 's/",".*$//'}${color}${font}
${voffset 5}${color0}${font ConkyWeather:size=24}E${font}${color}
${voffset -35}${goto 32}${font WenQuanYi Micro Hei:size=8}今日: ${color2}${execi 600 sed  's/^.*"temp":"//' /tmp/current | sed 's/",".*$//' }°C${color} ${alignr}早晚:${color2}${execi 600 sed  's/^.*"temp1":"//' /tmp/forcast | sed 's/",".*$//' | sed 's/℃//'| sed 's/℃/°C/' }${color}
${goto 32}${font WenQuanYi Micro Hei:size=8}明日: ${color1}${execi 600 sed  's/^.*"weather2":"//' /tmp/forcast | sed 's/",".*$//' } ${alignr}${execi 600 sed  's/^.*"temp2":"//' /tmp/forcast | sed 's/",".*$//' | sed 's/℃//'| sed 's/℃/°C/'}${color}${font}
${goto 32}${font WenQuanYi Micro Hei:size=8}后日: ${color1}${execi 600 sed  's/^.*"weather3":"//' /tmp/forcast | sed 's/",".*$//' } ${alignr}${execi 600 sed  's/^.*"temp3":"//' /tmp/forcast | sed 's/",".*$//' | sed 's/℃//'| sed 's/℃/°C/' }${color}${font}
头像
hai1212
帖子: 154
注册时间: 2009-09-15 10:26
系统: Ubuntu、WIN7、XP、WIN8
联系:

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#748

帖子 hai1212 » 2016-05-26 15:06

hai1212 写了:刚刚开始搞!!!为什么是乱码呢!字体也拷贝到/usr/share/fonts/conkycolors/下面
选区_005.png
以下是我的代码:

代码: 全选

######################
以下是我的代码:
[code]######################
# - Conky settings - #
######################
update_interval 1
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1

imlib_cache_size 0
double_buffer yes
no_buffers yes

format_human_readable

#####################
# - Text settings - #
#####################
use_xft yes
xftfont WenQuanYi Micro Hei:size=8
override_utf8_locale yes
text_buffer_size 2048

#############################
# - Window specifications - #
#############################
own_window_class Conky
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

alignment top_right
gap_x 25
gap_y 40
minimum_size 185 600
maximum_width 185

default_bar_size 60 8

#########################
# - Graphics settings - #
#########################
draw_shades no

default_color cccccc

color0 cyan
color1 green
color2 orange
color3 green

TEXT
${font WenQuanYi Micro Hei:style=Bold:size=8}系统状态 $stippled_hr${font}
##############
# - SYSTEM - #
##############
${color0}${voffset 6}${font OpenLogos:size=19}u${font}${color}${goto 32}${voffset -14}内核版本:  ${alignr}${color2}${kernel}${color}
${goto 32}开机时长: ${alignr}${color2}${uptime}${color}
# |--UPDATES
${goto 32}等待升级: ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 360 aptitude search "~U" | wc -l | tail}${color}${font} ${color2}个软件包${color}
# |--CPU
${offset 1}${color0}${font Poky:size=16}P${font}${offset -19}${voffset 9}${cpubar cpu0 4,18}${color}${voffset -16}${goto 32}CPU1 负荷: ${font Ubuntu:style=Bold:size=8}${color1}${cpu cpu1}%${font} ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 30 sensors | grep 'Core0' | awk '{print $3}' | sed 's/+//' | sed 's/\.0//g'}${color}${font}  ${color2}${cpugraph cpu1 8,50 }${color}
${goto 32}CPU2 负荷: ${font Ubuntu:style=Bold:size=8}${color1}${cpu cpu2}%${font} ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 30 sensors | grep 'Core1' | awk '{print $3}' | sed 's/+//' | sed 's/\.0//g'}${color}${font}  ${color2}${cpugraph cpu2 8,50 }${color}
# |--MEM
${color0}${font Poky:size=16}M${font}${color}${goto 32}${voffset -7}内存占用率: ${font Ubuntu:style=Bold:size=8}${color1}$memperc%${color}${font}
${offset 1}${voffset 2}${color0}${membar 4,18}${color}${goto 32}${voffset -2}总共: ${font Ubuntu:style=Bold:size=8}${color2}${memeasyfree}${color}${font} 使用: ${font Ubuntu:style=Bold:size=8}${color2}${mem}${color}${font}
# |--PROC
${voffset 2}${color0}${font Poky:size=15}a${font}${color}${goto 32}${voffset -10}最占用资源的进程: ${color2}${alignr 13}CPU${alignr}RAM${color}
${voffset -1}${goto 42}${color2}${top name 1}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 1}${alignr }${top mem 1}${color}${font}
${voffset -1}${goto 42}${color2}${top name 2}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 2}${alignr }${top mem 2}${color}${font}
${voffset -1}${goto 42}${color2}${top name 3}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 3}${alignr }${top mem 3}${color}${font}
#############
# - CLOCK - #
#############
${voffset 4}${font WenQuanYi Micro Hei:style=Bold:size=8}日期时间 $stippled_hr${font}
${voffset 4}${goto 32}${font clockfaces:size=40}O${font}
${voffset -34}${goto 41}${font zoraclockH:size=30}${color2}${execpi 120 /usr/share/conkycolors/bin/conkyClock hour}${color}${font}
${voffset -39}${goto 35}${font zoraclockM:size=40}${color2}${execpi 60 /usr/share/conkycolors/bin/conkyClock minute}${color}${font}
${goto 100}${voffset -50}${font Ubuntu:style=Bold:size=11}${color2}${time %H}${time :%M}${time :%S}${color}${font}
${goto 100}${voffset 0}${time %Y年 %b%d日}${voffset 8}
${goto 100}${voffset -8}${font WenQuanYi Micro Hei:style=Bold:size=8}${color2}${time %A}${color}${font}
${goto 100}${voffset 0}${font WenQuanYi Micro Hei:size=8}${alignc}${execpi 300 ~/.conkycolors/bin/lunar}${font}
################
# - CALENDAR - #
################
${voffset -2}${color0}${font Poky:size=16}D${font}${voffset -8}${font Ubuntu:style=Bold:size=7}${offset -17}${voffset 4}${time %d}${font}${color}${voffset -1}${font Monospace:size=7}${execpi 300 DJS=`date +%_d`; cal -h | sed 's/日 一 二 三 四 五 六/${font WenQuanYi Micro Hei Mono:size=8} 日 一 二 三 四 五 六${font Monospace:size=7}/' |sed '2,8!d'| sed '/./!d' | sed 's/^/${goto 58} /'| sed 's/$/ /' | sed 's/^/ /' | sed /" $DJS "/s/" $DJS "/" "'${font Arial:style=Bold:size=8}${voffset -2}${offset 0}${color1} '"$DJS"'${color}${font Monospace:size=7}'" "/}${voffset -1}
${voffset -60}${font WenQuanYi Micro Hei:size=8}今夜月相${font}
${goto 10}${font weather:size=30}${execpi 300 ~/.conkycolors/bin/mond}${font}
${voffset 0}
#############
# - PHOTO - #
#############
# For a working photo widget you need to specify a file or directory in conkyPhoto or conkyPhotoRandom script in  ~/.conkycolors/bin /usr/share/conkycolors/bin folders
${voffset -8}${font WenQuanYi Micro Hei:style=Bold:size=8}我的相册 $stippled_hr${font}
${execi 60 ~/.conkycolors/bin/conkyPhotoRandom}${image /tmp/conkyPhoto.png -s 174x110 -p 14,350}
${voffset 75}
###############
# - NETWORK - #
###############
${voffset 4}${font WenQuanYi Micro Hei:style=Bold:size=8}网络 $stippled_hr${font}
# |--WLAN0
${if_up wlan0}
${voffset -13}${color0}${font VariShapes Solid:size=14}q${font}${color}${goto 32}${voffset -6}上传: ${font Ubuntu:style=Bold:size=8}${color1}${upspeed wlan0}${color}${font} ${alignr}${color2}${upspeedgraph wlan0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totalup wlan0}${color}${font}
${voffset -2}${color0}${font VariShapes Solid:size=14}Q${font}${color}${goto 32}${voffset -6}下载: ${font Ubuntu:style=Bold:size=8}${color1}${downspeed wlan0}${color}${font} ${alignr}${color2}${downspeedgraph wlan0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totaldown wlan0}${color}${font}
${voffset -2}${color0}${font Poky:size=14}Y${font}${color}${goto 32}${voffset -2}Signal: ${font Ubuntu:style=Bold:size=8}${color1}${wireless_link_qual_perc wlan0}%${color}${font} ${alignr}${color2}${wireless_link_bar 8,60 wlan0}${color}
${voffset 4}${color0}${font Poky:size=13}w${font}${color}${goto 32}${voffset -8}本地 IP: ${alignr}${color2}${addr wlan0}${color}
${goto 32}对外 IP: ${alignr}${color2}${execi 10800 /usr/share/conkycolors/bin/conkyIp}${color}
# |--ETH0
${else}${if_up eth0}
${voffset -13}${color0}${font VariShapes Solid:size=14}q${font}${color}${goto 32}${voffset -6}上传: ${font Ubuntu:style=Bold:size=8}${color1}${upspeed eth0}${color}${font} ${alignr}${color2}${upspeedgraph eth0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totalup eth0}${color}${font}
${voffset -2}${color0}${font VariShapes Solid:size=14}Q${font}${color}${goto 32}${voffset -6}下载: ${font Ubuntu:style=Bold:size=8}${color1}${downspeed eth0}${color}${font} ${alignr}${color2}${downspeedgraph eth0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totaldown eth0}${color}${font}
${voffset -2}${color0}${font Poky:size=13}w${font}${color}${goto 32}${voffset -4}本地 IP: ${alignr}${color2}${addr eth0}${color}
${goto 32}对外 IP: ${alignr}${color2}${execi 60 /usr/share/conkycolors/bin/conkyIp}${color}
# |--PPP0
${else}${if_up ppp0}
${voffset -13}${color0}${font VariShapes Solid:size=14}q${font}${color}${goto 32}${voffset -6}上传: ${font Ubuntu:style=Bold:size=8}${color1}${upspeed ppp0}${color}${font} ${alignr}${color2}${upspeedgraph ppp0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totalup ppp0}${color}${font}
${voffset -2}${color0}${font VariShapes Solid:size=14}Q${font}${color}${goto 32}${voffset -6}下载: ${font Ubuntu:style=Bold:size=8}${color1}${downspeed ppp0}${color}${font} ${alignr}${color2}${downspeedgraph ppp0 8,60 }${color}
${goto 32}总计: ${font Ubuntu:style=Bold:size=8}${color2}${totaldown ppp0}${color}${font}
${voffset -2}${color0}${font Poky:size=13}w${font}${color}${goto 32}${voffset -4}本地 IP: ${alignr}${color2}${addr ppp0}${color}
${else}${voffset 4}${color0}${font PizzaDude Bullets:size=12}4${font}${color}${goto 32}网络不可用${voffset 14}${endif}${endif}${endif}
##################
# - CN WEATHER - #
##################
# http://www.weather.com.cn/
${voffset -10}${font WenQuanYi Micro Hei:style=Bold:size=8}天气预报 $stippled_hr${font}
${execi 600 curl -s --connect-timeout 30 "http://m.weather.com.cn/data/101300111.html" >/tmp/forcast }${execi 600 curl -s --connect-timeout 30 "http://wap.weather.com.cn/data/sk/101300111.html" >/tmp/current }
${voffset 0}${font ConkyWeather:style=Bold:size=18}${color0}${voffset -10}${execi 600 sed  's/^.*"img_title_single":"//' /tmp/forcast | sed 's/",".*$//' | sed 's/大到暴雪/r/;t w-0;s/暴雪/r/;t w-0;s/中到大雪/q/;t w-0;s/大雪/q/;t w-0;s/小到中雪/p/;t w-0;s/中雪/p/;t w-0;s/小雪/o/;t w-0;s/雷雨/l/;t w-0;s/雷阵雨/k/;t w-0;s/大到暴雨/j/;t w-0;s/暴雨/j/;t w-0;s/中到大雨/i/;t w-0;s/大雨/i/;t w-0;s/小到中雨/h/;t w-0;s/中雨/h/;t w-0;s/小雨/s/;t w-0;s/阵雨/g/;t w-0;s/阴/f/;t w-0;s/多云/e/;t w-0;s/雾/u/;t w-0;s/晴/a/;t w-0;s/转//;t w-0;:w-0;'}${color}${font}
${goto 105}${voffset -15}${font Arrows:style=Bold:size=18}${color0}${voffset -10}${execi 600 sed  's/^.*"WD":"//' /tmp/current | sed 's/",".*$//' | sed 's/无持续风向/v/;t w-0;s/旋转风/v/;t w-0;s/西北风/g/;t w-0;s/西南风/c/;s/东北风/k/;t w-0;s/东南风/o/;t w-0;t w-0;s/南风/a/;t w-0;s/西风/e/;t w-0;s/北风/i/;t w-0;s/东风/m/;t w-0;s/转//;t w-0;:w-0;'}${color}${font}
${voffset -22}${goto 35}${color2}${execi 600 sed  's/^.*"city":"//' /tmp/current | sed 's/",".*$//' }: ${execi 600 sed  's/^.*"img_title_single":"//' /tmp/forcast | sed 's/",".*$//' } ${alignr}湿度:${execi 600 sed  's/^.*"SD":"//' /tmp/current | sed 's/",".*$//' }${color} 
${voffset 0}${goto 35}${color2}${execi 600 sed  's/^.*"WD":"//' /tmp/current | sed 's/",".*$//' } ${execi 600 sed  's/^.*"WS":"//' /tmp/current | sed 's/",".*$//' } ${alignr}${execbar sed  's/^.*"SD":"//' /tmp/current | sed 's/",".*$//'}${color}${font}
${voffset 5}${color0}${font ConkyWeather:size=24}E${font}${color}
${voffset -35}${goto 32}${font WenQuanYi Micro Hei:size=8}今日: ${color2}${execi 600 sed  's/^.*"temp":"//' /tmp/current | sed 's/",".*$//' }°C${color} ${alignr}早晚:${color2}${execi 600 sed  's/^.*"temp1":"//' /tmp/forcast | sed 's/",".*$//' | sed 's/℃//'| sed 's/℃/°C/' }${color}
${goto 32}${font WenQuanYi Micro Hei:size=8}明日: ${color1}${execi 600 sed  's/^.*"weather2":"//' /tmp/forcast | sed 's/",".*$//' } ${alignr}${execi 600 sed  's/^.*"temp2":"//' /tmp/forcast | sed 's/",".*$//' | sed 's/℃//'| sed 's/℃/°C/'}${color}${font}
${goto 32}${font WenQuanYi Micro Hei:size=8}后日: ${color1}${execi 600 sed  's/^.*"weather3":"//' /tmp/forcast | sed 's/",".*$//' } ${alignr}${execi 600 sed  's/^.*"temp3":"//' /tmp/forcast | sed 's/",".*$//' | sed 's/℃//'| sed 's/℃/°C/' }${color}${font}

是网站的问题,用了新的网站,自己编个sed就可以了。不过可能不通用!!
头像
eagle5678
帖子: 1883
注册时间: 2006-07-08 14:07

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#749

帖子 eagle5678 » 2016-09-20 15:29

股票这个字怎对齐,好像alg跟awk都管不了
附件
深度截图20160920151857.png
深度截图20160920151857.png (59.05 KiB) 查看 12578 次
头像
yq-ysy
论坛版主
帖子: 4554
注册时间: 2008-07-19 12:44
来自: 广西(桂)南宁(邕)

Re: 使用CONKY-colors配置和汉化conky完全教程,兼容13.04版Unity桌面和Gnome-Shell

#750

帖子 yq-ysy » 2016-09-22 8:50

eagle5678 写了:股票这个字怎对齐,好像alg跟awk都管不了
对不起,我也不知道。因为这种表格式的对齐,程序写起来很麻烦……
股票价格,每个股票不一样,需要对读取的数据进行判断,有多少位,
然后针对位数少的,统统用空格补齐缺失的位数,然后在逐个排列……
回复