Conky--linux自定义桌面监控
来源:互联网 发布:邮储银行网络培训学员 编辑:程序博客网 时间:2024/05/09 13:06
Conky可以对linux硬件设备进行实时监控,并且显示在桌面上。
好吧说实话,就是为了装逼 ^_^!
首先,先贴图:
右边就是conky显示的,可以显示进程,内存,显卡温度等等。下载安装在github,这个是支持中文的,而且里面有简单的conky语法说明,具体的conky语法在这里。
我的cinkyrc文件如下:
####################### - Conky settings - #######################update_interval 1total_run_times 0net_avg_samples 1cpu_avg_samples 1if_up_strictness linkimlib_cache_size 0double_buffer yesno_buffers yesformat_human_readable###################### - Text settings - ######################use_xft yesxftfont WenQuanYi Micro Hei:size=8override_utf8_locale yestext_buffer_size 2048############################## - Window specifications - ##############################own_window_class Conkyown_window yesown_window_type normalown_window_transparent yesown_window_argb_visual yesown_window_argb_value 200own_window_hints undecorated,below,sticky,skip_taskbar,skip_pageralignment top_leftgap_x 25gap_y 40minimum_size 182 900maximum_width 182default_bar_size 60 8########################## - Graphics settings - ##########################draw_shades nodefault_color cccccccolor0 cyancolor1 greencolor2 orangecolor3 204A87TEXT${font Liberation Sans:style=Bold:size=8}SYSTEM $stippled_hr${font}############### - SYSTEM - ###############${color0}${voffset 8}${offset 4}${font ConkyColorsLogos:size=9}l${font}${color}${voffset -16}${color0}${font ConkyColors:size=16}b${font}${color}${goto 32}${voffset -29}Kernel: ${alignr}${color2}${kernel}${color}${goto 32}Uptime: ${alignr}${color2}${uptime}${color}# |--CPU${voffset 4}${color0}${font ConkyColors:size=16}c${font}${offset -20}${voffset 6}${cpubar cpu0 4,17}${color}${voffset -16}${goto 32}CPU1: ${font Liberation Sans:style=Bold:size=8}${color1}${cpu cpu1}%${color}${font} ${alignr}${color2}${cpubar cpu1 8,60 3465A4 204A87}${color}${goto 32}CPU2: ${font Liberation Sans:style=Bold:size=8}${color1}${cpu cpu2}%${color}${font} ${alignr}${color2}${cpubar cpu2 8,60 3465A4 204A87}${color}${goto 32}CPU3: ${font Liberation Sans:style=Bold:size=8}${color1}${cpu cpu3}%${color}${font} ${alignr}${color2}${cpubar cpu3 8,60 3465A4 204A87}${color}${goto 32}CPU4: ${font Liberation Sans:style=Bold:size=8}${color1}${cpu cpu4}%${color}${font} ${alignr}${color2}${cpubar cpu4 8,60 3465A4 204A87}${color}# |--MEM${voffset 2}${color0}${font ConkyColors:size=15}g${font}${color}${goto 32}${voffset -7}RAM: ${font Liberation Sans:style=Bold:size=8}${color1}$memperc%${color}${font}${offset 1}${goto 32}F: ${font Liberation Sans:style=Bold:size=8}${color2}${memeasyfree}${color}${font} ${goto 120}${voffset -3}T: ${font Liberation Sans:style=Bold:size=8}${color2}${memmax}${color}${font}# |--SWAP${voffset 2}${color0}${font ConkyColors:size=15}z${font}${color}${voffset -8}${goto 32}SWAP: ${font Liberation Sans:style=Bold:size=8}${color1}${swapperc}%${color}${font}${voffset 2}${offset 1}${color}${voffset -2}${goto 32}F: ${font Liberation Sans:style=Bold:size=8}${color2}$swapmax${color}${font} ${goto 120}${voffset -3}T: ${font Liberation Sans:style=Bold:size=8}${color2}$swapmax${color}${font}# |--PROC${voffset 4}${color0}${font ConkyColors:size=16}C${font}${color}${goto 32}${voffset -10}Processes: ${color2}${alignr 26}PID${alignr 10}CPU${alignr}RAM${color}${voffset -1}${goto 32}${color2}${top_mem name 1}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 95}${top_mem pid 1}${goto 126}${top_mem cpu 1}${alignr }${top_mem mem 1}${color}${font}${voffset -1}${goto 32}${color2}${top_mem name 2}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 95}${top_mem pid 2}${goto 126}${top_mem cpu 2}${alignr }${top_mem mem 2}${color}${font}${voffset -1}${goto 32}${color2}${top_mem name 3}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 95}${top_mem pid 3}${goto 126}${top_mem cpu 3}${alignr }${top_mem mem 3}${color}${font}############## - CLOCK - ##############${voffset 4}${font Liberation Sans:style=Bold:size=8}DATE $stippled_hr${font}${voffset -2}${color2}${font Liberation Sans:style=Bold:size=30}${time %H:%M}${font}${color} ${voffset -20}${alignr }${font WenQuanYi Micro Hei:size=18}${time %A}${font}${color #8AE234}$hr${color}${alignc 20}${time %d %B %Y}${font WenQuanYi Micro Hei:size=8}${alignr }${execpi 300 ~/.conkycolors/bin/lunar}${font}############### - NVIDIA - ###############${voffset 4}${font Liberation Sans:style=Bold:size=8}NVIDIA $stippled_hr${font}${color0}${voffset 2}${font ConkyColorsLogos:size=16}n${font}${color}${goto 32}${voffset -8}GPU Temp:${alignr}${font Liberation Sans:style=Bold:size=8}${color1} ${exec nvidia-settings -q [gpu:0]/GPUCoreTemp | grep Attribute | cut -d ' ' -f 6 | cut -c 1-2}${font}${color}°C#${goto 32}GPU Clock:${alignr}${font Liberation Sans:style=Bold:size=8}${color1} ${exec nvidia-settings -q [gpu:0]/GPU2DClockFreqs -t}${font}${color}MHz${goto 32}Video RAM:${alignr}${font Liberation Sans:style=Bold:size=8}${color1} ${exec nvidia-settings -q [gpu:0]/VideoRam -t}${font}${color}KiB${goto 32}Driver Version:${alignr}${font Liberation Sans:style=Bold:size=8}${color1} ${exec nvidia-settings -q [gpu:0]/NvidiaDriverVersion -t}${font}${color}########### - HD - ###########${voffset -4}${font Liberation Sans:style=Bold:size=8}HD $stippled_hr${font}${execpi 30 /usr/local/share/conkycolors/bin/conkyHD1}################ - NETWORK - ################${voffset -20}${font Liberation Sans:style=Bold:size=8}NETWORK $stippled_hr${font}# |--WLAN0${if_up wlan0}${voffset -5}${color0}${font ConkyColors:size=15}s${font}${color}${goto 32}${voffset -12}Up: ${font Liberation Sans:style=Bold:size=8}${color1}${upspeed wlan0}${color}${font} ${alignr}${color2}${upspeedgraph wlan0 8,60 3465A4 204A87}${color}${goto 32}Total: ${font Liberation Sans:style=Bold:size=8}${color2}${totalup wlan0}${color}${font}${voffset 2}${color0}${font ConkyColors:size=15}t${font}${color}${goto 32}${voffset -12}Down: ${font Liberation Sans:style=Bold:size=8}${color1}${downspeed wlan0}${color}${font} ${alignr}${color2}${downspeedgraph wlan0 8,60 3465A4 204A87}${color}${goto 32}Total: ${font Liberation Sans:style=Bold:size=8}${color2}${totaldown wlan0}${color}${font}${color0}${font ConkyColors:size=15}j${font}${color}${voffset -6}${goto 32}Signal: ${font Liberation Sans:style=Bold:size=8}${color1}${wireless_link_qual_perc wlan0}%${color}${font} ${alignr}${color2}${wireless_link_bar 8,60 wlan0}${color}${voffset 2}${color0}${font ConkyColors:size=15}B${font}${color}${goto 32}${voffset -6}Local IP: ${alignr}${color2}${addr wlan0}${color}# |--ETH0${else}${if_up eno1}${voffset -5}${color0}${font ConkyColors:size=15}s${font}${color}${goto 32}${voffset -12}Up: ${font Liberation Sans:style=Bold:size=8}${color1}${upspeed eno1}${color}${font} ${alignr}${color2}${upspeedgraph eno1 8,60 3465A4 204A87}${color}${goto 32}Total: ${font Liberation Sans:style=Bold:size=8}${color2}${totalup eno1}${color}${font}${voffset 4}${color0}${font ConkyColors:size=15}t${font}${color}${goto 32}${voffset -12}Down: ${font Liberation Sans:style=Bold:size=8}${color1}${downspeed eno1}${color}${font} ${alignr}${color2}${downspeedgraph eno1 8,60 3465A4 204A87}${color}${goto 32}Total: ${font Liberation Sans:style=Bold:size=8}${color2}${totaldown eno1}${color}${font}${voffset 2}${color0}${font ConkyColors:size=15}B${font}${color}${goto 32}${voffset -6}Local IP: ${alignr}${color2}${addr eno1}${color}# |--ENP4S0${else}${if_up enp4s0}${voffset -5}${color0}${font ConkyColors:size=15}s${font}${color}${goto 32}${voffset -12}Up: ${font Liberation Sans:style=Bold:size=8}${color1}${upspeed enp4s0}${color}${font} ${alignr}${color2}${upspeedgraph enp4s0 8,60 3465A4 204A87}${color}${goto 32}Total: ${font Liberation Sans:style=Bold:size=8}${color2}${totalup enp4s0}${color}${font}${voffset 2}${color0}${font ConkyColors:size=15}t${font}${color}${goto 32}${voffset -12}Down: ${font Liberation Sans:style=Bold:size=8}${color1}${downspeed enp4s0}${color}${font} ${alignr}${color2}${downspeedgraph enp4s0 8,60 3465A4 204A87}${color}${goto 32}Total: ${font Liberation Sans:style=Bold:size=8}${color2}${totaldown enp4s0}${color}${font}${voffset 4}${color0}${font ConkyColors:size=15}B${font}${color}${goto 32}${voffset -6}Local IP: ${alignr}${color2}${addr enp4s0}${color}# |--PPP0${else}${if_up ppp0}${voffset -5}${color0}${font ConkyColors:size=15}s${font}${color}${goto 32}${voffset -12}Up: ${font Liberation Sans:style=Bold:size=8}${color1}${upspeed ppp0}${color}${font} ${alignr}${color2}${upspeedgraph ppp0 8,60 3465A4 204A87}${color}${goto 32}Total: ${font Liberation Sans:style=Bold:size=8}${color2}${totalup ppp0}${color}${font}${voffset 2}${color0}${font ConkyColors:size=15}t${font}${color}${goto 32}${voffset -12}Down: ${font Liberation Sans:style=Bold:size=8}${color1}${downspeed ppp0}${color}${font} ${alignr}${color2}${downspeedgraph ppp0 8,60 3465A4 204A87}${color}${goto 32}Total: ${font Liberation Sans:style=Bold:size=8}${color2}${totaldown ppp0}${color}${font}${voffset 2}${color0}${font ConkyColors:size=15}B${font}${color}${goto 32}${voffset -6}Local IP: ${alignr}${color2}${addr ppp0}${color}${else}${voffset 4}${color0}${font ConkyColors:size=15}q${font}${color}${voffset -6}${goto 32}Network Unavailable${voffset 14}${endif}${endif}${endif}${endif}############## - PHOTO - ##############${voffset -8}${font Liberation sans:style=Bold:size=8}PHOTO $stippled_hr${font}${execi 60 ~/.conkycolors/bin/conkyPhotoRandom}${image /tmp/conkyPhoto.png -s 193x121 -p -2,735}
最后注意,开机启动运行/usr/local/share/conkycolors/bin/conkyStart下的文件。命令运行时会“故意”sleep等待25秒钟,让桌面自动完成后再启动conky。就2行命令:
#!/bin/bashsleep 25 && conky -c ~/.conkycolors/conkyre;
阅读全文
0 0
- Conky--linux自定义桌面监控
- conky - linux desktop 漂亮的桌面系统资源使用监控软件
- Conky-桌面系统监控软件
- 由Conky说说Linux桌面美化
- LINUX 桌面显示系统信息conky
- linux系统监控工具——Conky
- Ubuntu安装酷的桌面监控陈程序Conky
- conky实现桌面幻灯片
- conky 一点桌面 就消失
- conky 增加cpu温度监控
- linux 的conky新版配置文件 conky.conf
- crunchbang linux + conky
- ubuntu使用conky添加桌面控件
- Ubuntu14.04下使用conky美化桌面
- Conky
- conky
- musca+conky+tint2+stalonetray组合而成的日常桌面
- Linux Ubuntu自定义快捷键, 如“显示桌面”
- hibernate加载策略session.load()与session.get()---【小白系列】0基础到熟练应用hibernate框架(五)
- keras 迁移学习, 微调, model的predict函数定义
- python_爬虫http协议
- 流程控制
- 并查集 排列组合 In Chinese Restaurant:URAL
- Conky--linux自定义桌面监控
- 2017身残志坚的定西考生魏祥上清华
- windows部署iBase4J
- H5滚动翻页
- Android4.4蓝牙耳机HFP流程分析-3
- Camera和Camera2的应用
- sublime Text 3配置
- Druid Spring Boot Starter数据库链接池新福利
- 百家争鸣:Android开源框架排行榜