Conky Showoff thread

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Sector11

Re: Conky Showoff thread

Post by Sector11 »

@ trytip

The same test conky I posted before with one of your images set to opacity: 85%
Image
Now it's only the one image, all the rest are clear as a bell! ;)
grzegorzdabrowka
Level 1
Level 1
Posts: 6
Joined: Mon Jan 11, 2016 2:10 pm

Re: Conky Showoff thread

Post by grzegorzdabrowka »

User avatar
dimspace
Level 1
Level 1
Posts: 20
Joined: Sun Sep 10, 2017 6:27 pm
Contact:

Re: Conky Showoff thread

Post by dimspace »

Pretty straightforward one for me (note the transparent right sidebar with menu - i find right hand sidebars so much more intuitive)


Like i say, pretty straightforward, only slight interesting bit is auto kill of transmission when vpn is off (live in the uk, isps dont like torrenting)
Selection_004.png
full size https://imgur.com/oxgoshk

one thing I cant figure is setting the thickness of the bars for drive space...

for all other bars it was fine... for example

Code: Select all

${color Gray}${membar 5,}
but im darned if i can get it working for drive space bars

Code: Select all

${color Gray}${fs_bar /home}
Full code

Code: Select all

background yes
use_xft yes
xftfont 123:size=9
xftalpha 0.1
update_interval 1.0
total_run_times 0
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type dock
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#These values set true transparancy
own_window_argb_visual yes
own_window_argb_value 0
double_buffer yes
minimum_size 250 5
maximum_width 220
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color gray
default_shade_color red
default_outline_color green
alignment top_right
gap_x 35
gap_y 12
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer left
text_buffer_size 256
temperature_unit celsius


own_window_colour 000000
TEXT
#SYSTEM
${voffset -30}
${color Gray}
${font Soul Papa:bold:size=10}${color Tan1}SYSTEM ${color DarkSlateGray} ${hr 2}

${color Gray}${font Inconsolata:size=9}$sysname $kernel $alignr $machine
AMD E-450 APU $alignr ${freq_g cpu0}Ghz
Uptime $alignr${uptime}

#DRIVES
${font Soul Papa:bold:size=10}${color Tan1}DRIVES ${color DarkSlateGray}${hr 2}
${font Inconsolata:size=9}${color Gray}
/ $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_used_perc /}%
${color Gray}${fs_bar /}
${color Gray}/home $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_used_perc /home}%
${color Gray}${fs_bar /home}

#MEMORY
${font Soul Papa:bold:size=10}${color Tan1}MEMORY ${color DarkSlateGray}${hr 2}
${font Inconsolata:size=9}${color Gray}
DDR3 $alignc $mem / $memmax $alignr $memperc%
${color green}${if_match ${memperc}<=40}${color olivedrab}${membar 5,} ${else}${if_match ${memperc}<=60}${color greenyellow}${membar 5,} ${else}${if_match ${memperc}<=80}${color darkorange}${membar 5,} ${else}${if_match ${memperc}>80}${color darkred}${membar 5,}${endif}${endif}${endif}${endif}${color}
SWAP $alignc $swap / $swapmax $alignr $swapperc%
${color green}${if_match ${swapperc}<=40}${color olivedrab}${swapbar 5,} ${else}${if_match ${swapperc}<=60}${color greenyellow}${swapbar 5,} ${else}${if_match ${swapperc}<=80}${color darkorange}${swapbar 5,} ${else}${if_match ${swapperc}>80}${color darkred}${swapbar 5,}${endif}${endif}${endif}${endif}${color}

${font Inconsolata:size=9}${color Gray}${top_mem name 1}${alignr}${top_mem mem_res 1}
${color Gray}${top_mem name 2}${alignr}${top_mem mem_res 2}
${color Gray}${top_mem name 3}${alignr}${top_mem mem_res 3}
${color Gray}${top_mem name 4}${alignr}${top_mem mem_res 4}
${color Gray}${top_mem name 5}${alignr}${top_mem mem_res 5}
${color Gray}${top_mem name 6}${alignr}${top_mem mem_res 6}

#CPU
${font Soul Papa:bold:size=10}${color Tan1}CPU ${color DarkSlateGray}${hr 2}
${color Gray}${font Inconsolata:size=9}${alignr}${cpu cpu0}%
${color green}${if_match ${cpu cpu0}<=40}${color olivedrab}${cpubar cpu0 5,} ${else}${if_match ${cpu cpu0}<=60}${color greenyellow}${cpubar cpu0 5,} ${else}${if_match ${cpu cpu0}<=80}${color darkorange}${cpubar cpu0 5,} ${else}${if_match ${cpu cpu0}>80}${color darkred}${cpubar cpu0 5,}${endif}${endif}${endif}${endif}${color}

${color Gray}${top name 1} $alignr ${top cpu 1}%
${color Gray}${top name 2} $alignr ${top cpu 2}%
${color Gray}${top name 3} $alignr ${top cpu 3}%
${color Gray}${top name 4} $alignr ${top cpu 4}%
${color Gray}${top name 5} $alignr ${top cpu 5}%
${color Gray}${top name 6} $alignr ${top cpu 6}%

