zagortenay333 / conky_themes

A small collection of conky configs
624 stars 93 forks source link

Background transparency #17

Closed nikoTM closed 8 years ago

nikoTM commented 8 years ago

Hey, first of all thanks for the themes, they are awesome!

So I am having troubles getting the theme to work as intended, even tho the background is transparent, it is not really transparent, it distorts wallpaper underneath like this: conky

Argb is not an option since it gives alpha to everything, and text is almost invisible on bright wallpapers. The only solution I can imagine is if own_window were to fit the content perfectly, but for some reason you preferred to align content with offset. So is there a way to fix this besides manually fixing alignments ( already gave up 3 times halfway :smile: ) ?

eOS frey x64 (ubt 14.04)

zagortenay333 commented 8 years ago

Duplicate of #3

nikoTM commented 8 years ago

Still interested why did you choose to align the content with offset rather than start from 0,0.

zagortenay333 commented 8 years ago

I added that padding around conky in case a theme needs it. Having no padding wouldn't solve this anyway since some themes are transparent.

nikoTM commented 8 years ago

Understood, thanks for the efforts, guess gotta wait for conky to fix fake transparency

nikoTM commented 8 years ago

Modified config(GM metro) for those who has transparency issues, you can use alignment values to fix other themes:

conky.config = {

-------------------------------------
--  Generic Settings
-------------------------------------
background=true,
update_interval=1,
double_buffer=true,
no_buffers=true,
imlib_cache_size=10,

draw_shades=false,
draw_outline=false,
draw_borders=false,
draw_graph_borders=false,
default_graph_height=26,
default_graph_width=80,
show_graph_scale=false,
show_graph_range=false,

-------------------------------------
--  Window Specifications
-------------------------------------
gap_x=5,
gap_y=0,
minimum_height=572,
minimum_width=238,
own_window=true,
own_window_type="normal",
own_window_transparent=yes,
own_window_hints="undecorated,below,sticky,skip_taskbar,skip_pager",
border_inner_margin=0,
border_outer_margin=0,
alignment="top_right",
own_window_argb_visual=true,
own_window_argb_value=240,

-------------------------------------
--  Text Settings
-------------------------------------
use_xft=true,
xftalpha=1,
font="Droid Sans:size=8",
text_buffer_size=256,
override_utf8_locale=true,

short_units=true,
short_units=true,
pad_percents=2,
top_name_width=7,

-------------------------------------
--  Color Scheme
-------------------------------------
default_color="FFFFFF",
color1="FFFFFF",
color2="FFFFFF",
color3="FFFFFF",
color4="FFFFFF",
color5="DCDCDC",
color6="FFFFFF",
color7="FFFFFF",
color8="FFFFFF",

-------------------------------------
--  API Key
-------------------------------------
template6="",

-------------------------------------
--  City ID
-------------------------------------
template7="",

-------------------------------------
--  Temp Unit (default, metric, imperial)
-------------------------------------
template8="metric",

-------------------------------------
--  Locale (e.g. "es_ES.UTF-8")
--  Leave empty for default
-------------------------------------
template9=""

}

---------------------------------------------------
---------------------------------------------------

