ubuntu美化、CPU等资源信息桌面和状态栏显示

先看效果:
在这里插入图片描述

1. 安装gnome

gnome有一个丰富的插件库,网址为 https://extensions.gnome.org/ ,该网站收集了数目众多的插件,用于扩充gnome的功能。

sudo apt install chrome-gnome-shell

安装相应库文件

sudo apt install gir1.2-gtop-2.0 gir1.2-nm-1.0 gir1.2-clutter-1.0 gnome-system-monitor

浏览器打开gnome网址 ,搜索system-monitor,安装一下,结果如下
在这里插入图片描述
安装完成的效果如下
在这里插入图片描述

2. 安装conky美化

2.1. 安装conky

Conky 是一个应用于桌面环境的系统监视软件,可以在桌面上监控系统运行状态、网络状态等一系列参数。安装conky

sudo apt install conky

之后使用sudo vim ~/.conkyrc编辑一下.conkyrc文件,修改为如下内容

-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo

Any original torsmo code is licensed under the BSD license

All code written since the fork of torsmo is licensed under the GPL

Please see COPYING for details

Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
Copyright (c) 2005-2012 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
]]

conky.config = {
    own_window_argb_visual = true,
    own_window_argb_value = 0,
    own_window_transparent = true,
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    alignment = 'top_right',
    background = true,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'lightgrey',
    default_outline_color = 'white',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'DejaVu Sans Mono:size=12',
    gap_x = 10,
    gap_y = 60,
    minimum_height = 260,
    minimum_width = 5,
    maximum_width = 400,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_x = true,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'desktop',
    show_graph_range = false,
    show_graph_scale = false,
    stippled_borders = 0,
    update_interval = 3.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true
}

conky.text = [[
 ${color grey}${font StyleBats:size=16}S${font OpenLogos:size=10}  System$stippled_hr
    ${color yellow}User:${alignr}${exec whoami}
    Kernel: ${alignr}$kernel
    Temp: ${alignr}${acpitemp} °C

    ${color grey}${font PizzaDude Bullets:size=16}T${font :size=10}   Date&Time $stippled_hr
    ${color green}${font :size=11} ${time %Y/%m/%e  %H:%M:%S}${alignr}   Week:${time %w}
    ${color grey}Uptime:${color #A080F0}     $uptime
     
    ${color grey} ${font StyleBats:size=16}V${font OpenLogos:size=10}   CPU&MEM $stippled_hr
    ${color green}${font OpenLogos:size=10} CPU@${freq}MHz: ${cpu cpu1}%${alignr}${cpubar cpu1 8,60}
    ${color green} CPU@${freq}MHz: ${cpu cpu2}%${alignr}${cpubar cpu2 8,60}
     
    ${color grey}${font StyleBats:size=16}T${font OpenLogos:size=10}  Thread$stippled_hr
    ${color grey}Name                     PID            CPU%          ${alignr}MEM%
    ${color #FF8C00} ${top name 1}      ${top pid 1}     ${top cpu 1} ${alignr}${top mem 1}
    ${color #FFA54F} ${top name 2}      ${top pid 2}     ${top cpu 2} ${alignr}${top mem 2}
    ${color #FFD700} ${top name 3}      ${top pid 3}     ${top cpu 3} ${alignr}${top mem 3}
    ${color #FFEC8B} ${top name 4}      ${top pid 4}     ${top cpu 4} ${alignr}${top mem 4}
     
    ${color grey}${font StyleBats:size=16}E${font :size=10}   MEMORY $stippled_hr
    ${color #F05020}RAM : $mem/$memmax - $memperc% ${membar 6}
    ${color green}Swap : $swap/$swapmax  ${swapbar 6}
    /:  ${fs_used /}/${fs_size /}         ${fs_bar 6 /}
    
    ${color grey} ${font PizzaDude Bullets:size=16}@${font OpenLogos:size=10}   NETWORK $stippled_hr
    ${color green}wired IP: ${addr ens33} 
    Up: ${upspeedf ens33} KB/s Down: ${downspeedf ens33} KB/s
     
    ${color grey}${font StyleBats:size=16}C ${font :size=10} CPU Temp:$stippled_hr${font OpenLogos:size=10}$color
    ${color blue}${exec sensors | grep 'Core 0'}
    ${color blue}${exec sensors | grep 'Core 1'}
    ${color blue}${exec sensors | grep 'Core 2'}
    ${color blue}${exec sensors | grep 'Core 3'}
]]

2.2. 设置开机自启

终端输入gnome-session-properties打开启动应用程序首选项,添加conkyrc开机自启即可
在这里插入图片描述

3. 文本编辑器侧边栏

文本编辑器的侧边栏也可以设置开一下,如果在桌面环境下使用文本编辑器。
菜单->查看->侧边栏
效果如下:
在这里插入图片描述

  • 4
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值