conky在ubuntu xfce4下面的配置
環(huán)境:ubuntu16.04 xfce4
編輯/etc/conky/conky.conf
或者編輯
~/.conkyrc
任選其一即可。
?
內(nèi)容如下:
conky.config = { background = true, update_interval=1, double_buffer=true, imlib_cache_size=10, draw_shades=false, draw_outline=false, draw_borders = false, draw_graph_borders = false, show_graph_scale = false, show_graph_range = false, minimum_height = 620, minimum_width = 268, own_window = true, own_window_class = 'Conky', own_window_type = 'normal', own_window_transparent=true, border_inner_margin=0, border_outer_margin=0, own_window_hints="undecorated,below,sticky,skip_taskbar,skip_pager", own_window_argb_visual=true, own_window_argb_value=0, use_xft = true, xftalpha=0.8, font = 'Waree:size=11:style=bold', text_buffer_size=256, short_units=true, short_units=true, pad_percents=2, top_name_width=10,alignment = 'top_right',border_width = 1,cpu_avg_samples = 2,default_color = 'white',gap_x = 25,gap_y = 230,net_avg_samples = 2,no_buffers = true,out_to_console = false,out_to_stderr = false,extra_newline = false,stippled_borders = 0,update_interval = 1.0,uppercase = false,use_spacer = 'none',}conky.text = [[ ${scroll 16 $nodename - $sysname $kernel on $machine | } $hr ${color white}Uptime:$color $uptime ${color white}Frequency (in MHz):$color $freq ${color white}Frequency (in GHz):$color $freq_g ${color white}RAM Usage: ${color red}$memperc% $mem/$memmax ${color red}${membar 4} ${color red}CPU Usage:$color $cpu% ${cpubar 4} ${color white}Processes:$color $processes ${color white}Running:$color $running_processes $hr ${color white}File systems: $color${fs_used /}/${fs_size /} ${fs_bar 6 /} ${color white}Networking:Up:$color ${upspeed wlan0} ${color white} - Down:$color ${downspeed wlan0} $hr ${color white}Name PID CPU% MEM% ${color white} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1} ${color white} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2} ${color white} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3} ${color white} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4} ${color white} ${top name 5} ${top pid 5} ${top cpu 4} ${top mem 5}]]效果如下:
? ? 其中
alignment = 'bottom_right',
可以改成top_left或者top_right等,但是感覺對(duì)于上下位置,該語句作用不明顯,以后再探究
另外注意,如果使用的是無線的話,那么上面的eth0需要改為wlan0,具體改為什么,由
網(wǎng)絡(luò)環(huán)境來決定.
然后大致說下我對(duì)這個(gè)語法的理解,
conky中一般每設(shè)置一個(gè)東西前,都可以在前面加入顏色,例如
${color white}RAM Usage:${color red}$memperc% ? ?
另外,關(guān)于進(jìn)度條,你只要在conky的腳本中,進(jìn)度條所在的那行代碼前面多敲入一些空格,然后保存,就會(huì)發(fā)現(xiàn)conky中的進(jìn)度條長(zhǎng)度長(zhǎng)度邊長(zhǎng)了.
(Gap_x,Gap_y)是conky顯示的坐標(biāo),alignment用來決定(Gap_x,Gap_y)的坐標(biāo)原點(diǎn)是電腦屏幕的哪個(gè)角落,
例如alignment = 'top_right'時(shí),那么桌面的右上角就是原點(diǎn).
開機(jī)啟動(dòng):
root@ubuntu:/usr/local/bin# touch startconky
root@ubuntu:/usr/local/bin# chmod u+x startconky?
root@ubuntu:/usr/local/bin# sublime startconky?
添加以下代碼:
#!/bin/sh sleep 20
?
?
參考鏈接:
https://blog.csdn.net/wdjhzw/article/details/39188389
https://blog.csdn.net/bwlab/article/details/46954227(有主題的下載連接)
總結(jié)
以上是生活随笔為你收集整理的conky在ubuntu xfce4下面的配置的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ubuntu16.04 Linux+xf
- 下一篇: sublime代码整理