conky的主体配置文件

文件及目录: /usr/share/conky-data/themes/MX-Infinity/MX-Infinity-conkyrc文件 

参考:https://zhuanlan.zhihu.com/p/410716918和lua语言和conky的文档:

----------------------
--  MX-Infinity  --
--  mx-devs oct 25 --
----------------------

conky.config = {

no_buffers = true,
double_buffer = true,
update_interval = 30,
    
background = true,
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',
own_window_colour = '000000',
own_window_class = 'Conky',
own_window_title = 'DatetimeConky',

draw_borders = false,
stippled_borders = 5,
border_inner_margin = 5,
border_outer_margin = 5,
border_width = 2,
draw_graph_borders = yes,
draw_shades = false,
default_shade_color = '333333',
imlib_cache_size = 0,
draw_outline = false,
default_outline_color = '000000',

use_xft = true,
fontbig = 'DejaVu Sans:size=28',
font = 'DejaVu Sans:size=20',
fontsmall = 'DejaVu Sans:size=14',
xftalpha = 1,
override_utf8_locale = true,
uppercase = false,
use_spacer = 'none',
text_buffer_size = 6144,
short_units = true,
pad_percents = 2,

default_color = 'd8dee9', --clear
color1 = 'c16b29', --orange
color2 = '92afd5', --light blue
color3 = '6787B2', --blue

minimum_width = 225,
maximum_width = 225,
minimum_height = 0,
gap_x = 10,
gap_y = 10,
alignment = 'top_right',

lua_load = 'lua/conky.lua',
};

-- fluxbox adjustment
-- requires fluxbox to be running, increase sleep time in conky-startup.sh if necessary
if os.execute('pidof -q fluxbox') and not os.execute('pidof -q picom') then
   conky.config.own_window_argb_visual = false
end

conky.text = [[
### SET 12H/24H ###
${if_match "${lua time A}" == "${time %A}"}${lua set_time A}\
${else}${lua set_time a}${endif}\
${if_match "${lua time B}" == "${time %B}"}${lua set_time B}\
${else}${lua set_time b}${endif}\
### HOUR ###
# to force 12H/24H replace ${lua hour} with ${lua hour 12H} or ${lua hour 24H} 
${color2}${voffset -5}${font DejaVu Sans:size=128}${alignc}${lua hour}${font}
${color1}$hr
### HIDE/SHOW AM PM ###
${if_match "${lua cjk}" == "false"}\
${font DejaVu Sans:size=20}\
${else}\
${font wqy-microhei:size=20}\
${endif}\
# to force 12H/24H replace ${lua AM_PM} with ${lua AM_PM 12H} or ${lua AM_PM 24H} 
${color2}${voffset -105}${offset 180}${lua AM_PM}${font}
### DATE ###
${if_match "${lua cjk}" == "false"}\
${font DejaVu Sans:size=20}\
${else}\
${font wqy-microhei:size=20}\
${endif}\
${color3}${voffset 75}${alignc}${lua date}${font}
${color2}$hr
### MINUTES ###
${color1}${voffset -15}${font DejaVu Sans:size=128}${alignc}${lua minute}${color}${font}
${color3}$hr
### MEM/CPU ###
${color3}${goto 10}${font DejaVu Sans:size=12}MEM: ${color1}${goto 80}${lua memperc}% ${color3}${goto 140}CPU: ${color1}${goto 190}${lua cpu}%${font}
### CORRECTION WIDGET HEIGHT ###
${voffset -90}
]];

修改比较简单,不再赘述。

 

posted @ 2026-01-22 14:37  叕叒双又  阅读(4)  评论(0)    收藏  举报