#NETWORK
${font Soul Papa:bold:size=10}${color Tan2}${wireless_essid wlp2s0}  ${color DarkSlateGray}${hr 2}
${font Inconsolata:size=9}${color Gray}
Up $alignr${upspeedf wlp2s0} KiB/s
Uploaded: $alignr${totalup wlp2s0}
${upspeedgraph wlp2s0 White 80,}
Down $alignr${downspeedf wlp2s0} KiB/s
Downloaded: $alignr${totaldown wlp2s0}
${downspeedgraph wlp2s0 White 80,}
VPN $alignr${if_up tun0}${color #66BF60}Connected${else}${color #FF6640}Disconnected$endif
${color Gray}Local IP $alignr ${addr wlp2s0}
${color Gray}Public IP $alignr ${execi 3600 wget -q -O /dev/stdout http://checkip.dyndns.org/ | cut -d : -f 2- | cut -d \< -f -1}

#KILL TRANSMISSION IF NO VPN
${if_up tun0}${else}${exec killall transmission-gtk}$endif
Oh and the orange google music manager icon is REALLY annoying. And I dont know why its doing it because icon set has full set of music manager panel icons in it. it refuses to be white


edit: Ram and cpu bars now cycle green-yellow-orange-red depending on percentage

Image
b2a8r1

Re: Conky Showoff thread

Post by b2a8r1 »

My desktop might be a bit much haa :mrgreen:
Image
Last edited by b2a8r1 on Wed Jan 24, 2018 10:29 pm, edited 1 time in total.
Luffs

Re: Conky Showoff thread

Post by Luffs »

My Desktop, I didn't make the conky script though.

Image
pcwolf

Re: Conky Showoff thread

Post by pcwolf »

Just the facts, ma'am :)
Last edited by pcwolf on Wed Jan 31, 2018 8:37 pm, edited 2 times in total.
User avatar
banjo
Level 2
Level 2
Posts: 89
Joined: Thu Jun 22, 2017 4:31 pm
Location: Reading, Massachusetts

Re: Conky Showoff thread

Post by banjo »

I have just discovered conky in my quest to display my core temperatures on the screen. The plasmoid I was using was OK but not configurable enough and way too huge. So I have written a simple conky config to do that. Here is a screenshot.
simple-conky.png
The purpose of posting this is not to wow anyone with the stunning graphics, but to post my .conkyrc to the forum. It took me quite a while to figure out how to do this because every example of a conky configuration I could find was written in the old format, which made my conky puke. So I have finally figured out how to do a .conkyrc using the new lua interface. Here is my file in its entirety.

Code: Select all

-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo

Any original torsmo code is licensed under the BSD license

All code written since the fork of torsmo is licensed under the GPL

Please see COPYING for details

Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
Copyright (c) 2005-2012 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
]]

conky.config = {
--[[
	The transparency is obtained by creating a 'normal' own_window
	and then manually removing the decorations. Setting own_window_argb_visual
	to true and the own_window_argb_value (the aplpha channel value)
	to 0 provides a true transparency. You can change the background image
	and the new background will show through.
	
	With these settings, you can set the alpha channel to any setting between
	0 and 255 to obtain	translucent behavior.
]]
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'normal',
	own_window_hints = "undecorated,below,sticky,skip_taskbar,skip_pager",
	own_window_argb_visual = true,
	own_window_argb_value = 0,
	own_window_transparent = false,
    gap_x = 10,
    gap_y = 50,
	default_color = 'ffee00',

	temperature_unit = 'fahrenheit',
    alignment = 'bottom_right',
    background = false,
    border_width = 5,
	double_buffer = true,
    cpu_avg_samples = 2,
    default_outline_color = 'white',
    default_shade_color = 'white',
    draw_borders = false,
    draw_graph_borders = true,
	default_bar_height=10,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'DejaVu Sans Mono:size=12',
    minimum_height = 5,
	minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = false,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false
}
--[[ 
The CPU temp code works by obtaining the entire output from 'sensors -f'
then grepping for one of the cores and cutting out just the substring
that I want to display. This is a fairly expensive operation since it
calls 'sensors -f' four times, once for each core. But it does not
appear to put too much of a load on my system. One good thing is that the
text "°F" is part of the sensors output, so I don't have to put that
into the text string.
]]
conky.text = [[
${color white}Time:  ${time %D %H:%M:%S}
$hr
${color grey}Core 0:${color ffee00} ${cpu cpu1}% ${color ffee00}${cpubar cpu1 10,200}
${color grey}Core 1:${color ffee00} ${cpu cpu2}% ${color ffee00}${cpubar cpu2 10,200}
${color grey}Core 2:${color ffff00} ${cpu cpu1}% ${color ffff00}${cpubar cpu3 10,200}
${color grey}Core 3:${color ffff00} ${cpu cpu2}% ${color ffff00}${cpubar cpu4 10,200}
${color white}$hr
${color grey}CPU Temperatures
${color grey}Core 0: ${color ffee00} ${exec sensors -f | grep  'Core 0' | cut -c16-26}   
${color grey}Core 1: ${color ffee00} ${exec sensors -f | grep  'Core 1' | cut -c16-26}
${color grey}Core 2: ${color ffee00} ${exec sensors -f | grep  'Core 2' | cut -c16-26}   
${color grey}Core 3: ${color ffee00} ${exec sensors -f | grep  'Core 3' | cut -c16-26}
${color white}$hr
]]

--[[
The best description of how to configure conky I have found is at

https://github.com/brndnmtthws/conky/wiki

]]


Information on how to configure conky was surprisingly difficult to find. Here is a link to the best information I have found so far.

https://github.com/brndnmtthws/conky/wiki

This script works fine with the new conky versions, and I am very pleased with the results. I am now free of all plasmoids on my desktop. I find the plasmoids to be clumsy, not very customizable, and fugitive from release to release. So I have replaced them with plain old desktop programs like conky.

I am running this on Mint 18.1 using KDE.

Here is my conky version information.

Code: Select all

brian@LinuxMain ~ $ conky -v
conky 1.10.1 compiled Wed Jan  6 17:11:44 UTC 2016 for Linux 3.19.0-43-generic x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky


 General:
  * math
  * hddtemp                                                                                                                                         
  * portmon
  * IPv6
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support

 Lua bindings:
  * Cairo
  * Imlib2
  * RSVG
 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * Audacious
  * MPD
  * MOC
  * XMMS2

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256
Sorry if this is all old news to the experts here on the forum. I had difficulty finding this information, so I thought that I would post it for anyone looking for a starting point.

Banjo
(_)=='=~
If only the best bird sang, the forest would be a very quiet place.
pcwolf

Re: Conky Showoff thread

Post by pcwolf »

I hear ya, Banjo, my first try as well, and it took a *lot* of Google cut'n'paste and headscratching. Thanks for the link, I had not found that.

Right now I am lost in trying to parse "Inxi -xxxw" data in order to provide a very simple weather snapshot. I got just about everything displayed, but have hit fullstop on how to discard the last line of input, because it only reproduces the location/date/time. Off to study scripting now ...

ps Just because I included a line does not in any way imply that I know what it does :D

-Phil

Code: Select all

-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo

Any original torsmo code is licensed under the BSD license

All code written since the fork of torsmo is licensed under the GPL

Please see COPYING for details

Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
Copyright (c) 2005-2012 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
]]

conky.config = {
    alignment = 'top_right',
    background = true,
    border_inner_margin = 10,
    border_width = 5,
    cpu_avg_samples = 8,
	default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'black',
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'DejaVu Sans Mono:size=8',
    gap_x = 25,
    gap_y = 25,
    minimum_height = 500,
	minimum_width = 500,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_argb_value = 0,
    own_window_argb_visual = yes,
    own_window_class = 'Conky',
    own_window_hints = undecorated,sticky,skip_taskbar,skip_pager,below,
    own_window_transparent = false,
    own_window_type = desktop,
    top_cpu_separate = false,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false
}

conky.text = [[
${color white} ${font Noto Sans:size=20} ${alignc}${time %e} ${time %B} ${time %Y} 
${font Noto Sans:size=16} ${alignc}${time %A} ${time %T}
$color $hr ${font Noto Sans:size=9}
${color green}LINUX MINT ${alignr}$color 18.3 KDE
${color lightblue}  $distribution kernel ${alignr}$color $kernel
${color lightblue}  Uptime:$color ${alignr}$uptime
$hr
${color green}RYZEN 1700X
${color lightblue}   Temp:${alignr}$color ${hwmon temp 2}°C
${color lightblue}   Freq:${alignr}$color $freq_g  GHz
${color lightblue}   Cycles:${alignr}$color $cpu% 
${color brown} ${cpubar 15}
$color $hr
${color green}RAM 
${color lightblue}   Swap:${alignr}$color $swap $swapperc% 
${color lightblue}   Installed: ${alignr}$color $memmax 
${color lightblue}   In use:${alignr}$color $mem ${color lightblue} $memperc% 
${color yellow} ${membar 15}
$color $hr
${color green}STORAGE 
${color lightblue}   Temp: ${alignr}$color ${hddtemp /dev/sda}°C
${color lightblue}   Available: ${alignc}$color /root ${alignr}${fs_size} 
${color lightblue}   In use: ${alignr}$color ${fs_used} 
${color orange} ${fs_bar 15}
$color $hr
${color green}NETWORK
${color lightblue}   Address:${alignr}$color${addrs wlp5s0}
${color lightblue}   Up:$color ${alignr}${upspeed wlp5s0} 
${color lightblue}   Down:$color ${alignr}${downspeed wlp5s0}
${color lightblue}   Signal: $color ${alignr}${wireless_link_qual wlp5s0} 
${color blue}${wireless_link_bar 15 wlp5s0}
$color $hr
${color green}GTX 1060 6GB
${color lightblue}   GPU Temp ${alignr}${color}${nvidia temp}°C
${color lightblue}   Fan Speed ${alignr}${color}${execi 5 nvidia-settings -q [fan:0]/GPUCurrentFanSpeed -t} %
${color lightblue}   GPU Clock ${alignr}${color}${nvidia gpufreq} MHz
${color lightblue}   Mem Clock ${alignr}${color}${nvidia memfreq} MHz
${color lightblue}   Mem Used ${alignr}${color}${execi 5 nvidia-settings -q [gpu:0]/UsedDedicatedGPUMemory -t} MB
$hr
${color green}PROCESSES${alignC}$color $processes  
${color lightblue}   Running:${alignC}$color$running_processes
${color lightblue} ${alignr 20}PID CPU% MEM%
${color lightgrey} ${top name 1} ${alignr 30} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${alignr 30} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${alignr 30} ${top pid 3} ${top cpu 3} ${top mem 3}

]]

