Page 1007 of 2348 FirstFirst ... 75079079579971005100610071008100910171057110715072007 ... LastLast
Results 10,061 to 10,070 of 23480

Thread: Post your .conkyrc files w/ screenshots

  1. #10061
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by djyoung4 View Post
    confusing. a cpu I don't have?
    What Bruce meant was if you want to draw a horizontal line which is limited in length you can use
    cpubar (cpuN) (height),(width) .....N being a cpu you don't have
    eg
    Code:
    ${cpubar cpu5 1,100}
    or you could use the under score key.
    This is because ${hr} has no width limit and will draw to the width of your conky.

    If you just want to limit the height and width of a bar that your actually using add the dimensions as shown above.
    Last edited by stinkeye; October 25th, 2009 at 07:40 AM.

  2. #10062
    Join Date
    Nov 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Hit a snag!



    Code:

    Code:
    curl --silent 'http://dailyatheistquote.com/' | sed '{:q;N;s/\n/ /g;t q}'|grep -o '<div id="quote">[^<]*'|sed 's/<div id=\"quote\">[[:blank:]]*//;s/[[:blank:]]*$//' | fold -sw 100 | sed -e 's/^/\${alignc}/' -e 's/\&quot;/\"/'
    What's happening is single-line quotes don't parse the end properly. If I force it to drop to a second line, it's fine.
    Last edited by SomeGuyDude; October 25th, 2009 at 08:31 AM.
    Want me to punchisize your face, For free??

  3. #10063
    Join Date
    May 2008
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by SomeGuyDude View Post
    Hit a snag!



    Code:

    Code:
    curl --silent 'http://dailyatheistquote.com/' | sed '{:q;N;s/\n/ /g;t q}'|grep -o '<div id="quote">[^<]*'|sed 's/<div id=\"quote\">[[:blank:]]*//;s/[[:blank:]]*$//' | fold -sw 100 | sed -e 's/^/\${alignc}/' -e 's/\&quot;/\"/'
    What's happening is single-line quotes don't parse the end properly. If I force it to drop to a second line, it's fine.
    Code:
    -e 's/\&quot;/\"/'
    Make it
    Code:
    -e 's/\&quot;/\"/g'
    "g" for global so it gets all occurrences on the line. The default is that sed only edits the first occurrence it finds on each line.

  4. #10064
    Join Date
    Nov 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Thank you, sir! Is there a good resource to learn curl? I'm starting to pick up on the syntax just by looking at the code for a while (mostly the simple replacements), but just googling the language hasn't gotten me anywhere.

    EDIT: incidentally, that just fixed me rather nicely since I can now ALSO add a little 'g' to my alignc bit, meaning no more ******* around with offsets and gotos to get the quote centered.
    Last edited by SomeGuyDude; October 25th, 2009 at 09:11 AM.
    Want me to punchisize your face, For free??

  5. #10065
    Join Date
    May 2008
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by SomeGuyDude View Post
    Thank you, sir! Is there a good resource to learn curl? I'm starting to pick up on the syntax just by looking at the code for a while (mostly the simple replacements), but just googling the language hasn't gotten me anywhere.

    EDIT: incidentally, that just fixed me rather nicely since I can now ALSO add a little 'g' to my alignc bit, meaning no more ******* around with offsets and gotos to get the quote centered.
    All curl does is transfer data to or from a url. Sed (Stream EDitor) just edits the stream of data returned by curl.
    http://www.grymoire.com/Unix/Sed.html is a good resource for using sed. Sed is good for editing the output from almost anything on the command line.

  6. #10066
    Join Date
    Jul 2005
    Location
    The Netherlands
    Beans
    209
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Crinos512 View Post
    actually I'm coming to understand it more now, and am adding warning and danger alphas... so my Wifi will actually fade in and out, etc.

    I did notice some redundant code...
    Code:
    	-- Draw indicator ring
    	cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    -->	cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    	if cc == true then
    		if cd == true then
    			if value >= wa and value < da then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(wc,fga))
    			elseif value >= da then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(dc,fga))
    			else
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    			end
    		else
    			if value <= da then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(dc,fga))
    			elseif value <= wa then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(wc,fga))
    			else
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    			end
    		end
    	else
    		cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    	end
    	cairo_stroke(cr)
    end
    You can remove the first instance safely... I'm feeling a bit under the weather, but I'll keep going and I'll post it all when I'm done.
    My bad. I forgot to remove it. Was there for copy-paste purposes.


    Quote Originally Posted by Crinos512 View Post
    Finally done....

    rings.lua
    Code:
    --[[
    Ring Meters by londonali1010 (2009) 
    << Modified by Crinos512 with inspiration from Proxess >>
     
    This script draws percentage meters as rings. It is fully customisable; all options are described in the script.
     
    IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num > 5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num > 3; conversely if you update Conky every 0.5s, you should use update_num > 10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.
     
    To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
    	lua_load ~/scripts/rings-v1.2.1.lua
    	lua_draw_hook_pre ring_stats
     
    Changelog:
    + v1.2.1 -- Fixed minor bug that caused script to crash if conky_parse() returns a nil value (20.10.2009)
    + v1.2 -- Added option for the ending angle of the rings (07.10.2009)
    + v1.1 -- Added options for the starting angle of the rings, and added the "max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009)
    + v1.0 -- Original release (28.09.2009)
    ]]
    
    settings_table = {
    	{
    		-- Edit this table to customise your rings.
    		-- You can create more rings simply by adding more elements to settings_table.
    		-- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
    		name='wireless_link_qual_perc',
    		-- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
    		arg='wlan0',
    		-- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
    		max=100,
    		-- "bg_colour" is the colour of the base ring.
    		bg_colour=0x000000,
    		-- "bg_alpha" is the alpha value of the base ring.
    		bg_alpha=0.3,
    		-- "fg_colour" is the colour of the indicator part of the ring.
    		fg_colour=0x007FFF,
    		-- "fg_alpha" is the alpha value of the indicator part of the ring.
    		fg_alpha=0.5,
    		-- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
    		x=100, y=125,
    		-- "radius" is the radius of the ring.
    		radius=85,
    		-- "thickness" is the thickness of the ring, centred around the radius.
    		thickness=20,
    		-- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
    		start_angle=-58,
    		-- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger (e.g. more clockwise) than start_angle.
    		end_angle=58,
    		-- "color_coding" is the variable that defines if there's a colour state level
    		colour_coding=true,
    		-- "coding_direction" simply indicates if it's a countdown (false) or a status (true)
    		coding_direction=false,
    		-- "warning" is the value that defines the state of the warning
    		warning=75,
    		-- "warning_colour" is the value that defines the state of the warning
    		warning_colour=0x007FFF,
    		-- "warning_alpha" is the alpha value of the indicator part of the ring during the state of the warning.
    		warning_alpha=0.3,
    		-- "danger" is the value that defines the state of the danger
    		danger=50,
    		-- "danger_colour" is the value that defines the state of the danger
    		danger_colour=0x007FFF,
    		-- "danger_alpha" is the alpha value of the indicator part of the ring during the state of the danger.
    		danger_alpha=0.1
    
    	},
    	{
    		name='battery_percent', 
    		arg='BAT1',
    		max=100,
    		bg_colour=0x000000,
    		bg_alpha=0.3,
    		fg_colour=0xFFFF00,
    		fg_alpha=0.3,
    		x=100, y=125,
    		radius=90,
    		thickness=10,
    		start_angle=62,
    		end_angle=298,
    		colour_coding=true,
    		coding_direction=false,
    		warning=70,
    		warning_colour=0xFF8800,
    		warning_alpha=0.4,
    		danger=20,
    		danger_colour=0xFF0000,
    		danger_alpha=0.5
    	},
    	{
    		name='battery_percent',
    		arg='BAT0',
    		max=100,
    		bg_colour=0x000000,
    		bg_alpha=0.3,
    		fg_colour=0xFFFF00,
    		fg_alpha=0.3,
    		x=100, y=125,
    		radius=80,
    		thickness=10,
    		start_angle=62,
    		end_angle=298,
    		colour_coding=true,
    		coding_direction=false,
    		warning=70,
    		warning_colour=0xFF8800,
    		warning_alpha=0.4,
    		danger=20,
    		danger_colour=0xFF0000,
    		danger_alpha=0.5
    	},
    	{
    		name='upspeedf',
    		arg='eth0',
    		max=1500,
    		bg_colour=0x000000,
    		bg_alpha=0.5,
    		fg_colour=0x00FF00,
    		fg_alpha=0.5,
    		x=100, y=125,
    		radius=60,
    		thickness=5,
    		start_angle=182,
    		end_angle=358,
    		colour_coding=true,
    		coding_direction=false,
    		warning=1000,
    		warning_colour=0x00FF00,
    		warning_alpha=0.4,
    		danger=500,
    		danger_colour=0x00FF00,
    		danger_alpha=0.3
    	},
    	{
    		name='downspeedf',
    		arg='eth0',
    		max=1000,
    		bg_colour=0x000000,
    		bg_alpha=0.5,
    		fg_colour=0xFF0000,
    		fg_alpha=0.5,
    		x=100, y=125,
    		radius=60,
    		thickness=5,
    		start_angle=2,
    		end_angle=178,
    		colour_coding=true,
    		coding_direction=false,
    		warning=750,
    		warning_colour=0xFF0000,
    		warning_alpha=0.4,
    		danger=500,
    		danger_colour=0xFF0000,
    		danger_alpha=0.3
    	},
    	{
    		name='upspeedf',
    		arg='wlan0',
    		max=200,
    		bg_colour=0x000000,
    		bg_alpha=0.5,
    		fg_colour=0x00FF00,
    		fg_alpha=0.5,
    		x=100, y=125,
    		radius=65,
    		thickness=5,
    		start_angle=182,
    		end_angle=358,
    		colour_coding=true,
    		coding_direction=false,
    		warning=1000,
    		warning_colour=0x00FF00,
    		warning_alpha=0.4,
    		danger=500,
    		danger_colour=0x00FF00,
    		danger_alpha=0.3
    	},
    	{
    		name='downspeedf',
    		arg='wlan0',
    		max=200,
    		bg_colour=0x000000,
    		bg_alpha=0.5,
    		fg_colour=0xFF0000,
    		fg_alpha=0.5,
    		x=100, y=125,
    		radius=65,
    		thickness=5,
    		start_angle=2,
    		end_angle=178,
    		colour_coding=true,
    		coding_direction=false,
    		warning=1000,
    		warning_colour=0xFF0000,
    		warning_alpha=0.4,
    		danger=500,
    		danger_colour=0xFF0000,
    		danger_alpha=0.3
    	},
    }
    
     
    require 'cairo'
     
    function rgb_to_r_g_b(colour,alpha)
    	return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
     
    function draw_ring(cr,t,pt)
    	local w,h=conky_window.width,conky_window.height
    
    	local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
    	local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']
    
    	local angle_0=sa*(2*math.pi/360)-math.pi/2
    	local angle_f=ea*(2*math.pi/360)-math.pi/2
    	local t_arc=t*(angle_f-angle_0)
    	
    	local wn, dn=pt['warning'], pt['danger']
    	local cc, cd, wa, wc, da, dc=pt['colour_coding'], pt['coding_direction'], pt['warning_alpha'], pt['warning_colour'], pt['danger_alpha'], pt['danger_colour']
    
    	local str=''
    	local value=0
    
    	str=string.format('${%s %s}',pt['name'],pt['arg'])
    	str=conky_parse(str)
    	value=tonumber(str)
    	
    	-- Draw background ring
    	cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    	cairo_set_line_width(cr,ring_w)
    	cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    	cairo_stroke(cr)
    
    	-- Draw indicator ring
    	cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    	if cc == false then
    		cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    	else
    		if cd == true then
    			if value >= wn and value < dn then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(wc,wa))
    			elseif value >= dn then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(dc,da))
    			else
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    			end
    		else
    			if value <= dn then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(dc,da))
    			elseif value <= wn then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(wc,wa))
    			else
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    			end
    		end
    	end
    	cairo_stroke(cr)
    end
     
    function conky_ring_stats()
    	local function setup_rings(cr,pt)
    		local str=''
    		local value=0
     
    		str=string.format('${%s %s}',pt['name'],pt['arg'])
    		str=conky_parse(str)
     
    		value=tonumber(str)
    		if value == nil then value = 0 end
    		pct=value/pt['max']
     
    		draw_ring(cr,pct,pt)
    	end
     
    	if conky_window==nil then return end
    	local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
     
    	local cr=cairo_create(cs)	
     
    	local updates=conky_parse('${updates}')
    	update_num=tonumber(updates)
     
    	if update_num>5 then
    		for i in pairs(settings_table) do
    			setup_rings(cr,settings_table[i])
    		end
    	end
    end
    and the conky that calls it:
    .conkyringsrc
    Code:
    #!/usr/bin/conky -d -c
    ##    .conkyrc configuration
    alignment top_right
    background yes
    border_inner_margin 0
    border_outer_margin 0
    # http://htmlhelp.com/cgi-bin/color.cgi
    color0 555555			#
    color1 483D8B			# Dark Slate Blue
    color2 B8860B			# Dark goldenrod
    color3 4682B4			# Steelblue
    color4 8B0000			# Dark red
    color5 008080			# Teal
    color6 333333			# Gray20
    color7 C8C8FF			#  (COOL)
    color8 FFFFCC			#  (WARM)
    color9 FCCCCC			#  (HOT)
    cpu_avg_samples 2
    default_color F8F8FF          # Ghost white
    default_outline_color 000000  # Black
    default_shade_color 000000    # Black
    double_buffer yes
    draw_borders no
    draw_graph_borders no
    draw_outline no
    draw_shades no
    gap_x 0
    gap_y 32
    max_specials 1024
    max_user_text 4000
    maximum_width 200
    minimum_size 850
    net_avg_samples 2
    no_buffers yes
    override_utf8_locale yes
    own_window yes
    own_window_colour 000000      # Black
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    own_window_transparent yes
    own_window_type normal
    pad_percents 2
    short_units yes
    stippled_borders 3
    text_buffer_size 8000
    total_run_times 0
    update_interval 1.0
    uppercase no
    use_spacer right
    use_xft yes
    xftalpha 0.75
    xftfont Liberation Sans:size=8
    # -- Lua load -- #
    lua_load ~/.conky/conkyparts/rings.lua
    lua_draw_hook_pre ring_stats
    
    #After this begins text to be formatted on screen
    TEXT
    
    ${alignc}Signal: ${color2}${wireless_link_qual_perc wlan0}%${color}
    
    
    
    
    
    
    ${alignc}ESSID
    ${alignc}${color2}${wireless_essid wlan0}${color}
    ${alignc}${upspeedf wlan0} // ${downspeedf wlan0}
    ${alignc}${upspeedf eth0} // ${downspeedf eth0}
    
    
    
    
    
    
    
    ${alignc}Battery: ${color2}${battery_percent BAT0} %${color} // ${color2}${battery_percent BAT1} %${color}

    Pictures of the rings in use:
    Attachment 132997Attachment 132998Attachment 132999Attachment 133000Attachment 133001


    This is used on my work Laptop, as my Home desktop doesn't have Wifi...
    << click here to see the full screenshot >>
    Now that looks awesome! Consider yourself robbed! Nan just kidding ^^
    Last edited by proxess; October 25th, 2009 at 11:30 AM.
    Laptop: i7 4930MX @3.9GHz undervolted; 32GB 4x8GB Kingston HyperX Impact 1600MHz; Nvidia 780M 4GB; Samsung 840 EVO mSATA 250GB; Ubuntu 16.04 and Windows 10 Pro.
    Ubuntu #8076 / Linux #429448

  7. #10067
    Join Date
    Jul 2005
    Location
    The Netherlands
    Beans
    209
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    So here's my robbed edition:

    .conkyrc
    Code:
    # 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-2007 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/>.
    
    override_utf8_locale yes
    use_spacer none
    use_xft yes
    xftfont Sans:size=8
    xftalpha 0.8
    
    double_buffer yes
    minimum_size 400 600
    no_buffers yes
    update_interval 1
    
    own_window yes
    own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
    own_window_transparent yes
    own_window_type override
    
    border_margin 5
    border_width 1
    draw_borders no
    draw_shades no
    stippled_borders 0
    
    default_color ffffff
    #default_outline_color 1E1C1A
    #default_shade_color white
    own_window_colour ffffff
    
    alignment top_right
    gap_x 12
    gap_y 20
    
    cpu_avg_samples 1
    net_avg_samples 1
    no_buffers yes
    
    short_units true
    
    #Lua Scripts
    lua_load ~/.conkygui/scripts/clock_mod.lua
    lua_draw_hook_pre clock_rings
    
    
    TEXT
    ${offset 120}${voffset 100}${font Baroque Script:size=8}$nodename
    ${offset 123}${voffset 10}${font Baroque Script:size=15}${time %b}${offset 40}${time %a}${offset 23}${time %d}
    ${offset 168}${voffset 35}${font Baroque Script:size=7}${time %p}
    ${offset 345}${voffset -80}${font Baroque Script:size=7}${if_match ${battery_percent BAT0}<=30}${color FFFE4E}${endif}${if_match ${battery_percent BAT0}<=10}${color 840000}${endif}$battery${color}
    ${voffset 80}${font Baroque Script:size=8}Kernel: ${alignr}${sysname} ${kernel} ${machine}
    Uptime: ${alignr}${uptime}
    ${offset 50}${voffset 5}${freq cpu1}mhz${offset 50}Memory${offset 15}Swap${offset 50}${freq cpu2}mhz
    ${offset 50}${voffset -1}${if_match ${exec sensors | grep "Core 0:" | cut -c15-16 ;}>=55}${color FFFE4E}${endif}${if_match ${exec sensors | grep "Core 0:" | cut -c15-16 ;}>=70}${color 840000}${endif}${exec sensors | grep "Core 0:" | cut -c15-16 ;}°c${color}${offset 255}${if_match ${exec sensors | grep "Core 1:" | cut -c15-16 ;}>=55}${color FFFE4E}${endif}${if_match ${exec sensors | grep "Core 1:" | cut -c15-16 ;}>=70}${color 840000}${endif}${exec sensors | grep "Core 1:" | cut -c15-16 ;}°c${color}
    ${offset 50}${voffset -1}${if_match ${cpu cpu1}<10}0${endif}${if_match ${cpu cpu1}<100}${if_match ${cpu cpu1}>=70}${color FFFE4E}${endif}${if_match ${cpu cpu1}>=90}${color 840000}${endif}0${endif}${if_match ${cpu cpu1}==100}${color 840000}${endif}${cpu cpu1}%${color}${offset 70}${if_match ${memperc}<10}0${endif}${if_match ${memperc}<100}${if_match ${memperc}>=70}${color FFFE4E}${endif}${if_match ${memperc}>=90}${color 840000}${endif}0${endif}${if_match ${memperc}==100}${color 840000}${endif}${memperc}%${color}${offset 40}${if_match ${swapperc}<10}0${endif}${if_match ${swapperc}<100}${if_match ${swapperc}>=70}${color FFFE4E}${endif}${if_match ${swapperc}>=90}${color 840000}${endif}0${endif}${if_match ${swapperc}==100}${color 840000}${endif}${swapperc}%${color}${offset 70}${if_match ${cpu cpu2}<10}0${endif}${if_match ${cpu cpu2}<100}${if_match ${cpu cpu2}>=70}${color FFFE4E}${endif}${if_match ${cpu cpu2}>=90}${color 840000}${endif}0${endif}${if_match ${cpu cpu2}==100}${color 840000}${endif}${cpu cpu2}%${color}
    ${offset 50}/${offset 90}C${offset 70}D${offset 80}G
    ${offset 50}${voffset -1}${if_match ${fs_used_perc /}>=70}${color FFFE4E}${endif}${if_match ${fs_used_perc /}>=90}${color 840000}${endif}${fs_used /}${color}${offset 60}${if_match ${fs_used_perc /media/C}>=70}${color FFFE4E}${endif}${if_match ${fs_used_perc /media/C}>=90}${color 840000}${endif}${fs_used /media/C}${color}${offset 30}${if_match ${fs_used_perc /media/D}>=70}${color FFFE4E}${endif}${if_match ${fs_used_perc /media/D}>=90}${color 840000}${endif}${fs_used /media/D}${color}${offset 70}${if_match ${fs_used_perc /media/G}>=70}${color FFFE4E}${endif}${if_match ${fs_used_perc /media/G}>=90}${color 840000}${endif}${fs_used /media/G}${color}
    ${offset 50}${voffset -1}${fs_size /}${offset 55}${fs_size /media/C}${offset 30}${fs_size /media/D}${offset 65}${fs_size /media/G}
    ${offset 50}${if_match ${wireless_link_qual_perc wlan0}<30}${color FFFE4E}${endif}${if_match ${wireless_link_qual_perc wlan0}<10}${color 840000}${endif}${wireless_essid wlan0}${color}${alignr}eth0
    ${offset 50}${addr wlan0}${alignr}${addr eth0}
    ${offset 50}${upspeed wlan0} / ${downspeed wlan0}${alignr}${upspeed eth0} / ${downspeed eth0}
    ${font ConkyWeather:style=Bold:size=50}${execi 600 conkyForecast --location=POXX0016 --datatype=WF}${alignr}${offset -70}${execi 600 conkyForecast --location=JAXX0071 --datatype=WF}
    ${offset 80}${voffset -105}${font Baroque Script:size=8}Lisbon${alignr}${offset -80}Osaka
    ${offset 80}${execi 600 conkyForecast --location=POXX0016 --datatype=HT --hideunits}c${alignr}${offset -80}${execi 600 conkyForecast --location=JAXX0071 --datatype=HT --hideunits}c
    ${font ConkyWeather:style=Bold:size=50}${execi 600 conkyForecast --location=POXX0016 --datatype=WF --startday=1}${alignr}${offset -70}${execi 600 conkyForecast --location=JAXX0071 --datatype=WF --startday=1}
    ${offset 80}${voffset -105}${font Baroque Script:size=8}Tomorrow${alignr}${offset -80}Tomorrow
    ${offset 80}${execi 600 conkyForecast --location=POXX0016 --datatype=HT --startday=1 --hideunits}c${alignr}${offset -80}${execi 600 conkyForecast --location=JAXX0071 --datatype=HT --startday=1 --hideunits}c
    clock_mod.lua
    Code:
    --[[
    Clock Rings by londonali1010 (2009)
    
    This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script.
    
    IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num>5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num>3; conversely if you update Conky every 0.5s, you should use update_num>10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.
    
    
    Clock Rings Mod by Proxess (2009)
    
    This modification permits you to add warning colours on both countdown values (batteries, wlan, etc) and status percentages (cpu, file system usage, etc).
    
    Clock Rings Mod Mod by Crinos512 (2009)
    
    This modification adds alpha to the warning colours.
    
    
    To call this script in Conky, use the following (assuming that you save this script to ~/.conkygui/scripts/clock_mod.lua):
    	lua_load ~/.conkygui/scripts/clock_mod.lua
    	lua_draw_hook_pre clock_rings
    ]]
    
    settings_table = {
    	{
    		-- Edit this table to customise your rings.
    		-- You can create more rings simply by adding more elements to settings_table.
    		-- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
    		name='time',
    		-- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
    		arg='%I',
    		-- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
    		max=12,
    		-- "bg_colour" is the colour of the base ring.
    		bg_colour=0xffffff,
    		-- "bg_alpha" is the alpha value of the base ring.
    		bg_alpha=0.1,
    		-- "fg_colour" is the colour of the indicator part of the ring.
    		fg_colour=0xffffff,
    		-- "fg_alpha" is the alpha value of the indicator part of the ring.
    		fg_alpha=0.8,
    		-- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
    		x=200, y=150,
    		-- "radius" is the radius of the ring.
    		radius=87,
    		-- "thickness" is the thickness of the ring, centred around the radius.
    		thickness=5,
    		-- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
    		start_angle=0,
    		-- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger than start_angle.
    		end_angle=360,
    		-- "color_coding" is the variable that defines if there's a colour state level
    		colour_coding=false,
    		-- "coding_direction" simply indicates if it's a countdown (false) or a status (true)
    		coding_direction=false,
    		-- "warning" is the value that defines the state of the warning
    		warning=0,
    		-- "warning_colour" is the value that defines the state of the warning
    		warning_colour=0xFFFE4E,
    		-- "warning_alpha" is the alpha value of the indicator part of the ring during the state of the warning.
    		warning_alpha=0.5,
    		-- "danger" is the value that defines the state of the danger
    		danger=0,
    		-- "danger_colour" is the value that defines the state of the danger
    		danger_colour=0x840000,
    		-- "danger_alpha" is the alpha value of the indicator part of the ring during the state of the danger.
    		danger_alpha=0.8
    
    	},
    	{
    		name='time',
    		arg='%M.%S',
    		max=60,
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.8,
    		x=200, y=150,
    		radius=125,
    		thickness=5,
    		start_angle=0,
    		end_angle=360,
    		colour_coding=false,
    		coding_direction=false,
    		warning=0,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=10,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},
    	{
    		name='time',
    		arg='%S',
    		max=60,
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.8,
    		x=200, y=150,
    		radius=135,
    		thickness=5,
    		start_angle=0,
    		end_angle=360,
    		colour_coding=false,
    		coding_direction=false,
    		warning=0,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=10,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},
    	
    	{
    		name='battery_percent',
    		arg='BAT0',
    		max=100,
    		ring="on",
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.3,
    		x=370, y=250,
    		radius=25,
    		thickness=20,
    		start_angle=0,
    		end_angle=360,
    		colour_coding=true,
    		coding_direction=false,
    		warning=30,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=10,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},	
    	
    	{
    		name='cpu',
    		arg='cpu1',
    		max=100,
    		ring="on",
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.3,
    		x=45, y=390,
    		radius=25,
    		thickness=20,
    		start_angle=180,
    		end_angle=360,
    		colour_coding=true,
    		coding_direction=true,
    		warning=70,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=90,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},
    	{
    		name='cpu',
    		arg='cpu2',
    		max=100,
    		ring="on",
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.3,
    		x=370, y=390,
    		radius=25,
    		thickness=20,
    		start_angle=0,
    		end_angle=180,
    		colour_coding=true,
    		coding_direction=true,
    		warning=70,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=90,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},
    	{
    		name='memperc',
    		arg='',
    		max=100,
    		ring="on",
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.3,
    		x=140, y=390,
    		radius=25,
    		thickness=20,
    		start_angle=180,
    		end_angle=360,
    		colour_coding=true,
    		coding_direction=true,
    		warning=70,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=90,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},
    	{
    		name='swapperc',
    		arg='',
    		max=100,
    		ring="on",
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.3,
    		x=270, y=390,
    		radius=25,
    		thickness=20,
    		start_angle=0,
    		end_angle=180,
    		colour_coding=true,
    		coding_direction=true,
    		warning=70,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=90,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},
    	
    	{
    		name='fs_used_perc',
    		arg='/',
    		max=100,
    		ring="on",
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.3,
    		x=45, y=470,
    		radius=25,
    		thickness=20,
    		start_angle=180,
    		end_angle=360,
    		colour_coding=true,
    		coding_direction=true,
    		warning=70,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=90,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},
    	{
    		name='fs_used_perc',
    		arg='/media/G',
    		max=100,
    		ring="on",
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.3,
    		x=370, y=470,
    		radius=25,
    		thickness=20,
    		start_angle=0,
    		end_angle=180,
    		colour_coding=true,
    		coding_direction=true,
    		warning=70,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=90,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},
    	{
    		name='fs_used_perc',
    		arg='/media/C',
    		max=100,
    		ring="on",
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.3,
    		x=140, y=470,
    		radius=25,
    		thickness=20,
    		start_angle=180,
    		end_angle=360,
    		colour_coding=true,
    		coding_direction=true,
    		warning=70,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=90,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},
    	{
    		name='fs_used_perc',
    		arg='/media/D',
    		max=100,
    		ring="on",
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.3,
    		x=270, y=470,
    		radius=25,
    		thickness=20,
    		start_angle=0,
    		end_angle=180,
    		colour_coding=true,
    		coding_direction=true,
    		warning=70,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=90,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},
    	
    	{
    		name='wireless_link_qual_perc',
    		arg='wlan0',
    		max=100,
    		ring="on",
    		bg_colour=0xffffff,
    		bg_alpha=0.1,
    		fg_colour=0xffffff,
    		fg_alpha=0.3,
    		x=45, y=550,
    		radius=25,
    		thickness=20,
    		start_angle=180,
    		end_angle=360,
    		colour_coding=true,
    		coding_direction=false,
    		warning=30,
    		warning_colour=0xFFFE4E,
    		warning_alpha=0.5,
    		danger=10,
    		danger_colour=0x840000,
    		danger_alpha=0.8
    	},
    }
    
    -- Use these settings to define the origin and extent of your clock.
    clock_r=125
    
    -- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.
    clock_x=200	
    clock_y=150
    
    -- Colour & alpha of the clock hands
    hour_colour=0xffffff
    minute_colour=0xffffff
    second_colour=0xffffff
    clock_alpha=0.6
    
    -- Do you want to show the seconds hand?
    show_seconds=true
    
    
    require 'cairo'
    
    function rgb_to_r_g_b(colour,alpha)
    	return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
    
    function draw_ring(cr,t,pt)
    	local w,h=conky_window.width,conky_window.height
    	
    	local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
    	local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']
    	
    	local angle_0=sa*(2*math.pi/360)-math.pi/2
    	local angle_f=ea*(2*math.pi/360)-math.pi/2
    	local t_arc=t*(angle_f-angle_0)
    	
    	local cc, cd=pt['colour_coding'], pt['coding_direction']
    	local wn, dn=pt['warning'], pt['danger']
    	local wa, wc, da, dc=pt['warning_alpha'], pt['warning_colour'], pt['danger_alpha'], pt['danger_colour']
    	
    	local str=''
    	local value=0
    
    	str=string.format('${%s %s}',pt['name'],pt['arg'])
    	str=conky_parse(str)
    	value=tonumber(str)
    	
    	-- Draw background ring
    	cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    	cairo_set_line_width(cr,ring_w)
    	cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    	cairo_stroke(cr)
    
    	-- Draw indicator ring
    	cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    	if cc == false then
    		cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    	else
    		if cd == true then
    			if value < wn then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    			elseif value >= dn then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(dc,da))
    			else
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(wc,wa))
    			end
    		else
    			if value > wn then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    			elseif value <= dn then
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(dc,da))
    			else
    				cairo_set_source_rgba(cr,rgb_to_r_g_b(wc,wa))
    			end
    		end
    	end
    
    	cairo_stroke(cr)
    end
    
    
    function draw_clock_hands(cr,xc,yc)
    	local secs,mins,hours,secs_arc,mins_arc,hours_arc
    	local xh,yh,xm,ym,xs,ys
    	
    	secs=os.date("%S")	
    	mins=os.date("%M")
    	hours=os.date("%I")
    		
    	secs_arc=(2*math.pi/60)*secs
    	mins_arc=(2*math.pi/60)*mins+secs_arc/60
    	hours_arc=(2*math.pi/12)*hours+mins_arc/12
    		
    	-- Draw hour hand
    	
    	xh=xc+0.7*clock_r*math.sin(hours_arc)
    	yh=yc-0.7*clock_r*math.cos(hours_arc)
    	cairo_move_to(cr,xc,yc)
    	cairo_line_to(cr,xh,yh)
    	
    	cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
    	cairo_set_line_width(cr,5)
    	cairo_set_source_rgba(cr,rgb_to_r_g_b(hour_colour,clock_alpha))
    	cairo_stroke(cr)
    	
    	-- Draw minute hand
    	
    	xm=xc+clock_r*math.sin(mins_arc)
    	ym=yc-clock_r*math.cos(mins_arc)
    	cairo_move_to(cr,xc,yc)
    	cairo_line_to(cr,xm,ym)
    	
    	cairo_set_line_width(cr,3)
    	cairo_set_source_rgba(cr,rgb_to_r_g_b(minute_colour,clock_alpha))
    	cairo_stroke(cr)
    	
    	-- Draw seconds hand
    	
    	if show_seconds then
    		xs=xc+1.1*clock_r*math.sin(secs_arc)
    		ys=yc-1.1*clock_r*math.cos(secs_arc)
    		cairo_move_to(cr,xc,yc)
    		cairo_line_to(cr,xs,ys)
    	
    		cairo_set_line_width(cr,1)
    		cairo_set_source_rgba(cr,rgb_to_r_g_b(second_colour,clock_alpha))
    		cairo_stroke(cr)
    	end
    end
    
    function conky_clock_rings()
    	local function setup_rings(cr,pt)
    		local str=''
    		local value=0
    
    		str=string.format('${%s %s}',pt['name'],pt['arg'])
    		str=conky_parse(str)
    
    		value=tonumber(str)
    		pct=value/pt['max']
    
    		draw_ring(cr,pct,pt)
    	end
    
    	-- Check that Conky has been running for at least 5s
    
    	if conky_window==nil then return end
    	local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
    
    	local cr=cairo_create(cs)	
    
    	local updates=conky_parse('${updates}')
    	update_num=tonumber(updates)
    
    	if update_num>5 then
    		for i in pairs(settings_table) do
    			setup_rings(cr,settings_table[i])
    		end
    	end
    
    	draw_clock_hands(cr,clock_x,clock_y)
    end
    There's this crazy little animal biting at me saying "MODIFY YOUR CONKYYYYYYYYEEEEEAH!" but I'm trying to fight it off... It's a tough battle!
    Attached Images Attached Images
    Laptop: i7 4930MX @3.9GHz undervolted; 32GB 4x8GB Kingston HyperX Impact 1600MHz; Nvidia 780M 4GB; Samsung 840 EVO mSATA 250GB; Ubuntu 16.04 and Windows 10 Pro.
    Ubuntu #8076 / Linux #429448

  8. #10068
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by djyoung4 View Post
    confusing. a cpu I don't have?
    Maybe "pick a core you don't have" would have been a better choice of words. But since the conky command is cpubar I didn't want to confuse anyone. Until now that is.

    Take another read of: BARS with Text and then after that: — Text — and you'll see why the last line of code shown,

    Code:
    TEXT
    
    ${font woodbadge:size=15}${color2}CPU 1:${color}${goto 80}${voffset -8}${cpubar cpu1 25,250}
    
    ${color2}CPU 2:${color}${goto 80}${voffset -8}${cpubar cpu2 25,250}
    
    ${color}${goto 80}${voffset -0}${cpubar cpu2 01,100}
    
    ${font}
    does what you want.

    Have a nice day.
    Bruce
    Attached Images Attached Images

  9. #10069
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Crinos512 View Post
    I'd tell you how great that is but I don't want to burst your ego!

    WOW! That's GREAT! {OK, couldn't help myself}

    CHIMO!
    Bruce

  10. #10070
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by proxess View Post
    So here's my robbed edition:

    There's this crazy little animal biting at me saying "MODIFY YOUR CONKYYYYYYYYEEEEEAH!" but I'm trying to fight it off... It's a tough battle!
    Who did you steal it from? - Actually who cares, I just stoled yours.

    You're gonna loose that battle.

    Have a nice day.
    Bruce

Page 1007 of 2348 FirstFirst ... 75079079579971005100610071008100910171057110715072007 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •