conky脚本一则

conky.conf:

conky.config = {

	--Various settings

	background = true, 							-- forked to background
	cpu_avg_samples = 2,						-- The number of samples to average for CPU monitoring.
	diskio_avg_samples = 10,					-- The number of samples to average for disk I/O monitoring.
	double_buffer = true,						-- Use the Xdbe extension? (eliminates flicker)
	if_up_strictness = 'address',				-- how strict if testing interface is up - up, link or address
	net_avg_samples = 2,						-- The number of samples to average for net data
	no_buffers = true,							-- Subtract (file system) buffers from used memory?
	temperature_unit = 'celsius',				-- fahrenheit or celsius
	text_buffer_size = 2048,					-- size of buffer for display of content of large variables - default 256
	update_interval = 1,						-- update interval
	imlib_cache_size = 0,                       -- disable image cache to get a new spotify cover per song


	--Placement

	alignment = 'middle_right',					-- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right,
												-- middle_left,middle_middle,middle_right,none
	--Arch Duoscreen
	--gap_x = -1910,
	gap_x = 15,									-- pixels between right or left border
	gap_y = 0,									-- pixels between bottom or left border
	minimum_height = 460,						-- minimum height of window
	minimum_width = 200,						-- minimum width of window
	maximum_width = 240,						-- maximum width of window

	--Graphical

	border_inner_margin = 10, 					-- margin between border and text
	border_outer_margin = 5, 					-- margin between border and edge of window
	border_width = 0, 							-- border width in pixels
	default_bar_width = 80,					    -- default is 0 - full width
	default_bar_height = 8,					-- default is 6
	default_gauge_height = 25,					-- default is 25
	default_gauge_width =40,					-- default is 40
	default_graph_height = 40,					-- default is 25
	default_graph_width = 0,					-- default is 0 - full width
	default_shade_color = '#000000',			-- default shading colour
	default_outline_color = '#000000',			-- default outline colour
	draw_borders = false,						-- draw borders around text
	draw_graph_borders = true,					-- draw borders around graphs
	draw_shades = false,						-- draw shades
	draw_outline = false,						-- draw outline
	stippled_borders = 0,						-- dashing the border

	--Textual

	extra_newline = false,						-- extra newline at the end - for asesome's wiboxes
	format_human_readable = true,				-- KiB, MiB rather then number of bytes
	font = 'Roboto Mono:size=10',  				-- font for complete conky unless in code defined
	max_text_width = 0,							-- 0 will make sure line does not get broken if width too smal
	max_user_text = 16384,						-- max text in conky default 16384
	override_utf8_locale = true,				-- force UTF8 requires xft
	short_units = true,							-- shorten units from KiB to k
	top_name_width = 21,						-- width for $top name value default 15
	top_name_verbose = false,					-- If true, top name shows the full command line of  each  process - Default value is false.
	uppercase = false,							-- uppercase or not
	use_spacer = 'none',						-- adds spaces around certain objects to align - default none
	use_xft = true,								-- xft font - anti-aliased font
	xftalpha = 1,								-- alpha of the xft font - between 0-1

	--Windows

	own_window = true,							-- create your own window to draw
	own_window_argb_value = 50,			    -- real transparency - composite manager required 0-255
	own_window_argb_visual = true,				-- use ARGB - composite manager required
	own_window_colour = '#000000',				-- set colour if own_window_transparent no
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',  -- if own_window true - just hints - own_window_type sets it
	own_window_transparent = false,				-- if own_window_argb_visual is true sets background opacity 0%
	own_window_title = 'system_conky',			-- set the name manually  - default conky "hostname"
	own_window_type = 'normal',				-- if own_window true options are: normal/override/dock/desktop/panel


	--Colours

	default_color = '#D9DDE2',  				-- default color and border color
	color1 = '#FFFFFF',
	color2 = '#FFFFFF',
	color3 = '#FFFFFF',
	color4 = '#FFFFFF',
	color5 = '#FFFFFF',                         --teal
	color6 = '#FFFFFF',                         --white

	--Signal Colours
	color7 = '#FFFFFF',  						--white
	color8 = '#FFFFFF',  						--white
	color9 = '#FFFFFF',  						--white

    --Lua


};

conky.text = [[
${color1}${font Roboto:size=10}${voffset 2}S Y S T E M   ${hr 2}${font}${color}
${color2}Hostname:${color} ${alignr}${nodename}
${color2}OS: $alignr ${color3}${execi 6000 lsb_release -i| awk '{print $3}'}
${color2}Kernel: $alignr ${color3} $kernel
${color2}Uptime:${color} ${alignr}${uptime}

${color5}${font Roboto:size=10}P R O C E S S O R S  ${hr 2}${font}${color}
${color2}CPU Freq:${color} $alignr${freq}MHz
${color2}CPU Temp:${color} $alignr ${acpitemp}°C
${color2}FAN Speed: ${alignr}${ibm_fan} RPM
${color2}CPU Core 1:${color} ${alignr}${offset -10}${cpu cpu1}% ${alignr}${cpubar cpu1}
${color2}CPU Core 2:${color} ${alignr}${offset -10}${cpu cpu2}% ${alignr}${cpubar cpu2}
${color2}CPU Core 3:${color} ${alignr}${offset -10}${cpu cpu3}% ${alignr}${cpubar cpu3}
${color2}CPU Core 4:${color} ${alignr}${offset -10}${cpu cpu4}% ${alignr}${cpubar cpu4}

${color5}${font Roboto:size=10}M E M O R Y   ${hr 2}${font}${color}
${color2}Usage ${alignr}${offset -10}${color3}$memperc% ${alignr}${membar 5,80}
${color2}Total ${alignr}${color3}$memmax
${color2}Used ${alignr}${color3}$mem

${color5}${font Roboto:size=10}D R I V E S   ${hr 2}${font}${color}
${color2}Usage ${alignr}${offset -10}${color}${fs_used_perc}% ${alignr}${fs_bar 5,80}
${color2}Total ${alignr}${color}${fs_size /}
${color2}Used ${alignr}${color}${fs_used /}

${color5}${font Roboto:size=10}B A T T E R Y   ${hr 2}${font}${color}
${color2}Status ${alignr}${offset -10}${battery_short} ${alignr}${battery_bar 4,80}
${color2}Lefttime ${alignr}${battery_time}

${color5}${font Roboto:size=10}D A T E & T I M E   ${hr 2}${font}${color}
${color6}${voffset 4}${font GE Inspira:size=15}${alignr}${time %A} ${time %m}月 ${time %e}日, ${time %Y}年${font}${color}
${color6}${voffset 4}${font GE Inspira:size=36}${alignr}${time %H}:${time %M}${font}${color}

]];

3 个赞

调整了一下时间字体,时间字体为Nimbus,字号加粗60。

${color}${voffset 4}${font GE Inspira:size=14}${alignc}${time %A} ${time %m}月 ${time %e}日 ${time %Y}年${font}${color}
${color}${voffset 20}${font Nimbus Roman:bold:size=60}${alignc}${time %H}:${time %M}${font}${color}