conky.text = [[
\
\
${execi 300 l=${template9}; l=${l%%_*}; curl -s "api.openweathermap.org/data/2.5/forecast/daily?APPID=${template6}&id=${template7}&cnt=5&units=${template8}&lang=$l" -o ~/.cache/forecast.json}\
${execi 300 l=${template9}; l=${l%%_*}; curl -s "api.openweathermap.org/data/2.5/weather?APPID=${template6}&id=${template7}&cnt=5&units=${template8}&lang=$l" -o ~/.cache/weather.json}\
\
\
\
\
${image ~/.harmattan-assets/misc/Metro/God-Mode/fav-color-1.png -p 5,5 -s 228x61}\
${execi 300 cp -f ~/.harmattan-assets/photos/smallest/$(jq .weather[0].id ~/.cache/weather.json).png ~/.cache/weather.png}${image ~/.cache/weather.png -p 5,66 -s 228x86}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/fav-color-3.png -p 5,152 -s 228x86}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/fav-color-4.png -p 5,238 -s 228x105}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/fav-color-5.png -p 5,342 -s 228x105}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/fav-color-6.png -p 5,448 -s 228x119}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/fav-color-7.png -p 5,453 -s 228x14}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/border.png -p 5,5 -s 228x562}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/border-4.png -p 5,65 -s 228x88}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/border-3.png -p 5,453 -s 228x14}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/separator-v.png -p 80,160 -s 1x76}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/separator-v.png -p 157,160 -s 1x76}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/separator-h.png -p 18,344 -s 202x1}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/separator-h.png -p 18,244 -s 202x1}\
\
\
\
\
${color3}${voffset 160}${alignc 77}${execi 300 LANG=${template9} LC_TIME=${template9} date +%^a}${color}
${color3}${voffset -13}${alignc}${execi 300 LANG=${template9} LC_TIME=${template9} date -d +1day +%^a}${color}
${color3}${voffset -13}${alignc -77}${execi 300 LANG=${template9} LC_TIME=${template9} date -d +2day +%^a}${color}
\
\
\
\
${color2}${voffset 51}${alignc 77}${execi 300 jq -r .list[0].temp.min ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°/${execi 300 jq -r .list[0].temp.max ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°${color}
${color2}${voffset -13}${alignc}${execi 300 jq -r .list[1].temp.min ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°/${execi 300 jq -r .list[1].temp.max ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°${color}
${color2}${voffset -13}${alignc -77}${execi 300 jq -r .list[2].temp.min ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°/${execi 300 jq -r .list[2].temp.max ~/.cache/forecast.json | awk '{print int($1+0.5)}' # round num}°${color}
\
\
\
\
${goto 21}${voffset -172}${font Droid Sans :size=36}${color1}${execi 300 jq -r .main.temp ~/.cache/weather.json | awk '{print int($1+0.5)}' # round num}°${font}${color}
${goto 31}${voffset 14}${font Droid Sans :size=12}${color1}${execi 300 jq -r .weather[0].description ~/.cache/weather.json | sed "s|\<.|\U&|g"}${font}${color}
${color1}${alignr 37}${voffset -73}${execi 300 jq -r .main.pressure ~/.cache/weather.json | awk '{print int($1+0.5)}' # round num} hPa
${color1}${alignr 37}${voffset 7}${execi 300 jq -r .main.humidity ~/.cache/weather.json | awk '{print int($1+0.5)}' # round num} %${color}
${color1}${alignr 37}${voffset 7}${execi 300 jq -r .wind.speed ~/.cache/weather.json | awk '{print int($1+0.5)}' # round num}${if_match "$template8" == "metric"} m/s${else}${if_match "$template8" == "default"} m/s${else}${if_match "$template8" == "imperial"} mi/h${endif}${endif}${endif}${color}
\
\
\
\
${voffset -117}${font Droid Sans Mono :size=22}${alignc}${color2}${time %H:%M}${font}${color}
${voffset 4}${font Droid Sans :size=10}${alignc}${color6}${execi 300 LANG=${template9} LC_TIME=${template9} date +"%A, %B %-d"}${font}${color}
\
\
\
\
${voffset 294}${goto 25}${color2}Cpu:${color}
${voffset 4}${goto 25}${color2}Mem:${color}
${voffset 4}${goto 25}${color2}Uptime:${color}
${voffset -47}${alignr 34}${color2}${cpu cpu0}%${color}
${voffset 4}${alignr 34}${color2}${memperc}%${color}
${voffset 4}${alignr 34}${color2}${uptime_short}${color}
${voffset -47}${alignc}${color2}${cpubar 5,36}${color}
${voffset 4}${alignc}${color2}${membar 5,36}${color}
${voffset 29}${goto 20}${loadgraph 26,190 FFFFFF FFFFFF -l}
\
\
\
\
${voffset 26}${goto 20}${color2}${top_mem name 1}${color}
${voffset 4}${goto 20}${color2}${top_mem name 2}${color}
${voffset 4}${goto 20}${color2}${top_mem name 3}${color}
${voffset 4}${goto 20}${color2}${top_mem name 4}${color}
${voffset 4}${goto 20}${color2}${top_mem name 5}${color}
${voffset -81}${alignc}${color5}${top_mem mem 1}%${color}
${voffset 4}${alignc}${color5}${top_mem mem 2}%${color}
${voffset 4}${alignc}${color5}${top_mem mem 3}%${color}
${voffset 4}${alignc}${color5}${top_mem mem 4}%${color}
${voffset 4}${alignc}${color5}${top_mem mem 5}%${color}
${voffset -81}${alignr 34}${color6}${top_mem mem_res 1}${color}
${voffset 4}${alignr 34}${color6}${top_mem mem_res 2}${color}
${voffset 4}${alignr 34}${color6}${top_mem mem_res 3}${color}
${voffset 4}${alignr 34}${color6}${top_mem mem_res 4}${color}
${voffset 4}${alignr 34}${color6}${top_mem mem_res 5}${color}
${voffset -104}${goto 20}${color1}Proc${color}
${voffset -13}${alignc}${color1}Mem%${color}
${voffset -13}${alignr 34}${color1}Mem${color}
\
\
\
\
${if_existing /proc/net/route ppp0}
${voffset -227}${goto 20}${color5}Up: ${color2}${upspeed ppp0}${color5}${goto 150}Down: ${color2}${downspeed ppp0}
${voffset 10}${goto 20}${upspeedgraph ppp0 26,80 FFFFFF FFFFFF}${goto 150}${downspeedgraph ppp0 26,80 FFFFFF FFFFFF}
${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup ppp0}${color5}${goto 150}Received: ${color2}${totaldown ppp0}
${else}
${if_existing /proc/net/route ppp1}
${voffset -240}${goto 20}${color5}Up: ${color2}${upspeed ppp1}${color5}${goto 150}Down: ${color2}${downspeed ppp1}
${voffset 10}${goto 20}${upspeedgraph ppp1 26,80 FFFFFF FFFFFF}${goto 150}${downspeedgraph ppp1 26,80 FFFFFF FFFFFF}
${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup ppp1}${color5}${goto 150}Received: ${color2}${totaldown ppp1}
${else}
${if_existing /proc/net/route wlp2s1}
${voffset -253}${goto 40}${color5}Up: ${color2}${upspeed wlp2s1}${color5}${goto 150}Down: ${color2}${downspeed wlp2s1}
${voffset 10}${goto 40}${upspeedgraph wlp2s1 26,80 FFFFFF FFFFFF}${goto 150}${downspeedgraph wlp2s1 26,80 FFFFFF FFFFFF}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup wlp2s1}${color5}${goto 150}Received: ${color2}${totaldown wlp2s1}
${else}
${if_existing /proc/net/route wlp2s0}
${voffset -266}${goto 40}${color5}Up: ${color2}${upspeed wlp2s0}${color5}${goto 150}Down: ${color2}${downspeed wlp2s0}
${voffset 10}${goto 40}${upspeedgraph wlp2s0 26,80 FFFFFF FFFFFF}${goto 150}${downspeedgraph wlp2s0 26,80 FFFFFF FFFFFF}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup wlp2s0}${color5}${goto 150}Received: ${color2}${totaldown wlp2s0}
${else}
${if_existing /proc/net/route wlan0}
${voffset -279}${goto 20}${color5}Up: ${color2}${upspeed wlan0}${color5}${goto 150}Down: ${color2}${downspeed wlan0}
${voffset 8}${goto 20}${upspeedgraph wlan0 26,80 FFFFFF FFFFFF}${goto 150}${downspeedgraph wlan0 26,80 FFFFFF FFFFFF}
${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup wlan0}${color5}${goto 150}Received: ${color2}${totaldown wlan0}
${else}
${if_existing /proc/net/route wlan1}
${voffset -292}${goto 20}${color5}Up: ${color2}${upspeed wlan1}${color5}${goto 150}Down: ${color2}${downspeed wlan1}
${voffset 10}${goto 20}${upspeedgraph wlan1 26,80 FFFFFF FFFFFF}${goto 150}${downspeedgraph wlan1 26,80 FFFFFF FFFFFF}
${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup wlan1}${color5}${goto 150}Received: ${color2}${totaldown wlan1}
${else}
${if_existing /proc/net/route eth1}
${voffset -305}${goto 20}${color5}Up: ${color2}${upspeed eth1}${color5}${goto 150}Down: ${color2}${downspeed eth1}
${voffset 10}${goto 20}${upspeedgraph eth1 26,80 FFFFFF FFFFFF}${goto 150}${downspeedgraph eth1 26,80 FFFFFF FFFFFF}
${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup eth1}${color5}${goto 150}Received: ${color2}${totaldown eth1}
${else}
${if_existing /proc/net/route eth0}
${voffset -318}${goto 20}${color5}Up: ${color2}${upspeed eth0}${color5}${goto 150}Down: ${color2}${downspeed eth0}
${voffset 10}${goto 20}${upspeedgraph eth0 26,80 FFFFFF FFFFFF}${goto 150}${downspeedgraph eth0 26,80 FFFFFF FFFFFF}
${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup eth0}${color5}${goto 150}Received: ${color2}${totaldown eth0}
${else}
${if_existing /proc/net/route enp0s0}
${voffset -331}${goto 20}${color5}Up: ${color2}${upspeed enp0s0}${color5}${goto 150}Down: ${color2}${downspeed enp0s0}
${voffset 10}${goto 40}${upspeedgraph enp0s0 26,80 FFFFFF FFFFFF}${goto 150}${downspeedgraph enp0s0 26,80 FFFFFF FFFFFF}
${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup enp0s0}${color5}${goto 150}Received: ${color2}${totaldown enp0s0}
${else}
${if_existing /proc/net/route enp0s1}
${voffset -344}${goto 20}${color5}Up: ${color2}${upspeed enp0s1}${color5}${goto 150}Down: ${color2}${downspeed enp0s1}
${voffset 10}${goto 20}${upspeedgraph enp0s1 26,80 FFFFFF FFFFFF}${goto 150}${downspeedgraph enp0s1 26,80 FFFFFF FFFFFF}
${voffset 9}${goto 20}${color5}Sent: ${color2}${totalup enp0s1}${color5}${goto 150}Received: ${color2}${totaldown enp0s1}
${else}
${voffset -311}${goto 20}${color5}Network disconnected${color}
${image ~/.harmattan-assets/misc/Metro/God-Mode/offline.png -p 24,249 -s 16x16}
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
\
\
\
\
${image ~/.harmattan-assets/misc/Metro/God-Mode/pressure.png -p 209,70 -s 16x16}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/humidity.png -p 209,90 -s 16x16}\
${image ~/.harmattan-assets/misc/Metro/God-Mode/wind-2.png -p 209,111 -s 16x16}\
${execi 300 cp -f ~/.harmattan-assets/icons/#fff__32/$(jq .list[0].weather[0].id ~/.cache/forecast.json).png ~/.cache/weather-1.png}${image ~/.cache/weather-1.png -p 26,182 -s 32x32}\
${execi 300 cp -f ~/.harmattan-assets/icons/#fff__32/$(jq .list[1].weather[0].id ~/.cache/forecast.json).png ~/.cache/weather-2.png}${image ~/.cache/weather-2.png -p 104,182 -s 32x32}\
${execi 300 cp -f ~/.harmattan-assets/icons/#fff__32/$(jq .list[2].weather[0].id ~/.cache/forecast.json).png ~/.cache/weather-3.png}${image ~/.cache/weather-3.png -p 180,182 -s 32x32}${font}${voffset -120}\
]]

Result in this: conky-metro

Bonteruel commented 6 years ago

Just let the windows settings intact. You just have to install feh and xcompmgr. Second,just try this comand: feh --bg-center ~/Images/your_wallpaper.png & If the command works,then create or edit ~/.xintrc file adding that line in it. save and reboot. Don't worry if you want to change the wallpaper after this,because the background of conky will change too. The source of solution: http://conky.sourceforge.net/config_settings.html http://conky.sourceforge.net/faq.html