trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: April 2019

TDE & conky

From: "Dr. Nikolaus Klepp" <office@...>
Date: Sun, 7 Apr 2019 15:26:26 +0200
Hi all!

I try to get a transparent background with conky, but somehow I need dirty tricks to make it going:

When I start conky from .xinitrc ("sleep 15; conky -d"), the background is blue and stays blue when TDE is running. Conky writes text on that blue background, but never erases it, so it gets unreadable after some time. Switching to another desktop and back again does not change this. The behaviour is the same without delay, so that TDE starts in parallel and twin comes up after conky. 

When I start conky from .trinity/Autostart/<something>.desktop - which calls only "sleep 15; conky -d", then the background is black and stays black, conky erases it before writing. Switching to another desktop and back again gives a pseudo-transparent background in conky. When twin comes up after conky, then the background of conky is as above (blue without erase).

I have put the second way including switching desktops into a file that's called from TDE autostart, so things basicly work.

But what I do not understand: what is the difference from calling conky from .xinitrc to calling it from .trinity/Autostart? And what chages, if twin comes up before/after conky? I'm quite sure that this is TDE specific, 'cause when running fvwm I do not observe this. And it looks like it is OS agnostic, I see the same thing happen on FreeBSD, too.

Nik





-- 
Please do not email me anything that you are not comfortable also sharing with the NSA, CIA ...
conky.config = {
--#####################
-- - Conky settings - #
--#####################
	update_interval = 5,
	total_run_times = 0,
	net_avg_samples = 1,
	cpu_avg_samples = 10,

	double_buffer = true,
	no_buffers = true,

--####################
-- - Text settings - #
--####################
	use_xft = true,
	font = 'Terminus:size=9',
	override_utf8_locale = true,
	text_buffer_size = 2048,

--############################
-- - Window specifications - #
--############################
	own_window_class = 'Conky',
	own_window = true,
	own_window_type = 'normal',
	own_window_transparent = true,
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
--#	own_window_argb_visual = yes,
--#	own_window_argb_value = 90,
	double_buffer=true,
	
	alignment = 'bottom_right',
	gap_x = 3,
	gap_y = 3,
	minimum_width = 142, minimum_height = 0,
--#	maximum_width = 142,
	maximum_width = 162,

	default_bar_width = 60, default_bar_height = 8,

--########################
-- - Graphics settings - #
--########################
	draw_shades = false,

--default_color cccccc
--default_color cc8e32
--default_color FCAF3E
	default_color = '#ffffff',

	color0 = 'white',
	color1 = '#303030',	--# Rahmen um Graphen
	color2 = '808080',	--# statische Texte
	color3 = 'yellow',	--# Hervorhebung, allgemein
	color4 = 'b04040',	--# Hervorhebung, Kalender Sonntage, Text
	color5 = 'ff8080',	--# Hervorhebung, Kalender Sonntage, Datum
	color6 = 'ff8080',	--# Name Prozessliste
	color7 = 'ffff00',	--# CPU% Prozessliste

};

conky.text = [[
#CPU Temperatures ${hr 2}
${offset -6}${voffset 4}${font conkycolors:size=16}${color2}8${color}${font}${voffset -6}${goto 32}${alignr}${acpitemp} �C${voffset 6}
#CPU Freq ${hr 2}
#${voffset 4}${font conkycolors:size=16}${color2}E${color}${font}${voffset -6}${alignr}${freq_g (1)} GHz
#${voffset 4}${font conkycolors:size=16}${color2}E${color}${font}${voffset -6}${alignr}${freq_g (2)} GHz

${freq (1)} MHz${alignr}${cpu cpu1}%
${freq (2)} MHz${alignr}${cpu cpu2}%

${color6}${top name 1} ${color7}${top cpu 1}${color}
${color6}${top name 2} ${color7}${top cpu 2}${color}
${color6}${top name 3} ${color7}${top cpu 3}${color}
${color6}${top name 4} ${color7}${top cpu 4}${color}
${color6}${top name 5} ${color7}${top cpu 5}${color}

${voffset -4}${font conkycolors:size=16}${color2}e${color}${font}${voffset -14}${alignr}${mem}${font}
${goto 32}${color1}${memgraph 8,134 808000 ffff00 -t -l}${color0}${voffset 8}
#Network ${hr 2}
${if_up eth0}
${voffset -4}${font conkycolors:size=16}${color2}x${color}${font}${voffset -14}${alignr}${upspeed eth0}${font}
${goto 32}${color1}${upspeedgraph eth0 8,134 808000 ffff00 -t -l}${color0}${voffset 8}
${voffset -4}${font conkycolors:size=16}${color2}w${color}${font}${voffset -14}${alignr}${downspeed eth0}${font}
${goto 32}${color1}${downspeedgraph eth0 8,134 808000 ffff00 -t -l}${color0}${voffset 8}
${endif}
#Battery ${hr 2}
${color2}State:${color}${alignr}${execpi 10 cat /sys/class/power_supply/BAT0/status}
${color2}Capacity:${color}${alignr}${execpi 10 cat /sys/class/power_supply/BAT0/capacity}%
${color2}Remaining:${color}${alignr}${execpi 10 acpi -i 0|grep remaining|cut -d ' ' -f 5|sed 's#^0*\([0-9]*:[0-9]*\):.*$#\1#'}

${color2}Uptime:${color}${alignr}${execpi 60 uptime | sed 's#^.* up *\([0-9][^,]*\),.*$#\1#'}
# Time & Date
# Original "cal"
${voffset 16}${execpi 300 ncal -M -b|tr -d '\b'|\
	sed 's#_\([0-9 ]\)_\([0-9]\) #\1\2>#g'|\
	sed 's#\(...............\)\(..\)\(.[^ ].\)#\1\$\{color5\}\2\${color5\}\3\$\{color\}#'|\
	sed 's#\([^ ]*\)>#\$\{font Terminus:extrabold:size=9\}\$\{color3\}\1 \$\{color\}\$\{font\}#'|\
	awk '{	
#		if (NR<=1) 	{ print "${color2}" $1 " " $2 "${color}" }
		if (NR<=1) 	{}
		else if (NR==2) { print "${color2}Mo Di Mi Do Fr ${color4}Sa So${color}${voffset 3}"; }
		else		{ print $0; }
	}'|sed 's#${color3}${color5}#${color3}#'}${alignr}
# "cal" from packages
#${voffset 16}${execpi 300 /usr/local/bin/cal -noc -e -nod|tr '<' ' '|sed 's#^ ##'|\
#	sed 's#\(...............\)\(.....\)#\1\$\{color5\}\2\$\{color\}#'|\
#	sed 's#\([^ ]*\)>#\$\{font DejaVu Sans Mono:extrabold:size=8\}\$\{color3\}\1 \$\{color\}\$\{font\}#'|\
#	awk '{	if (NR<=2) 	{ }
#		else if (NR==3) { print "${color2}Mo Di Mi Do Fr ${color4}Sa So${color}${voffset 3}"; }
#		else		{ print $0; }
#	}'}${alignr}
	
${color2}IP:${color}${alignr}${addr eth0}

${voffset 0}${time %H:%M}${color2}${alignr}${color}${time %e.%m.%Y}
${voffset -22}
]];

Attachments: