Minimalist Conky for my netbook.
Code:# Use: sudo setcap cat_net_raw,cap_net_admin=eip /usr/bin/conky # to get wireless stats working # background yes use_xft yes xftfont cure:size=8 xftalpha 1 update_interval 1.0 total_run_times 0 own_window yes own_window_transparent yes own_window_hints undecorated,below,skip_taskbar,skip_pager double_buffer yes draw_shades yes draw_outline no draw_borders no draw_graph_borders no default_color ffffff default_shade_color 000000 default_outline_color 000000 default_graph_size 75 25 alignment top_right gap_x 10 gap_y 0 no_buffers yes uppercase no cpu_avg_samples 2 override_utf8_locale no TEXT # # - CPU - # $alignc CPU CPU 1 $alignr CPU 2 ${cpu cpu1}% $alignr ${cpu cpu2}% ${cpugraph cpu1 25, 75} $alignr ${cpugraph cpu2 25, 75} # # - MEMORY - # $alignc MEMORY RAM $alignr SWAP ${memperc}% $alignr ${swapperc}% ${memgraph 25, 75} $alignr ${execgraph free | grep 'Swap' | awk ' {t = $2; f = $3*100; print (f/t)}'} # # -DISK IO - # $alignc DISK IO Read $alignr Write ${diskio_read sda} $alignr ${diskio_write sda} ${diskiograph_read sda 25, 75} $alignr ${diskiograph_write sda 25, 75} # # - NETWORK - # $alignc NETWORK Download $alignr Upload ${downspeed wlan0} $alignr ${upspeed wlan0} ${downspeedgraph wlan0 25, 75} $alignr ${upspeedgraph wlan0 25, 75} # # - LOAD - # $alignc LOAD Load Average $alignr CPU Temp $loadavg $alignr ${exec echo $((`cat /sys/class/hwmon/hwmon1/device/temp2_input`/1000))}C ${loadgraph 25, 75} $alignr ${execgraph echo $((`cat /sys/class/hwmon/hwmon1/device/temp2_input`/1000))} # # - TOP CPU - # $alignc TOP CPU ${top name 1}${alignr}${top cpu 1}% ${top name 2}${alignr}${top cpu 2}% ${top name 3}${alignr}${top cpu 3}% ${voffset -5} # # - TOP MEM - # $alignc TOP MEM ${top_mem name 1}${alignr}${top mem 1}% ${top_mem name 2}${alignr}${top mem 2}% ${top_mem name 3}${alignr}${top mem 3}%
Poof.
I have a conky window that displays the local weather forecast. The length runs almost the full length of my desktop even though the forecast itself isn't that long. Attached is a screenshot of the window (with border) to show what I mean. I'd like to reduce the window's length, but I have tried everything I can think of without success. I have tried all of the "own_window_types" and have also messed with "minimum_size" but nothing works.
Here's my conkyrc for this window:
I'm sure the solution is simple and will create a "DOH!" moment once I hear it, but I'd appreciate any and all help fixing this.Code:# UBUNTU-CONKY # A comprehensive conky script, configured for use on # Ubuntu / Debian Gnome, without the need for any external scripts. # # Based on conky-jc and the default .conkyrc. # INCLUDES: # - tail of /var/log/messages # - netstat connections to your computer # # -- Pengo (conky@pengo.us) # # Create own window instead of using desktop (required in nautilus) own_window yes own_window_type normal own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager own_window_colour brown own_window_transparent yes own_window_class conky-semi own_window_argb_visual yes own_window_argb_value 255 # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # fiddle with window use_spacer right use_xft yes # Update interval in seconds update_interval 6.0 # Minimum size of text area minimum_size 155 800 #Maximum Width of Window maximum_width 350 # Draw shades? draw_shades yes # Text stuff draw_outline no # amplifies text if yes draw_borders yes font Arial:size=8 uppercase no # set to yes if you want all text to be in uppercase # Stippled borders? #stippled_borders 3 # border margins #border_margin 5 # border width border_width 1 # Default colors and also border colors, grey90 == #e5e5e5 default_color FFFFCC # Define colors color0 2e4364 # Section Headings 896700 color1 FFFFCC # Titles color2 CCFFFF # Data color3 2a4d83 # Bar Graphs # Text alignment, other possible values are commented #alignment top_left alignment top_right #alignment bottom_left #alignment bottom_right # Gap between borders of screen and text gap_x 320 gap_y 0 # Shorten units short_units yes pad_percents 2 # stuff after "TEXT" will be formatted on screen TEXT ${color0}WEATHER ${hr 2}$color ${color1}${alignc}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=CN} ${color1}Today ${font Weather: size=48}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WF}${font} ${goto 55}${voffset -55}${font Arial: size=8}Condition: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=CT --startday=0} ${color1}${goto 55}High: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=HT --imperial}${goto 130}${color1}Low: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=LT --startday=0 --imperial} ${color1}${goto 55}Wind: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WS --imperial}${goto 130}${color1}Direction: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WD} ${color1}${goto 55}Humidity: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=HM}${goto 130}${color1}Precipitation: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=PC --startday=0 --imperial} ${font}${color1}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=DW --startday=1} ${font Weather: size=48}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WF --startday=1}${font} ${goto 55}${voffset -55}${font Arial: size=8}Condition: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=CT --startday=1} ${color1}${goto 55}High: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=HT --startday=1 --imperial}${goto 130}${color1}Low: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=LT --startday=1 --imperial} ${color1}${goto 55}Wind: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WS --startday=1 --imperial}${goto 130}${color1}Direction: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WD --startday=1} ${color1}${goto 55}Humidity: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=HM --startday=1}${goto 130}${color1}Precipitation: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=PC --startday=1 --imperial} ${font}${color1}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=DW --startday=2} ${font Weather: size=48}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WF --startday=2}${font} ${goto 55}${voffset -55}${font Arial: size=8}Condition: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=CT --startday=2} ${color1}${goto 55}High: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=HT --startday=2 --imperial}${goto 130}${color1}Low: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=LT --startday=2 --imperial} ${color1}${goto 55}Wind: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WS --startday=2 --imperial}${goto 130}${color1}Direction: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WD --startday=2} ${color1}${goto 55}Humidity: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=HM --startday=2}${goto 130}${color1}Precipitation: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=PC --startday=2 --imperial} ${font}${color1}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=DW --startday=3} ${font Weather: size=48}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WF --startday=3}${font} ${goto 55}${voffset -55}${font Arial: size=8}Condition: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=CT --startday=3} ${color1}${goto 55}High: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=HT --startday=3 --imperial}${goto 130}${color1}Low: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=LT --startday=3 --imperial} ${color1}${goto 55}Wind: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WS --startday=3 --imperial}${goto 130}${color1}Direction: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WD --startday=3} ${color1}${goto 55}Humidity: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=HM --startday=3}${goto 130}${color1}Precipitation: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=PC --startday=3 --imperial} ${font}${color1}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=DW --startday=4} ${font Weather: size=48}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WF --startday=4}${font} ${goto 55}${voffset -55}${font Arial: size=8}Condition: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=CT --startday=4} ${color1}${goto 55}High: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=HT --startday=4 --imperial}${goto 130}${color1}Low: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=LT --startday=4 --imperial} ${color1}${goto 55}Wind: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WS --startday=4 --imperial}${goto 130}${color1}Direction: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=WD --startday=4} ${color1}${goto 55}Humidity: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=HM --startday=4}${goto 130}${color1}Precipitation: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=PC --startday=4 --imperial} ${font}
Thanks!
Regards,
Chris
Last edited by Chrison999; August 31st, 2014 at 11:30 PM.
Canuck huh ... location=CAXX3494 makes it obvious.
OK Here comes the DOH! moment! EH!
Change:
to:Code:# Minimum size of text area minimum_size 155 800
and while you're at it may as well tidy this up too:Code:# Minimum size of text area minimum_size 155 0
toCode:#Maximum Width of Window maximum_width 350
You still use conkyForecast. Some people are just soooooooooooo lucky.Code:#Maximum Width of Window maximum_width 155
I think it only works for people in the US and Canada now.
Now since you are here, what not do it all with ONE ${execpi} call by making a template?
I'll take maple Syrup for 1000, Bob!
Question: What version of conkyForecast are you using?
My last working conkyForecast conky used:
Code:${execpi 1800 conkyForecast --location=ARDF0127 --template=/home/sector11/Conky/scripts/OB_Weather.template}
Last edited by Sector11; August 31st, 2014 at 11:51 PM. Reason: Question
LOL!
Thanks for the suggestions!
I noticed that both the minimum_size and maximum_size parameters were screwy for what I want, so I fixed them like so:
However, the window is still grabbing the full length of the screen. I'm wondering if it could be something to do with my window manager (Compiz 0.9.11.2) that's causing it? I say that because my other conky window also extends further than it should, although not totally the length of the screen. See the attached screenshot.Code:# Minimum size of text area minimum_size 225 0 #Maximum Width of Window maximum_width 225
Truthfully, I'm using the first weather script I came across. Any suggestions for something that's more up-to-date or has more/better features? Also, the "Plan" is to eventually get this into a template but I'm struggling enough just figuring things out without templates. Thanks for the link, though... I'll check that out.You still use conkyForecast. Some people are just soooooooooooo lucky.
I think it only works for people in the US and Canada now.
Now since you are here, what not do it all with ONE ${execpi} call by making a template?
I'm not sure which version I'm using, but the last modification noted in conkyForecast.py is dated May 2008 so it's pretty darned old. LOL! Hmmm.... come to think of it, I'm not even sure anymore where I got the script??? SIGH!!! Being old is a PITA... can't hardly remember what I had for breakfast, anymore. LOL!
Question: What version of conkyForecast are you using?
My last working conkyForecast conky used:
Code:${execpi 1800 conkyForecast --location=ARDF0127 --template=/home/sector11/Conky/scripts/OB_Weather.template}
Anyway, thanks again for the suggestions! Can you think of anything else I can try to get this beast to stop taking over the whole length of the screen?
Regards
Chris
DOH! My OOPS!
Check this out: Goto/offset/voffset and scroll down until you see:
Check out the See: Bars with text links as well.And for that reason we see things like this (See: Bars with text):
The REAL fast way of shortening your conky:
See that last line in your code... ${font} ... well just add this:Code:${color1}${goto 55}Humidity: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=HM --startday=4}${goto 130}${color1}Precipitation: ${color2}${execi 3600 python ~/scripts/conkyForecast.py --location=CAXX3494 --datatype=PC --startday=4 --imperial} ${font}
adjusting the -100 until you get it where you want it.Code:${font}${voffset -100}
This hit me like a ton of bricks when I loaded up your conky ...
Now for a weather script since you like font vs images, check out Teo's scripts.
Conky weather+moon scripts (Accuw/WUndergr/NWS/Weather.com/Lunaf.com)
BTW: It took me a -340 to get it.
Last edited by Sector11; September 1st, 2014 at 01:53 AM.
LOL! We're having a DOH!-fest! It's party time!
Seriously though...
AH! I finally get it! The reason there's extra space is because for each line in the conkyrc below the TEXT statement a line is added to the window, so when I use ${voffset -XXX} in the script it shortens the length of the output that many pixels but the length of the window stays the same.Check this out: Goto/offset/voffset and scroll down until you see:
Check out the See: Bars with text links as well.
It's my turn... DOH!
I added ${voffset -325} to the end of the conkyrc (you suggested -340 but I do want a bit of an "edge" between the window and other stuff), and it's perfect now! You da man!
Thanks! I'll check that out, although I'm not "against" weather images instead of fonts... I'm just currently using what I happened to stumble across (literally!) while wandering the net. That said, what script would you suggest if I wanted to use images?Now for a weather script since you like font vs images, check out Teo's scripts.
Conky weather+moon scripts (Accuw/WUndergr/NWS/Weather.com/Lunaf.com)
Thanks, again, for your help!
Regards,
Chris
Bookmarks