User avatar
banjo
Level 2
Level 2
Posts: 89
Joined: Thu Jun 22, 2017 4:31 pm
Location: Reading, Massachusetts

Re: Conky Showoff thread

Post by banjo »

When I invoke that command, the output is full of special characters.
$ inxi -w | tr -cd "[:print:]"
[1;34mWeather: [0;37m [1;34mConditions:[0;37m 28 F (-2 C) - Partly Cloudy [1;34mTime:[0;37m January 31, 9:01 PM EST[0;37m[0m
Looks like they are doing curses controls to change the colors etc.

Banjo
(_)=='=~
If only the best bird sang, the forest would be a very quiet place.
User avatar
trytip
Level 14
Level 14
Posts: 5371
Joined: Tue Jul 05, 2016 1:20 pm

Re: Conky Showoff thread

Post by trytip »

Image

Image
Image
pcwolf

Re: Conky Showoff thread

Post by pcwolf »

re: Inxi weather: I got it to display how I want it in terminal finally; now I am trying to learn how to invoke the execi magic wand:

inxi -xxxw | cut -c16- |sed -re ':a;N;$!ba;s/\n//g;s/(Conditions:)/\nCurrent:/;s/(Wind:)/\n&/;s/(Humidity:)/\n&/;s/(Pressure:)/\n&/;s/(Wind Chill:)/\n&/;s/Location:.*$//'

-Phil
User avatar
banjo
Level 2
Level 2
Posts: 89
Joined: Thu Jun 22, 2017 4:31 pm
Location: Reading, Massachusetts

Re: Conky Showoff thread

Post by banjo »

I found a source for plain text weather information. It is available at NOAA (National Oceanic and Atmospheric Administration). They have a web page that will deliver the weather in an xml file. Here is the link to the specific page.

http://w1.weather.gov/xml/current_obs/

When you go there you will see a dropdown box that allows you to select your state.
ConkyNOAA01.png
Use the dropdown menu to find your state and then click on the Find button next to the dropdown menu. That takes you to a page that has all of the airports in your state where the weather is logged.
ConkyNOAA02.png
Right click on the orange XML button at the far right and select "Copy link address". Paste that address into your text file. That is the XML file that you can dowload.

You can fetch the XML file using

Code: Select all

wget -q -O - http://w1.weather.gov/xml/current_obs/KBED.xml
This is what you get;

Code: Select all

brian@LinuxMain ~/linuxinfo/Mageia6/Conky $ wget -q -O - http://w1.weather.gov/xml/current_obs/KBED.xml
<?xml version="1.0" encoding="ISO-8859-1"?> 
<?xml-stylesheet href="latest_ob.xsl" type="text/xsl"?>
<current_observation version="1.0"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://www.weather.gov/view/current_observation.xsd">
        <credit>NOAA's National Weather Service</credit>
        <credit_URL>http://weather.gov/</credit_URL>
        <image>
                <url>http://weather.gov/images/xml_logo.gif</url>                                                     
                <title>NOAA's National Weather Service</title>
                <link>http://weather.gov</link>
        </image>
        <suggested_pickup>15 minutes after the hour</suggested_pickup>
        <suggested_pickup_period>60</suggested_pickup_period>
        <location>Bedford, Hanscom Field, MA</location>
        <station_id>KBED</station_id>
        <latitude>42.46833</latitude>
        <longitude>-71.29444</longitude>
        <observation_time>Last Updated on Feb 1 2018, 4:56 pm EST</observation_time>
        <observation_time_rfc822>Thu, 01 Feb 2018 16:56:00 -0500</observation_time_rfc822>
        <weather>Mostly Cloudy</weather>
        <temperature_string>43.0 F (6.1 C)</temperature_string>
        <temp_f>43.0</temp_f>
        <temp_c>6.1</temp_c>
        <relative_humidity>49</relative_humidity>
        <wind_string>Southwest at 6.9 MPH (6 KT)</wind_string>
        <wind_dir>Southwest</wind_dir>
        <wind_degrees>210</wind_degrees>
        <wind_mph>6.9</wind_mph>
        <wind_kt>6</wind_kt>
        <pressure_string>1012.7 mb</pressure_string>
        <pressure_mb>1012.7</pressure_mb>
        <pressure_in>29.86</pressure_in>
        <dewpoint_string>25.0 F (-3.9 C)</dewpoint_string>
        <dewpoint_f>25.0</dewpoint_f>
        <dewpoint_c>-3.9</dewpoint_c>
        <windchill_string>39 F (4 C)</windchill_string>
        <windchill_f>39</windchill_f>
        <windchill_c>4</windchill_c>
        <visibility_mi>10.00</visibility_mi>
        <icon_url_base>http://forecast.weather.gov/images/confused/small/</icon_url_base>
        <two_day_history_url>http://www.weather.gov/data/obhistory/KBED.html</two_day_history_url>
        <icon_url_name>bkn.png</icon_url_name>
        <ob_url>http://www.weather.gov/data/METAR/KBED.1.txt</ob_url>
        <disclaimer_url>http://weather.gov/disclaimer.html</disclaimer_url>
        <copyright_url>http://weather.gov/disclaimer.html</copyright_url>
        <privacy_policy_url>http://weather.gov/notice.html</privacy_policy_url>
</current_observation>

Just about anything you want to display is in there. I fetched out the farenheit temperature with a grep.

Code: Select all

brian@LinuxMain ~ $ wget -q -O - http://w1.weather.gov/xml/current_obs/KBVY.xml | grep temp_f
        <temp_f>42.0</temp_f>
Then, I removed everything but the number using tr

Code: Select all

brian@LinuxMain ~ $ wget -q -O - http://w1.weather.gov/xml/current_obs/KBED.xml | grep temp_f | tr -cd [0123456789.]
41.0brian@LinuxMain ~ $ 
I used the resulting number in my Conky text like this:

Code: Select all

conky.text = [[
${color white}
$hr
Current Temperature KBED: ${exec wget -q -O - http://w1.weather.gov/xml/current_obs/KBED.xml | grep temp_f | tr -cd [0123456789.]} °F
$hr
]]
]]
That produces a simple conky that I put in the upper right corner of my screen.
ConkyNOAA03.png
Once you have the XML data, you can knock yourself out fitting pieces of it into the conky display.

Banjo
(_)=='=~
If only the best bird sang, the forest would be a very quiet place.
Jim Hauser

Re: Conky Showoff thread

Post by Jim Hauser »

Screenshot_20180201_185052.png
I have had this for a while and am constantly changing it. It is actually a pretty simple conky and not a bad place to start. Code follows:

There are probably more than a few errors. Correct me if I am wrong but it works well on my system...

Code: Select all

--[[

]]

conky.config = {

    background = false,
    update_interval = 2,
    total_run_times = 0,
    temperature_unit = 'fahrenheit',
    own_window = true,
    own_window_type = 'normal',
    own_window_hints = 'below',
    own_window_transparent = true,
    own_window_argb_visual = true,
    own_window_argb_value = 255,
    double_buffer = true,
    draw_shades = false,
    draw_outline = false,
    draw_borders = false,
    draw_graph_borders = true,
    stippled_borders = 4,
    border_inner_margin = 4,
    border_width = 1,
    default_color = 'white',
    alignment = 'top_right',
    gap_x = 40,
    gap_y = 10,
    no_buffers = true,
    uppercase = false,
    cpu_avg_samples = 1,
    net_avg_samples = 1,
    override_utf8_locale = false,
    use_spacer = none,
}

conky.text = [[

${color}      $sysname $kernel on $machine

${color}
Core 1: ${freq 1} MHz ${cpu cpu1}% ${color green}${cpubar cpu1 8,0}      
${color green}${cpugraph cpu1 8,0}$color
Core 2: ${freq 2} MHz ${cpu cpu2}% ${color green}${cpubar cpu2 8,0}        
${color green}${cpugraph cpu2 8,0}$color
Core 3: ${freq 3} MHz ${cpu cpu3}% ${color green}${cpubar cpu3 8,0}      
${color green}${cpugraph cpu3 8,0}$color
Core 4: ${freq 4} MHz ${cpu cpu4}% ${color green}${cpubar cpu4 8,0}        
${color green}${cpugraph cpu4 8,0}$color
Core 5: ${freq 5} MHz ${cpu cpu5}% ${color green}${cpubar cpu5 8,0}        
${color green}${cpugraph cpu5 8,0}$color
Core 6: ${freq 6} MHz ${cpu cpu6}% ${color green}${cpubar cpu6 8,0}       
${color green}${cpugraph cpu6 8,0}$color
Core 7: ${freq 7} MHz ${cpu cpu7}% ${color green}${cpubar cpu7 8,0}       
${color green}${cpugraph cpu7 8,0}$color
Core 8: ${freq 8} MHz ${cpu cpu8}% ${color green}${cpubar cpu8 8,0}       
${color green}${cpugraph cpu8 8,0}$color


${color}FX-8350                        ${color green} ${if_match ${hwmon 2 temp 1}<=140}${color green}${alignr}${hwmon 2 temp 1} F${else}${if_match ${hwmon 2 temp 1}<=145}${color yellow}${alignr}${hwmon 2 temp 1} F${else}${if_match ${hwmon 2 temp 1}>150}${color red}${alignr}${hwmon 2 temp 1} F${endif}${endif}${endif}${color}
${color}M5A 78L-M USB3                 ${color green} ${if_match ${hwmon 2 temp 2}<=120}${color green}${alignr}${hwmon 2 temp 2} F${else}${if_match ${hwmon 2 temp 2}<=125}${color yellow}${alignr}${hwmon 2 temp 2} F${else}${if_match ${hwmon 2 temp 2}>130}${color red}${alignr}${hwmon 2 temp 2} F${endif}${endif}${endif}${color}
${color}GeForce GT 740 SC              ${color green} ${if_match ${nvidia temp}<=153}${color green}${alignr}${nvidia temp} F${else}${if_match ${nvidia temp}<=155}${color yellow}${alignr}${nvidia temp} F${else}${if_match ${nvidia temp}>157}${color red}${alignr}${nvidia temp} F${endif}${endif}${endif}${color}

${color}SDA                            ${color green} ${if_match ${hddtemp /dev/sda}<=115}${color green}${alignr}${hddtemp /dev/sda} F${else}${if_match ${hddtemp /dev/sda}<=120}${color yellow}${alignr}${hddtemp /dev/sda} F${else}${if_match ${hddtemp /dev/sda}>120}${color red}${alignr}${hddtemp /dev/sda} F${endif}${endif}${endif}${color}
${color}SDB                            ${color green} ${if_match ${hddtemp /dev/sdb}<=115}${color green}${alignr}${hddtemp /dev/sdb} F${else}${if_match ${hddtemp /dev/sdb}<=120}${color yellow}${alignr}${hddtemp /dev/sdb} F${else}${if_match ${hddtemp /dev/sdb}>120}${color red}${alignr}${hddtemp /dev/sdb} F${endif}${endif}${endif}${color}
${color}SDC                            ${color green} ${if_match ${hddtemp /dev/sdc}<=115}${color green}${alignr}${hddtemp /dev/sdc} F${else}${if_match ${hddtemp /dev/sdc}<=120}${color yellow}${alignr}${hddtemp /dev/sdc} F${else}${if_match ${hddtemp /dev/sdc}>120}${color red}${alignr}${hddtemp /dev/sdc} F${endif}${endif}${endif}${color}
${color}SDD                            ${color green} ${if_match ${hddtemp /dev/sdd}<=115}${color green}${alignr}${hddtemp /dev/sdd} F${else}${if_match ${hddtemp /dev/sdd}<=120}${color yellow}${alignr}${hddtemp /dev/sdd} F${else}${if_match ${hddtemp /dev/sdd}>120}${color red}${alignr}${hddtemp /dev/sdd} F${endif}${endif}${endif}${color}

${color}ENP3S0  Inbound ${color green}${downspeed enp3s0}
${color}${color green}${downspeedgraph enp3s0 8,0}
${color}ENP3S0 Outbound ${color green}${upspeed enp3s0}
${color}${color green}${upspeedgraph enp3s0 8,0}
${color}TUN 0   Inbound ${color green}${downspeed tun0}
${color}${color green}${downspeedgraph tun0 8,0}
${color}TUN 0  Outbound ${color green}${upspeed tun0}
${color}${color green}${upspeedgraph tun0 8,0}


${color}Process                    PID    CPU%   MEM%
  
${color}${top name 1}${color green}          ${top pid 1} ${top cpu 1} ${top mem 1}${color}
${top name 2}${color green}          ${top pid 2} ${top cpu 2} ${top mem 2}${color}
${top name 3}${color green}          ${top pid 3} ${top cpu 3} ${top mem 3}${color}
${top name 4}${color green}          ${top pid 4} ${top cpu 4} ${top mem 4}${color}
${top name 5}${color green}          ${top pid 1} ${top cpu 5} ${top mem 5}${color}
${top name 6}${color green}          ${top pid 6} ${top cpu 6} ${top mem 6}${color}
${top name 7}${color green}          ${top pid 7} ${top cpu 7} ${top mem 7}${color}
${top name 8}${color green}          ${top pid 8} ${top cpu 8} ${top mem 8}${color}
${top name 9}${color green}          ${top pid 9} ${top cpu 9} ${top mem 9}${color}
${top name 10}${color green}          ${top pid 10} ${top cpu 10} ${top mem 10}${color}

${color}Available RAM:${color green} $memmax
${color}RAM Usage:${color green} $mem ($memperc%) 
${membar 8,0}
${color}Available SWAP:${color green} $swapmax
${color}SWAP Usage:${color green} $swap ($swapperc%) 
${swapbar 8,0}


${color}SDA  Read ${color green}${diskio_read /dev/sda}
${color}${color green}${diskiograph_read /dev/sda 8,0 }
${color}SDA Write ${color green}${diskio_write /dev/sda}
${color}${color green}${diskiograph_write /dev/sda 8,0 }
${color}SDB  Read ${color green}${diskio_read /dev/sdb}
${color}${color green}${diskiograph_read /dev/sdb 8,0  }
${color}SDB Write ${color green}${diskio_write /dev/sdb}
${color}${color green}${diskiograph_write /dev/sdb 8,0  }
${color}SDC  Read ${color green}${diskio_read /dev/sdc}
${color}${color green}${diskiograph_read /dev/sdc 8,0  }
${color}SDC Write ${color green}${diskio_write /dev/sdc}
${color}${color green}${diskiograph_write /dev/sdc 8,0  }
${color}SDD  Read ${color green}${diskio_read /dev/sdd}
${color}${color green}${diskiograph_read /dev/sdd 8,0  }
${color}SDD Write ${color green}${diskio_write /dev/sdd}
${color}${color green}${diskiograph_write /dev/sdd 8,0  }


${color}LVM System   $color  ${fs_free_perc /}%$alignr${fs_free /} / ${fs_size /}
${color green}${fs_bar 6 /}
${color}LVM Torrent  $color  ${fs_free_perc /media/jim/d54970f5-6548-4b35-ae68-fcf4b76679eb/}%$alignr${fs_free /media/jim/d54970f5-6548-4b35-ae68-fcf4b76679eb/} / ${fs_size /media/jim/d54970f5-6548-4b35-ae68-fcf4b76679eb/}
${color green}${fs_bar 6 /media/jim/d54970f5-6548-4b35-ae68-fcf4b76679eb/}
${color}SDA Restore 1$color  ${fs_free_perc /media/jim/Restore 1/}%$alignr${fs_free /media/jim/Restore 1/} / ${fs_size /media/jim/Restore 1/}
${color green}${fs_bar 6 /media/jim/Restore 1/}
${color}SDB Restore 2$color  ${fs_free_perc /media/jim/Restore 2/}%$alignr${fs_free /media/jim/Restore 2/} / ${fs_size /media/jim/Restore 2/}
${color green}${fs_bar 6 /media/jim/Restore 2/}
${color}SDC Archive 1$color  ${fs_free_perc /media/jim/Archive 1/}%$alignr${fs_free /media/jim/Archive 1/} / ${fs_size /media/jim/Archive 1/}
${color green}${fs_bar 6 /media/jim/Archive 1/}
${color}SDD Archive 2$color  ${fs_free_perc /media/jim/Archive 2/}%$alignr${fs_free /media/jim/Archive 2/} / ${fs_size /media/jim/Archive 2/}
${color green}${fs_bar 6 /media/jim/Archive 2/}


$alignc${color}System Uptime:${color green} $uptime
]]
pcwolf

Re: Conky Showoff thread

Post by pcwolf »

Banjo ... I leave the Conky window up on desktop ... figure out how to get it to update on an interval you set?

Nevermind, I think I see it. Use "execi" with interval.
User avatar
banjo
Level 2
Level 2
Posts: 89
Joined: Thu Jun 22, 2017 4:31 pm
Location: Reading, Massachusetts

Re: Conky Showoff thread

Post by banjo »

Some of the behavior of Conky is a bit obscure. So I have been looking around to find out what execi actually does. Here is what I think is happening, although I could be wrong.

Conky has a loop that processes all of the code in conky.text every "update_interval" seconds at every iteration of the loop. I think that the "interval" of execi is actually a loop counter. So if you call "execi 10" the script gets called every 10th iteration through the basic loop. With an update_interval = 1, and the execi interval = 10, the script called by execi will be executed every 10th iteration, once every 10 seconds.

I have confirmed that the script actually does get called less frequently based on the interval setting, even though all of the lines in conky.text are processed for every iteration. Conky remembers the most recent output from the script, and it displays that on the screen at the regular looping interval. This is important to know because.......

There is a bug in conky that makes it fail to call the execi script the first time through. So if you want to call a script every five minutes, and you set "update_interval=300", the output from the script will not show up for 5 minutes. That is the way it works on my computer.

What this tells you is that for a script you want to call infrequently, you should set the update_interval to small number like 1 second, and then use execi with a larger interval. I put my weather conky up with the basic loop counter set to 300 seconds, using exec, and it did not update the display at all for the first 5 minutes. So I then set the update_interval = 1 second and used "execi 300 <script>" and it updated after one second, even though the script itself was being called every 5 minutes.

Banjo
(_)=='=~

Edit: I have run some tests, and the "interval" in execi is not just a loop counter. It is actually expressed in seconds. If I set update_interval = 2 and execi interval = 10, the script is called 5 times, not 10 times. So I have to retract some of my assumptions above. The execi interval is actually the number of seconds between calls to the script. The output from previous calls to the script is processed every 2 seconds.
If only the best bird sang, the forest would be a very quiet place.
User avatar
trytip
Level 14
Level 14
Posts: 5371
Joined: Tue Jul 05, 2016 1:20 pm

Re: Conky Showoff thread

Post by trytip »

i still use the old conky
Image

Code: Select all

# Name: Metro Style Conky
#
# Author: Kant-o (feedback via gnome-look).

# - Conky settings - #
alignment bottom_left
background yes
border_width 0
cpu_avg_samples 1
default_color ffffff
draw_outline no
draw_borders no
draw_shades no
use_xft yes
xftfont Ubuntu:size=12

# size of text area
minimum_size 260 220
maximum_width 240
max_text_width 240

no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_transparent no
own_window_class Conky
#all options for own_window_type are normal, desktop, dock, panel or override
own_window_type normal
own_window_hints undecorated,sticky,skip_taskbar,skip_pager,below
stippled_borders 0
update_interval 3.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

own_window_colour 2E3436

###Defining Colors###
#Default White#
default_color 2F343F
#Default MY Light Green#
#default_color 90EE90
default_outline_color 000000
default_shade_color 000000
#Shades of Gray#
color3 DDDDDD
color2 AAAAAA
color3 888888
#Orange#
color4 EF5A29
#MY Light Green#
color5 90EE90
#MY Blue Light TEXT#
color6 55ABFF
#Light Orange#
color7 FFA300
#MY Blue Light BARS#
color8 1E90FF
#MY Dark Gray#
color9 2E3436
#MY Dark Red#
color0 310000
#My Blue Graph#
#001030 0057FF#
#My Gray Graph#
#474747 E9E9E9#
#My Orange Graph#
#562E00 FF8800#
###End Color###

gap_x 20
gap_y 55
own_window_argb_value 0
own_window_argb_visual no
TEXT
${alignc}${font Ubuntu:normal:size=12}${color7}Open ports : ${color5}${tcp_portmon 1 65535 count}
${color6}${hr 1}${color}
${voffset 1}${goto 0}${font Ubuntu:normal:size=12}${color7}${offset 10}IP:${alignr} PORT:
${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  0}${alignr 1}${tcp_portmon 1 65535 rport  0}
${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  1}${alignr 1}${tcp_portmon 1 65535 rport  1}
${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  2}${alignr 1}${tcp_portmon 1 65535 rport  2}
${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  3}${alignr 1}${tcp_portmon 1 65535 rport  3}
${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  4}${alignr 1}${tcp_portmon 1 65535 rport  4}
${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  5}${alignr 1}${tcp_portmon 1 65535 rport  5}
${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  6}${alignr 1}${tcp_portmon 1 65535 rport  6}
${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  7}${alignr 1}${tcp_portmon 1 65535 rport  7}
${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  8}${alignr 1}${tcp_portmon 1 65535 rport  8}
${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  9}${alignr 1}${tcp_portmon 1 65535 rport  9}
#${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  10}${alignr 1}${tcp_portmon 1 65535 rport  10}
#${goto 5}${font Ubuntu:normal:size=11}${color5}${tcp_portmon 1 65535 rip  11}${alignr 1}${tcp_portmon 1 65535 rport  11}
Image
User avatar
trytip
Level 14
Level 14
Posts: 5371
Joined: Tue Jul 05, 2016 1:20 pm

Re: Conky Showoff thread

Post by trytip »

a collection of conky clocks . extract folder clocks and move to .conky/clocks

Image

download clocks here <<< click download arrow on top right
Image
User avatar
banjo
Level 2
Level 2
Posts: 89
Joined: Thu Jun 22, 2017 4:31 pm
Location: Reading, Massachusetts

Re: Conky Showoff thread

Post by banjo »

Excellent! I had to change a couple of config parameters to get the transparency to work on my system, but after I did that, it all looks great.

Thanks for posting that.
Banjo
(_)=='=~
If only the best bird sang, the forest would be a very quiet place.
User avatar
trytip
Level 14
Level 14
Posts: 5371
Joined: Tue Jul 05, 2016 1:20 pm

Re: Conky Showoff thread

Post by trytip »

new clock, you may need to adjust own_window_type in the conkyrc_AQUA_TEST3e i use override but #all options for own_window_type are normal, desktop, dock, panel or override ... extract folder AQUA_TEST3e and put in .conky/clocks/ if you don't have clocks folder in .conky create it

Image

link to conky <<< click download arrow on top right (EDIT: updated 3-20-18 resized clock hands to use lower cpu executing the lua script)

link to conky_1920_resolution

Image

link to wallpaper
Image
Bozzlabb
Level 1
Level 1
Posts: 1
Joined: Sat May 05, 2018 3:24 am

Re: Conky Showoff thread

Post by Bozzlabb »

Good Morning,

my first Conky..
As Linux Mint Newbie (coming from Windows 10 which is now completely removed)it was a hell of a work for me
Cause standard theme (called Original Smooth/Smooth 3) doesn’t work correctly and show no Wifi and battery signal( cause name of battery was CMB1,not BAT1 or BAT0).
I do research here in the forum how to change that both,do much try and error changes and removed the weather lines ( I don’t need that).

I’m very pleased with the result. I know its nothing special, but it suit to my personal taste.

Image
Locked

Return to “Compiz, Conky, Docks & Widgets”