conky - 如何在 Ubuntu 22.04 中显示操作系统名称和版本以及 Gnome 版本

conky - 如何在 Ubuntu 22.04 中显示操作系统名称和版本以及 Gnome 版本

conky 在桌面上运行完美 - 我只想添加这个额外的信息。感谢您的任何建议。稍微修改了 ~/.conkyrc 以便在右侧清晰显示:

-- Conky, a system monitor https://github.com/brndnmtthws/conky
--
-- This configuration file is Lua code. You can write code in here, and it will
-- execute when Conky loads. You can use it to generate your own advanced
-- configurations.
--
-- Try this (remove the `--`):
--
--   print("Loading Conky config")
--
-- For more on Lua, see:
-- https://www.lua.org/pil/contents.html

conky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'white',
    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=10',
    gap_x = 60,
    gap_y = 60,
    minimum_height = 5,
    minimum_width = 5,
    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 = 1.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
    own_window_argb_visual = true,
    own_window_argb_value = 50,
    double_buffer = true,
    update_interval = 2.0,
}

conky.text = [[
${color grey}Info:$color ${scroll 32 Conky $conky_version}
${color grey}System:$color $sysname
${color}$nodename
${color grey}Kernel:$color $kernel
${color grey}Machine:$color $machine
$hr
${color grey}Uptime:$color $uptime
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
${color grey}CPU temperature:$color ${hwmon 4 temp 1}°C
${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes
$hr
${color grey}File systems:
 / $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color grey}Wireless networking:
Up:$color ${upspeed wlp13s0} ${color grey} - Down:$color ${downspeed wlp13s0}
${color grey}ESSID:${color} ${wireless_essid wlp13s0}
${color grey}Bitrate:${color} ${wireless_bitrate wlp13s0}
${color grey}Link quality:${color} ${wireless_link_qual_perc wlp13s0}%
$hr
${color grey}Name              PID     CPU%   MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color lightgrey} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
${color lightgrey} ${top name 6} ${top pid 6} ${top cpu 6} ${top mem 6}
]]

答案1

${execi 86400 lsb_release -d -c} 这有效!

相关内容