Ubuntu14.04强化之conky——Harmattan主题
- Cards
- Elementary
- Elune
- Flatts
- Metro
- New-Minty
- Nord
- Numix
- Transparent
- Ubuntu-Touch
- Zukitwo
- Zukitwo-v2
- Zukitwo-v3
- Zukitwo-Dark
- Button
- Texture
- OMG-Ubuntu!
- Mini
- Compact
- Comfortable
- God-Mode
- fav-color
- weather-photos
从deviantART下载zip文件,然后解压。将.conky-weather文件夹和位于主题文件夹的.conkyrc文件(你可能需要按Ctrl+H来显示这些隐藏文件)移动到你的home文件夹。用所要使用主题的.conkyrc文件替换在home文件夹的.conkyrc文件,就能更换主题。
下载之后text位置相当混乱,经过一番耐心调整,基本接近原版,见图(话说基本是一遍一遍地试,没学它的语法…)
添加开机启动:在Dash中搜索进入Startup Applications即启动应用程序,添加一条conky开机启动的命令: /usr/bin/conky -p 10, 其中“-p 10”表示用户登录5秒后才开始载入conky,否则conky先于桌面启动会一直占据桌面顶层,覆盖所有窗口。
关于怎么修改天气预报的城市:关键语句为
curl -s "http://weather.yahooapis.com/forecastrss?w=12713587&u=c" -o ~/.cache/weather.xml
使用的是雅虎API来创建地天气预报,url中w的值对应城市的ID,u的值用于确定温度的单位(c是摄氏度f是华氏度)。
到这里搜索你的城市,找到ID号,比如我是成都
ID即为12713587,替换配置文件中的w值即可。
附上配置文件:)P.S:我修改了日期显示。因为原版是英文系统,我的是中文系统,日期显示的时候会变成一半中文一半数字…
# Conky settings #
background yes
update_interval 1
double_buffer yes
no_buffers yes
imlib_cache_size 10 # Window specifications #
gap_x 100
gap_y 50
minimum_size 268 620
maximum_width 268
own_window yes
own_window_type override # other options are: override/dock/desktop/panel
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
#alignment middle_middle
#own_window_argb_visual yes
#own_window_argb_value 0 # Graphics settings #
draw_shades no
default_shade_color AAAAAA
draw_outline no
default_outline_color AAAAAA
draw_borders no
draw_graph_borders no
default_graph_size 26 80
show_graph_scale no
show_graph_range no # Text settings #
use_xft yes
xftalpha 0
xftfont Droid Sans:size=8
text_buffer_size 256
override_utf8_locale yes # Useful shortenings #
short_units yes
pad_percents 2
top_name_width 7 # Color scheme #
default_color DCDCDC
color1 DCDCDC
color2 DCDCDC
color3 DCDCDC
color4 F9F9F9
color5 D64937
color6 888888
color7 484848
color8 2D2D2D TEXT
# Various images #
${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=44418&u=c" -o ~/.cache/weather.xml}
${image ~/.conky-weather/assets/Numix/God-Mode/top-bg.png -p 20,30 -s 228x61}\
${image ~/.conky-weather/assets/Numix/God-Mode/bottom-bg.png -p 20,473 -s 228x119}\
${image ~/.conky-weather/assets/Numix/God-Mode/border.png -p 20,91 -s 228x86}\
${image ~/.conky-weather/assets/Numix/God-Mode/fav-color.png -p 20,91 -s 228x86}\
${image ~/.conky-weather/assets/Numix/God-Mode/bg-1.png -p 20,177 -s 228x86}\
${image ~/.conky-weather/assets/Numix/God-Mode/bg-2.png -p 20,263 -s 228x105}\
${image ~/.conky-weather/assets/Numix/God-Mode/bg-3.png -p 20,368 -s 228x105}\
${image ~/.conky-weather/assets/Numix/God-Mode/bg-4.png -p 20,478 -s 228x14}\
${image ~/.conky-weather/assets/Numix/God-Mode/separator-v.png -p 95,185 -s 1x76}\
${image ~/.conky-weather/assets/Numix/God-Mode/separator-v.png -p 172,185 -s 1x76}\
${image ~/.conky-weather/assets/Numix/God-Mode/separator-h.png -p 33,369 -s 202x1}\
${image ~/.conky-weather/assets/Numix/God-Mode/separator-h.png -p 33,269 -s 202x1}\
\
# The days of the forecast #
\
${color3}${voffset 168}${alignc 77}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1' | tr '[a-z]' '[A-Z]'}${color}
${color3}${voffset -15}${alignc}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2' | tr '[a-z]' '[A-Z]'}${color}
${color3}${voffset -15}${alignc -76}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3' | tr '[a-z]' '[A-Z]'}${color}
\
# The temperatures of the forecast #
\
${color2}${voffset 51}${alignc 75}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°/${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1'}°${color}
${color2}${voffset -15}${alignc -2}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°/${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°${color}
${color2}${voffset -15}${alignc -77}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°/${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°${color}
\
# The "conditions" section of the conky #
\
${goto 36}${voffset -180}${font Droid Sans :size=36}${color4}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°${font}${color}
${goto 46}${voffset 11}${font Droid Sans :size=12}${color4}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${font}${color}
${color1}${alignr 52}${voffset -76}${execi 300 grep "yweather:atmosphere" ~/.cache/weather.xml | grep -o "pressure=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} ${execi 300 grep "yweather:units" ~/.cache/weather.xml | grep -o "pressure=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}
${color1}${alignr 52}${voffset 5}${execi 300 grep "yweather:atmosphere" ~/.cache/weather.xml | grep -o "humidity=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} %${color}
${color1}${alignr 52}${voffset 7}${execi 300 grep "yweather:wind" ~/.cache/weather.xml | grep -o "speed=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} ${execi 300 grep "yweather:units" ~/.cache/weather.xml | grep -o "speed=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${color}
\
# Clock + calendar #
\
${voffset -119}${font Droid Sans Mono :size=22}${alignc}${color2}${time %H:%M}${font}${color}
${voffset 4}${font Droid Sans :size=10}${alignc}${color6}${time %A, %b %d日}${font}${color}
\
# Cpu, memory, uptime, and load graph #
\
${voffset 294}${goto 40}${color5}Cpu:${color}
${voffset 4}${goto 40}${color5}Mem:${color}
${voffset 4}${goto 40}${color5}Uptime:${color}
${voffset -53}${alignr 39}${color6}${cpu cpu0}%${color}
${voffset 4}${alignr 39}${color6}${memperc}%${color}
${voffset 4}${alignr 39}${color6}${uptime_short}${color}
${voffset -53}${alignc}${color2}${cpubar 5,36}${color}
${voffset 4}${alignc}${color2}${membar 5,36}${color}
${voffset 26}${goto 40}${loadgraph 26,190 D64937 D64937 -l}
\
# The processes section #
\
${voffset 19}${goto 40}${color5}${top_mem name 1}${color}
${voffset 4}${goto 40}${color5}${top_mem name 2}${color}
${voffset 4}${goto 40}${color5}${top_mem name 3}${color}
${voffset 4}${goto 40}${color5}${top_mem name 4}${color}
${voffset 4}${goto 40}${color5}${top_mem name 5}${color}
${voffset -90}${alignc}${color2}${top_mem mem 1}%${color}
${voffset 4}${alignc}${color2}${top_mem mem 2}%${color}
${voffset 4}${alignc}${color2}${top_mem mem 3}%${color}
${voffset 4}${alignc}${color2}${top_mem mem 4}%${color}
${voffset 4}${alignc}${color2}${top_mem mem 5}%${color}
${voffset -90}${alignr 39}${color6}${top_mem mem_res 1}${color}
${voffset 4}${alignr 39}${color6}${top_mem mem_res 2}${color}
${voffset 4}${alignr 39}${color6}${top_mem mem_res 3}${color}
${voffset 4}${alignr 39}${color6}${top_mem mem_res 4}${color}
${voffset 4}${alignr 39}${color6}${top_mem mem_res 5}${color}
${voffset -113}${goto 40}${color1}Proc${color}
${voffset -15}${alignc -3}${color1}Mem%${color}
${voffset -15}${alignr 41}${color1}Mem${color}
\
# The network section #
\
${if_existing /proc/net/route ppp0}
${voffset -227}${goto 40}${color5}Up: ${color2}${upspeed ppp0}${color5}${goto 150}Down: ${color2}${downspeed ppp0}
${voffset 10}${goto 40}${upspeedgraph ppp0 26,80 d64937 d64937}${goto 150}${downspeedgraph ppp0 26,80 d64937 d64937}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup ppp0}${color5}${goto 150}Received: ${color2}${totaldown ppp0}
${else}
${if_existing /proc/net/route ppp1}
${voffset -240}${goto 40}${color5}Up: ${color2}${upspeed ppp1}${color5}${goto 150}Down: ${color2}${downspeed ppp1}
${voffset 10}${goto 40}${upspeedgraph ppp1 26,80 d64937 d64937}${goto 150}${downspeedgraph ppp1 26,80 d64937 d64937}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup ppp1}${color5}${goto 150}Received: ${color2}${totaldown ppp1}
${else}
${if_existing /proc/net/route wlp2s1}
${voffset -253}${goto 40}${color5}Up: ${color2}${upspeed wlp2s1}${color5}${goto 150}Down: ${color2}${downspeed wlp2s1}
${voffset 10}${goto 40}${upspeedgraph wlp2s1 26,80 d64937 d64937}${goto 150}${downspeedgraph wlp2s1 26,80 d64937 d64937}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup wlp2s1}${color5}${goto 150}Received: ${color2}${totaldown wlp2s1}
${else}
${if_existing /proc/net/route wlp2s0}
${voffset -266}${goto 40}${color5}Up: ${color2}${upspeed wlp2s0}${color5}${goto 150}Down: ${color2}${downspeed wlp2s0}
${voffset 10}${goto 40}${upspeedgraph wlp2s0 26,80 d64937 d64937}${goto 150}${downspeedgraph wlp2s0 26,80 d64937 d64937}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup wlp2s0}${color5}${goto 150}Received: ${color2}${totaldown wlp2s0}
${else}
${if_existing /proc/net/route wlan0}
${voffset -279}${goto 40}${color5}Up: ${color2}${upspeed wlan0}${color5}${goto 150}Down: ${color2}${downspeed wlan0}
${voffset 8}${goto 40}${upspeedgraph wlan0 26,80 d64937 d64937}${goto 150}${downspeedgraph wlan0 26,80 d64937 d64937}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup wlan0}${color5}${goto 150}Received: ${color2}${totaldown wlan0}
${else}
${if_existing /proc/net/route wlan1}
${voffset -292}${goto 40}${color5}Up: ${color2}${upspeed wlan1}${color5}${goto 150}Down: ${color2}${downspeed wlan1}
${voffset 10}${goto 40}${upspeedgraph wlan1 26,80 d64937 d64937}${goto 150}${downspeedgraph wlan1 26,80 d64937 d64937}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup wlan1}${color5}${goto 150}Received: ${color2}${totaldown wlan1}
${else}
${if_existing /proc/net/route eth1}
${voffset -305}${goto 40}${color5}Up: ${color2}${upspeed eth1}${color5}${goto 150}Down: ${color2}${downspeed eth1}
${voffset 10}${goto 40}${upspeedgraph eth1 26,80 d64937 d64937}${goto 150}${downspeedgraph eth1 26,80 d64937 d64937}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup eth1}${color5}${goto 150}Received: ${color2}${totaldown eth1}
${else}
${if_existing /proc/net/route eth0}
${voffset -338}${goto 40}${color5}Up: ${color2}${upspeed eth0}${color5}${goto 150}Down: ${color2}${downspeed eth0}
${voffset 10}${goto 40}${upspeedgraph eth0 26,80 d64937 d64937}${goto 150}${downspeedgraph eth0 26,80 d64937 d64937}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup eth0}${color5}${goto 150}Received: ${color2}${totaldown eth0}
${else}
${if_existing /proc/net/route enp0s0}
${voffset -331}${goto 40}${color5}Up: ${color2}${upspeed enp0s0}${color5}${goto 150}Down: ${color2}${downspeed enp0s0}
${voffset 10}${goto 40}${upspeedgraph enp0s0 26,80 d64937 d64937}${goto 150}${downspeedgraph enp0s0 26,80 d64937 d64937}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup enp0s0}${color5}${goto 150}Received: ${color2}${totaldown enp0s0}
${else}
${if_existing /proc/net/route enp0s1}
${voffset -344}${goto 40}${color5}Up: ${color2}${upspeed enp0s1}${color5}${goto 150}Down: ${color2}${downspeed enp0s1}
${voffset 10}${goto 40}${upspeedgraph enp0s1 26,80 d64937 d64937}${goto 150}${downspeedgraph enp0s1 26,80 d64937 d64937}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup enp0s1}${color5}${goto 150}Received: ${color2}${totaldown enp0s1}
${else}
${voffset -311}${goto 40}${color5}Network disconnected${color}
${image ~/.conky-weather/assets/Numix/God-Mode/offline.png -p 44,284 -s 16x16}
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
\
# Various images including the icons of the forecast #
\
${image ~/.conky-weather/assets/Numix/God-Mode/pressure.png -p 224,95 -s 16x16}\
${image ~/.conky-weather/assets/Numix/God-Mode/humidity.png -p 224,115 -s 16x16}\
${image ~/.conky-weather/assets/Numix/God-Mode/wind-2.png -p 224,136 -s 16x16}\
${execi 300 cp -f ~/.conky-weather/icons/weather-icons-light2/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1').png ~/.cache/weather-1.png}${image ~/.cache/weather-1.png -p 41,207 -s 32x32}\
${execi 300 cp -f ~/.conky-weather/icons/weather-icons-light2/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2').png ~/.cache/weather-2.png}${image ~/.cache/weather-2.png -p 119,207 -s 32x32}\
${execi 300 cp -f ~/.conky-weather/icons/weather-icons-light2/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3').png ~/.cache/weather-3.png}${image ~/.cache/weather-3.png -p 195,207 -s 32x32}${font}${voffset -120}\
Ubuntu14.04强化之conky——Harmattan主题的更多相关文章
- ubuntu14.04美化
首先我美化grub启动菜单背景和开关机背景,还有自动换壁纸.其它的美化日后再写博文. Grub启动菜单背景更换: 这个很简单,比以前的ubuntu和grub版本简单多了,直接将图片文件放到/boot/ ...
- 轻松学习之Linux教程一 ubuntu14.04+windows双系统安装
本系列文章由@uid=hpw" style="color:rgb(255,0,0)">超人爱因斯坦出品.转载请注明出处. 文章链接:http:// ...
- 制作Ubuntu14.04的Openstack镜像
下载好Ubuntu官方镜像安装文件:不要使用desktop版,在virtualbox和vm上都安装报错,因为不需要桌面,所有没去管了. 第一步.准备好如下文件: 1.ubuntu-14.04.4-se ...
- ubuntu14.04 的ibus不能卸载(安装fcitx输入法框架时可能有这个需求)。出现无system setting有用程序
每年的ubuntu新版本号公布,都会吸引一大批热血青年. 关注越多也让ubuntu越来越好了. 使用ubuntu的人都会在安装系统之后马上安装顺手的输入法,也可能不会.看人. 安装输入法,对于中文输入 ...
- ubuntu14.04
14.10显卡驱动有问题 1.恢复启动引导菜单:启动盘 -> 运行到分区之前,不要分区 -> shift+f10 进入dos -> bootsec /fixmbr ->关闭重启 ...
- win8.1硬盘安装ubuntu14.04双系统
在网上找了很多方法都失败了,原因是大多数方法都是用mbr方式安装的,如grub4dos,easybcd.以至于连自己都怀疑win8能不能用硬盘安装,差点就去买个u盘来安装了,就在打算放弃的时候在ubu ...
- Ubuntu14.04配置Mono+Jexus
总所周知,ASP.NET是微软公司的一项技术,是一个网站服务端开发的一种技术,它可以在通过HTTP请求文档时再在Web服务器上动态创建它们,就是所谓动态网站开发,它依赖运行于 IIS 之中的程序 .但 ...
- ubuntu14.04安装及web环境的搭建
在进行接下来的工作之前首先得准备一个Ubuntu的启动U盘以及腾出一个至少50G的系统盘(在网上看到有人用20G的,不知道效果怎么样).关于Ubuntu启动U盘大家可以参考这个帖子 http://ti ...
- Ubuntu14.04解决远程root-ssh拒绝登录
(1)查看ip地址是否冲突 我在单位的虚拟机ip地址是192.168.14.85,与其它机器冲突了.改成了192.168.14.83 (2)关闭Ubuntu14.04的防火墙 root@stgman- ...
随机推荐
- c# 委托与异步调用
背景:在winform UI中,有时需要对控件进行比较频繁的刷新,如进度条.picturebox显示视频等.如果在主线程进行这些刷新操作,操作还未完成就将执行下一次刷新,程序将发生错误:如果只是创建另 ...
- smarty中的变量使用
在模板中输出动态数据可以用{},所以容易与css中的标签相互冲突,所以使用{literal}{/literal}标签包起来就不会用模板的解析方式解析,变量的来源有三种,用assign方法赋值,系统保留 ...
- web app开发中 iPhone、iPad默认按钮样式问题
webapp开发过程中,用html5+css3很方便,而且可以很方便的编译到Android ios等不同平台,但是ios需要单独处理一下,不然会出现一些想象不到的问题.下面就介绍一下各种问题的解决方法 ...
- 使用html5结构化元素
显示的效果如上边这样,但是有没有发现内容的外侧没有边线(这个难道是因为浏览器不同吗?有待测试) html5中新增加的元素<header>可以明确的告诉浏览器此处是页头,<nav> ...
- iOS开发——手机号,密码,邮箱,身份证号,中文判断
目前这些方面的判断主要是用了正则表达式 手机号的判断,目前主要是长度.均是数字,支持的号段由于第三方通讯比如京东通讯,小米通讯等支持的号段挺多, 有171,170,135,147等等,所以号段限制简单 ...
- iOS启动图片适配问题
Portrait 是竖屏 top home button Landscape是横屏 left home button retina 要求640x1136pixels, 在右边的Image属性 Expe ...
- (poj)1806 Currency Exchange
题目链接:http://poj.org/problem?id=1860 Description Several currency exchange points are working in our ...
- 376. Wiggle Subsequence
A sequence of numbers is called a wiggle sequence if the differences between successive numbers stri ...
- OpenJudge/Poj 1753 Flip Game
1.链接地址: http://bailian.openjudge.cn/practice/1753/ http://poj.org/problem?id=1753 2.题目: 总时间限制: 1000m ...
- 实习笔记-1:sql 2008r2 如何创建定时作业
在公司实习了近一个月,学了很多东西.这一篇是一些比较基础的东西,本人是小菜鸟,不喜欢大神来喷.大神欢迎出门点右上角.谢谢~ 说大实话,对于数据库,我在还没出来实习的时候就是只懂写一些sql语句以及知道 ...