Conky Showoff thread

Forum rules
Before you post please read how to get help
User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 » Wed Jan 25, 2017 12:34 pm

greerd wrote:
Sector11 wrote:HEY! Just noticed, "waving to a fellow Canuck". (Lived in Dartmouth for 12 years 80-90's)
I immigrated to Dartmouth from Manitoba :? , via Lower Sackville. Been out here since 88, might of bumped into you in the Liquor Dome!
You never know. I moved to Dartmouth in 88 as well. Have a sister that lives in Winnipeg. She just never moved once she went the the UofM moving from PlaP.

CoffeeClutch BBS - (mine), or Wolf's Den BBS - Bonehead's Paradise BBS sound familiar to name a few?
Using: BunsenLabs based on Debian Stable.
Conky PitStop

User avatar
greerd
Level 5
Level 5
Posts: 981
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Conky Showoff thread

Post by greerd » Wed Jan 25, 2017 12:50 pm

Small world, I remember bouncing around PLaP's by-pass many times on that concrete section of the TransCan. From a farm near Rivers myself. Never was into BBS's much, had a CompuServe account though.

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 » Wed Jan 25, 2017 2:28 pm

greerd wrote:Small world, I remember bouncing around PLaP's by-pass many times on that concrete section of the TransCan. From a farm near Rivers myself. Never was into BBS's much, had a CompuServe account though.
WOW! No kidding, my brother-in-law is originally from Rivers and he thought PlaP was big. Still, I prefer Dartmouth to PlaP any day.

On topic ... after all, this is a conky thread so I fired up a few ...
Image
Using: BunsenLabs based on Debian Stable.
Conky PitStop

User avatar
trytip
Level 8
Level 8
Posts: 2134
Joined: Tue Jul 05, 2016 1:20 pm

Re: Conky Showoff thread

Post by trytip » Wed Jan 25, 2017 2:44 pm

Sector11 wrote:
trytip wrote:if you save a picture in the same directory as your conky you would use this code 227 is width and 700 is length. but your conky has to be semi transparent but for that depending on desktop i use dock if normal doesn't work

Code: Select all

#all options for own_window_type are normal, desktop, dock, panel or override
I really do not understand this "semi-transparent" thing I have been seeing in conky of late, what is it and where does it come from? I don't see it in the conky man page.

Code: Select all

own_window_transparent 	Boolean, set transparency? If ARGB visual is enabled, sets background opacity to 0%.
own_window_transparent yes
Image
own_window_transparent no
Image
Images can be put anywhere:

Code: Select all

${image /home/sector11/images/Subdirs/Grey_c1.png}
${image /media/5/Conky/images/Grey_c2.png -p 600,0}
${image /media/10/Mint/images/Grey/Grey_c3.png -p 0,600}
${image /media/10/Delete.png -p 0,600}
size (-s) and position (-p) does not depend on where the images are.
Conky shown is running in BunsenLabs (Debian) - OpenBox and set as:

Code: Select all

own_window_type normal
i like to keep images in the same directory as the conky in it's own folder this way i can take that whole folder and copy it to another pc and usually everything works out of the box.
semi-transparent looks nice if you want a frame conky which i mostly always use. but i also use conky manager to quickly set it. for me own_window_type normal doesn't completely work, maybe it's a nvidia thing. if i use normal and hit the show desktop on the bottom panel the conky disappears off the screen. so i use own_window_type dock giving me access to semi-transparent in conky manager BUT now you can't quickly move the conky to top right or bottom left the conky will start at top left always and you need to specify coordinates. in dock mode there is no top bottom middle or left right only horizontal and vertical starting from top left. hope i don't confuse anyone :!: i'm sure there are many more codes i don't know and it's easier just to use conky manager for things like placement and transparency

here you can see through the conky the background desktop wallpaper this is semi-transparent 90% using more than that like 40% washes out the picture embedded in the conky. you can see in the second image that even though it's set to top right the calendar is in the left and now depends on horizontal and vertical scale

Image Image
Image

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 » Wed Jan 25, 2017 3:26 pm

^ OK, so all that's doing is playing with the ARGB values in "Conky Manager". Now I've got it.

I prefer doing it the old fashioned way - directly in the conky file. And or using semi-transparent images as well.
Image

I have way to may conkys to have a directory for each one in a it's own directory, lets alone with images. I reuse images in various conkys so I have ~/media/5/Conky/images and I always know where they are.

To each their own. Thank you for the explanation.
Using: BunsenLabs based on Debian Stable.
Conky PitStop

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 » Wed Jan 25, 2017 3:46 pm

@ 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! ;)
Using: BunsenLabs based on Debian Stable.
Conky PitStop


dimspace
Level 1
Level 1
Posts: 4
Joined: Sun Sep 10, 2017 6:27 pm
Contact:

Re: Conky Showoff thread

Post by dimspace » Fri Nov 24, 2017 5:54 pm

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
Selection_004.png (164.07 KiB) Viewed 2984 times
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
Level 1
Level 1
Posts: 31
Joined: Tue May 21, 2013 3:55 pm

Re: Conky Showoff thread

Post by b2a8r1 » Wed Jan 24, 2018 10:15 pm

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.
Arch 4.16.8
AMD RYZEN 5 1600 ASUSTeK PRIME B350-PLUS 8gb Mem
XFX Rx 480 os Samsung_SSD_850_500GB Storage 3TB Seagate Mythtv 29.1/fixes
Tuners 1x HVR 1150 1x Quadhd ATSC

Luffs
Level 1
Level 1
Posts: 1
Joined: Wed Jan 24, 2018 9:58 pm

Re: Conky Showoff thread

Post by Luffs » Wed Jan 24, 2018 10:23 pm

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

Image

pcwolf
Level 1
Level 1
Posts: 20
Joined: Fri Dec 22, 2017 12:08 am

Re: Conky Showoff thread

Post by pcwolf » Mon Jan 29, 2018 6:44 pm

Just the facts, ma'am :)
Attachments
Conky FSa.jpg
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: 68
Joined: Thu Jun 22, 2017 4:31 pm
Location: Reading, Massachusetts

Re: Conky Showoff thread

Post by banjo » Wed Jan 31, 2018 9:48 am

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
Screenshot of a simple conky
simple-conky.png (166.43 KiB) Viewed 2015 times
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
Level 1
Level 1
Posts: 20
Joined: Fri Dec 22, 2017 12:08 am

Re: Conky Showoff thread

Post by pcwolf » Wed Jan 31, 2018 8:46 pm

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: 68
Joined: Thu Jun 22, 2017 4:31 pm
Location: Reading, Massachusetts

Re: Conky Showoff thread

Post by banjo » Wed Jan 31, 2018 10:04 pm

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 8
Level 8
Posts: 2134
Joined: Tue Jul 05, 2016 1:20 pm

Re: Conky Showoff thread

Post by trytip » Wed Jan 31, 2018 10:37 pm

Image

Image
Image

pcwolf
Level 1
Level 1
Posts: 20
Joined: Fri Dec 22, 2017 12:08 am

Re: Conky Showoff thread

Post by pcwolf » Thu Feb 01, 2018 1:07 am

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: 68
Joined: Thu Jun 22, 2017 4:31 pm
Location: Reading, Massachusetts

Re: Conky Showoff thread

Post by banjo » Thu Feb 01, 2018 8:46 pm

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
ConkyNOAA01.png (118.94 KiB) Viewed 1904 times
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
ConkyNOAA02.png (133.09 KiB) Viewed 1904 times
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.

User avatar
Jim Hauser
Level 5
Level 5
Posts: 506
Joined: Mon Jun 30, 2014 10:08 pm
Location: Pascagoula, Mississippi

Re: Conky Showoff thread

Post by Jim Hauser » Thu Feb 01, 2018 8:55 pm

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
Level 1
Level 1
Posts: 20
Joined: Fri Dec 22, 2017 12:08 am

Re: Conky Showoff thread

Post by pcwolf » Fri Feb 02, 2018 6:10 pm

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: 68
Joined: Thu Jun 22, 2017 4:31 pm
Location: Reading, Massachusetts

Re: Conky Showoff thread

Post by banjo » Fri Feb 02, 2018 7:45 pm

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.

Post Reply

Return to “Compiz, Conky, Docks, & Widgets”