Peppermint | Linux OS Community Forum
 
It is currently Fri Aug 23, 2019 3:46 pm

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject: Re: Conky scripts
PostPosted: Tue Jul 20, 2010 5:34 am 
Offline
User avatar

Joined: Sat May 29, 2010 6:50 pm
Posts: 105
Location: Right about here.
Bry,

In terminal, enter

Code:
sudo leafpad /etc/xdg/lxsession/Peppermint_Ice/autostart


At the end of the list, add

Code:
@conky


Save the changed file and close the terminal. The next time you boot up, conky should start automatically.

_________________
Some things Man was never meant to know. For everything else, there's Google
If you post a question and it is answered to your satisfaction, please mark the topic as (SOLVED).


Top
 Profile  
 
 

 Post subject: Re: Conky scripts
PostPosted: Tue Jul 20, 2010 6:01 am 
Offline
User avatar

Joined: Sat May 29, 2010 6:50 pm
Posts: 105
Location: Right about here.
I played around with Agave and came up with a better color sceme for my last posted conky when run in Ice.

Image

here is the revised .conkyrc

Code:
# PEPPERMINT-CONKY
# A comprehensive conky script, configugold for use on
# PEPPERMINT, without the need for any external scripts.
#
# Based on conky-jc and the default .conkyrc.
# INCLUDES:
# - tail of /var/log/messages
# - netstat connections to your computer
#

# Create own window instead of using desktop (requigold in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

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

# fiddle with window
use_spacer yes
use_xft no

# Update interval in seconds
update_interval 5.0

# Minimum size of text area
# minimum_size 250 4

minimum_size 280
maximum_width 280

# Draw shades?
draw_shades no

# Text stuff
draw_outline no
# amplifies text if yes
draw_borders no
# font sans
uppercase no
# set to yes if you want all text to be in uppercase

# Stippled borders?
stippled_borders 3

# border margins
border_margin 5

# border width
border_width 2b0

# Default colors and also border colors, grey90 == #e5e5e5
default_color white

own_window_colour black
own_window_transparent yes

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 15
gap_y 150

# Antialiased Fonts
# use_xft
# xftfont Sans
font size 8

# stuff after 'TEXT' will be formatted on screen

TEXT
$color
${color 0099ff}SYSTEM ${hr 2}$color

$alignc Peppermint_Ice running on $machine
$alignc Kernel: ${kernel}
$alignc Uptime: ${uptime}
$alignc Host: ${nodename}

${color 0099ff}CPU ${hr 2}$color

Usage: ${cpu}% of ${freq} MHz $alignr${cpubar 6,120}

${cpugraph 25,280 000000 bd0000}

${color 0099ff}PROCESSES ${hr 2}${color}

NAME             PID       CPU%      MEM%
${color a2a2a2}${hr}$color
${top name 1} ${top pid 1}   ${top cpu 1}    ${top mem 1}
${top name 2} ${top pid 2}   ${top cpu 2}    ${top mem 2}
${top name 3} ${top pid 3}   ${top cpu 3}    ${top mem 3}
${top name 4} ${top pid 4}   ${top cpu 4}    ${top mem 4}
${top name 5} ${top pid 5}   ${top cpu 5}    ${top mem 5}

${color 0099ff}MEMORY ${hr 2}$color

Memory    used ${mem} of ${memmax}

RAM $memperc % ${membar 6,60}$color ${alignr}Swap $swapperc%   ${swapbar 6,60}$color

$alignr${memgraph 25,280 3d3400 cdae00}

${color 0099ff}DISK ${hr 2}$color

Root:   ${fs_used_perc /}%${alignr}${color ff0099}${fs_bar 6,195 /}$color4
Home:   ${fs_used_perc /home}%${alignr}${color 99ff00}${fs_bar 6,195 /home}$color

${color 0099ff}NETWORK (${addr eth0}) ${hr 2}$color

       Down: $color${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s   
$color${downspeedgraph eth0 25,135 000000 ff0099} ${alignr}${upspeedgraph
eth0 25,135 000000 99ff00}       $color
Total: ${color ff0099}${totaldown eth0}${color }${alignr}Total: ${color 99ff00}${totalup eth0}  $color

Inbound: ${tcp_portmon 1 32767 count}    Outbound: ${tcp_portmon 32768 61000 count}${alignr}    Ttorrent: ${tcp_portmon 6881 6999 count}
Total: ${tcp_portmon 1 65535 count}


Hope you like it :mrgreen: :D

_________________
Some things Man was never meant to know. For everything else, there's Google
If you post a question and it is answered to your satisfaction, please mark the topic as (SOLVED).


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Fri Jul 23, 2010 12:41 am 
Offline
User avatar

Joined: Thu Jun 17, 2010 11:07 pm
Posts: 141
Location: /home
My new conky setting.
Image
Here is the script:
Code:
# CONKY
# A comprehensive conky script, configured for use on
# Ubuntu / Debian Gnome, without the need for any external scripts.
#
# Based on conky-jc and the default .conkyrc.
# INCLUDES:
# - tail of /var/log/messages
# - netstat shows number of connections from your computer and application/PID making it. Kill spyware!
#
# -- Pengo
#

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

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

# fiddle with window
use_spacer right

# Use Xft?
use_xft yes
xftfont Dodgv2c:size=8
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

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

# Minimum size of text area
minimum_size 180 0
#maximum_width 200

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 3

# border margins
border_margin 9

# border width
border_width 10

# Default colors and also border colors
default_color 252525
#default_shade_color black
#default_outline_color grey
own_window_colour grey

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 15
gap_y 15

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer none

TEXT
${font Dodger Condensed:size=8}SYSTEM
${hr 2}
${alignc 10}${font Dodger Condensed:size=12}muzieca${font}
${alignc 10}${font Dodger Condensed:size=6}Flip, Roll, and Break the Limits

Kernel:  ${alignr}${kernel}
CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,70}
RAM: $memperc% ${alignr}${membar 8,70}
SWAP: $swapperc% ${alignr}${swapbar 8,70}
Uptime: ${alignr}${uptime}

${alignc 30}${font Dodger Condensed:size=25}${time %H:%M}${font}
${font Dodger Condensed:size=6}${alignc}${time %A %d %B %Y}${font}

${font Dodger Condensed:size=8}HD
${hr 2}
${font Dodger Condensed:size=6}Root:
${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,70 /}
Home:
${voffset 4}${fs_used /home}/${fs_size /home} ${alignr}${fs_bar 8,70 /home}
Media:
${voffset 4}${fs_used /media/DATA01}/${fs_size /media/DATA01} ${alignr}${fs_bar 8,70 /media/DATA01}
${voffset 4}${fs_used /media/DATA02}/${fs_size /media/DATA02} ${alignr}${fs_bar 8,70 /media/DATA02}


${font Dodger Condensed:size=8}NETWORK
${hr 2}
${font Dodger Condensed:size=6}Up: ${upspeed ppp0} kb/s ${alignr}
${upspeedgraph ppp0 8 789E2D A7CC5C}
Down: ${downspeed ppp0} kb/s ${alignr}
${downspeedgraph ppp0 8 FF0000 FF4444}
Upload: ${alignr}${totalup ppp0}
Download: ${alignr}${totaldown ppp0}
Local Ip: ${alignr}${addr ppp0}


${font Dodger Condensed:size=8}PROCESSES
${hr 2}
${font Dodger Condensed:size=7}Highest CPU $alignr CPU MEM
${font Dodger Condensed:size=6}${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}
${top name 4}$alignr${top cpu 4}${top mem 4}
${top name 5}$alignr${top cpu 5}${top mem 5}
${top name 6}$alignr${top cpu 6}${top mem 6}
${top name 7}$alignr${top cpu 7}${top mem 7}

${font Dodger Condensed:size=7}Highest MEM $alignr CPU MEM
${font Dodger Condensed:size=6}${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}
${top_mem name 4}$alignr${top_mem cpu 4}${top_mem mem 4}
${top_mem name 5}$alignr${top_mem cpu 5}${top_mem mem 5}
${top_mem name 6}$alignr${top_mem cpu 6}${top_mem mem 6}
${top_mem name 7}$alignr${top_mem cpu 7}${top_mem mem 7}

You can get the font here:
http://www.dafont.com/dodger.font
Cheers.

_________________
Linux User #527336
Motorbike, Openbox, and Coffee Addict.
Twitter: http://twitter.com/muzieca_zone


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Sat Jul 24, 2010 2:28 pm 
Offline

Joined: Mon Jun 07, 2010 2:34 am
Posts: 226
the minimum size and maximum width variables control the overall window size
# Minimum size of text area
minimum_size 180 0
maximum_width 200
but chances are if you start messing with that, you'll have to change the size of the bars/graphs or it will screw the whole display. depends on how tight the format is.
CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,70}
RAM: $memperc% ${alignr}${membar 8,70}
SWAP: $swapperc% ${alignr}${swapbar 8,70}
change the 8,70 to adjust the size of the graphs, then adjust the window size to fit your smaller graphs

i'd make a copy of the .conkyrc before you started adjusting, then just start tweaking it


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Thu Aug 12, 2010 6:52 pm 
Offline

Joined: Wed Aug 11, 2010 9:13 am
Posts: 109
Location: Cebu City, Philippines
Aging Technogeek wrote:
I played around with Agave and came up with a better color sceme for my last posted conky when run in Ice.

Image

here is the revised .conkyrc

Code:
# PEPPERMINT-CONKY
# A comprehensive conky script, configugold for use on
# PEPPERMINT, without the need for any external scripts.
#
# Based on conky-jc and the default .conkyrc.
# INCLUDES:
# - tail of /var/log/messages
# - netstat connections to your computer
#

# Create own window instead of using desktop (requigold in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

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

# fiddle with window
use_spacer yes
use_xft no

# Update interval in seconds
update_interval 5.0

# Minimum size of text area
# minimum_size 250 4

minimum_size 280
maximum_width 280

# Draw shades?
draw_shades no

# Text stuff
draw_outline no
# amplifies text if yes
draw_borders no
# font sans
uppercase no
# set to yes if you want all text to be in uppercase

# Stippled borders?
stippled_borders 3

# border margins
border_margin 5

# border width
border_width 2b0

# Default colors and also border colors, grey90 == #e5e5e5
default_color white

own_window_colour black
own_window_transparent yes

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 15
gap_y 150

# Antialiased Fonts
# use_xft
# xftfont Sans
font size 8

# stuff after 'TEXT' will be formatted on screen

TEXT
$color
${color 0099ff}SYSTEM ${hr 2}$color

$alignc Peppermint_Ice running on $machine
$alignc Kernel: ${kernel}
$alignc Uptime: ${uptime}
$alignc Host: ${nodename}

${color 0099ff}CPU ${hr 2}$color

Usage: ${cpu}% of ${freq} MHz $alignr${cpubar 6,120}

${cpugraph 25,280 000000 bd0000}

${color 0099ff}PROCESSES ${hr 2}${color}

NAME             PID       CPU%      MEM%
${color a2a2a2}${hr}$color
${top name 1} ${top pid 1}   ${top cpu 1}    ${top mem 1}
${top name 2} ${top pid 2}   ${top cpu 2}    ${top mem 2}
${top name 3} ${top pid 3}   ${top cpu 3}    ${top mem 3}
${top name 4} ${top pid 4}   ${top cpu 4}    ${top mem 4}
${top name 5} ${top pid 5}   ${top cpu 5}    ${top mem 5}

${color 0099ff}MEMORY ${hr 2}$color

Memory    used ${mem} of ${memmax}

RAM $memperc % ${membar 6,60}$color ${alignr}Swap $swapperc%   ${swapbar 6,60}$color

$alignr${memgraph 25,280 3d3400 cdae00}

${color 0099ff}DISK ${hr 2}$color

Root:   ${fs_used_perc /}%${alignr}${color ff0099}${fs_bar 6,195 /}$color4
Home:   ${fs_used_perc /home}%${alignr}${color 99ff00}${fs_bar 6,195 /home}$color

${color 0099ff}NETWORK (${addr eth0}) ${hr 2}$color

       Down: $color${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s   
$color${downspeedgraph eth0 25,135 000000 ff0099} ${alignr}${upspeedgraph
eth0 25,135 000000 99ff00}       $color
Total: ${color ff0099}${totaldown eth0}${color }${alignr}Total: ${color 99ff00}${totalup eth0}  $color

Inbound: ${tcp_portmon 1 32767 count}    Outbound: ${tcp_portmon 32768 61000 count}${alignr}    Ttorrent: ${tcp_portmon 6881 6999 count}
Total: ${tcp_portmon 1 65535 count}


Hope you like it :mrgreen: :D


Can you adjust this for netbooks? Please :)


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Thu Aug 12, 2010 7:08 pm 
Offline
User avatar

Joined: Thu Jun 24, 2010 1:18 pm
Posts: 117
Location: Sweden
http://ubuntuone.com/p/CXj/

Heres my simple but useful conky, no screenie its a surprise =)

_________________
Contact:
fredrikfritte@gmail.com


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Fri Aug 13, 2010 4:25 am 
Offline

Joined: Wed Aug 11, 2010 9:13 am
Posts: 109
Location: Cebu City, Philippines
^ Currently using that conky script posted above. :P


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Thu Sep 16, 2010 1:11 pm 
Offline
User avatar

Joined: Thu Jun 17, 2010 11:07 pm
Posts: 141
Location: /home
My new conky script, combined with lua script.
Image
Conky script:
Code:
# — Conky settings — #
#background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 1024
imlib_cache_size 0

# — Window specifications — #

own_window yes
#own_window_type override#
own_window_type normal
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 0
border_outer_margin 0

minimum_size 800 800
maximum_width 800

alignment top_middle
gap_x 1
gap_y 50

# — Graphics settings — #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# — Text settings — #
use_xft yes
xftfont Droid Sans:size=10
xftalpha 0.5

uppercase no

default_color 3E3E3E
color1 D23000

# — Lua Load — #
lua_load ~/.conky/big_rings.lua
lua_draw_hook_pre clock_rings

TEXT
${voffset 8}${color 3399FF}${font Droid Sans:size=16}${time %A}${font}${voffset -8}${color FFFFFF}${font Droid Sans:size=32}${time %e}${font}
${color FFFFFF}${voffset -30}${color 3399FF}${font Droid Sans:size=18}${time %b}${font}${voffset -3} ${color FFFFFF}${font Droid Sans:size=20}${time %Y}${font}${color 3399FF}${hr}
${voffset 5}${font Zarautz:size=16}${time %H:%M:%S}${voffset 5}${font Droid Sans:size=10}${alignr}muzieca${font}
${font Droid Sans:size=12}${color FFFFFF}${alignr}${acpitemp}°C${font}
${color 3399FF}${voffset 6}${alignr}${sysname} ${kernel} ${machine}
${alignr}Uptime:${color FFFFFF}$uptime_short
${color FFFFFF}${goto 235}${voffset 135}${cpu cpu0}%
${color 3399FF}${goto 232}CPU
${color FFFFFF}${goto 540}${voffset -30}${memperc}%
${color 3399FF}${goto 540}RAM
${color FFFFFF}${goto 255}${voffset -230}${swapperc}%
${color 3399FF}${goto 245}SWAP
${color FFFFFF}${goto 390}${voffset 50}${fs_used_perc /}%
${color 3399FF}${goto 388}Root
${color FFFFFF}${goto 305}${voffset 355}${upspeed ppp0}
${color 3399FF}${goto 305}Up
${color FFFFFF}${goto 510}${voffset 75}${downspeed ppp0}
${color 3399FF}${goto 503}Down
${color FFFFFF}${goto 50}${voffset -170}${fs_used_perc /media/DATA01}%
${color 3399FF}${goto 43}Data01
${color FFFFFF}${goto 720}${voffset -33}${fs_used_perc /media/DATA02}%
${color 3399FF}${goto 712}Data02

#       ${voffset 5}${color}${font Droid Sans:size=17}&${font}${color slate grey} MusicPlayer:
#       ${color e0e0e0}${font Droid Sans:size=9}${exec rhythmbox-client --no-start --print-playing-format %tt} -
#       ${exec rhythmbox-client --no-start --print-playing-format %aa}  ${color adadad}#${font Droid Sans:size=8}

Lua script:
Code:
--[[
Clock Rings by londonali1010 (2009) , mod by arpinux

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.

To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
   lua_load ~/scripts/clock_rings.lua
   lua_draw_hook_pre clock_rings
   
Changelog:
+ v1.0 -- Original release (30.09.2009)
]]

settings_table = {
   {
           name='time',
           arg='%M.%S',
           max=60,
           bg_colour=0xffffff,
           bg_alpha=0.1,
           fg_colour=0x3399cc,
           fg_alpha=0.4,
           x=400, y=400,
           radius=56,
           thickness=5,
           start_angle=0,
           end_angle=360
       },
       {
           name='time',
           arg='%S',
           max=60,
           bg_colour=0xffffff,
           bg_alpha=0.1,
           fg_colour=0x3399cc,
           fg_alpha=0.6,
           x=400, y=400,
           radius=62,
           thickness=5,
           start_angle=0,
           end_angle=360
       },
       {
           name='time',
           arg='%d',
           max=31,
           bg_colour=0xffffff,
           bg_alpha=0.1,
           fg_colour=0x3399cc,
           fg_alpha=0.8,
           x=400, y=400,
           radius=70,
           thickness=5,
           start_angle=-90,
           end_angle=90
   },
       {
           name='time',
           arg='%m',
           max=12,
           bg_colour=0xffffff,
           bg_alpha=0.1,
           fg_colour=0x3399cc,
           fg_alpha=1,
           x=400, y=400,
           radius=76,
           thickness=5,
           start_angle=-90,
           end_angle=90
       },
   {
           name='cpu',
           arg='cpu0',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0xffff00,
           fg_alpha=0.4,
           x=350, y=400,
           radius=200,
           thickness=50,
           start_angle=220,
           end_angle=320
   },
   {
           name='memperc',
           arg='',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0x33ccff,
           fg_alpha=0.8,
           x=450, y=400,
           radius=200,
           thickness=50,
           start_angle=40,
           end_angle=140
   },
   {
           name='swapperc',
           arg='',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0x33ccff,
           fg_alpha=0.8,
           x=400, y=305,
           radius=200,
           thickness=20,
           start_angle=-40,
           end_angle=40
   },
   {
           name='fs_used_perc',
           arg='/',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0x3399cc,
           fg_alpha=0.3,
           x=400, y=350,
           radius=200,
           thickness=30,
           start_angle=-40,
           end_angle=40
   },
   {
           name='upspeedf',
           arg='ppp0',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0xffff33,
           fg_alpha=0.3,
           x=400, y=440,
           radius=200,
           thickness=20,
           start_angle=140,
           end_angle=220
   },
   {
           name='downspeedf',
           arg='ppp0',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0xccff33,
           fg_alpha=0.3,
           x=400, y=470,
           radius=210,
           thickness=20,
           start_angle=140,
           end_angle=220
   },
   {
           name='fs_used_perc',
           arg='/media/DATA01',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0x3399cc,
           fg_alpha=0.8,
           x=380, y=400,
           radius=300,
           thickness=50,
           start_angle=220,
           end_angle=320
   },
   {
           name='fs_used_perc',
           arg='/media/DATA02',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0xff4444,
           fg_alpha=0.8,
           x=420, y=400,
           radius=300,
           thickness=50,
           start_angle=40,
           end_angle=140
   },
}



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)

    -- Draw background ring

    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    cairo_set_line_width(cr,ring_w)
    cairo_stroke(cr)
   
    -- 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))
    cairo_stroke(cr)       
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
end

Please put the lua script as big_rings.lua at .conky folder at your home folder. (you have to create the .conky folder).
Example:
Code:
/home/"username"/.conky/big_rings.lua

and then save the conky script at your home folder.
Example:
Code:
/home/"username"/.conkyrc_a

If you want the scripts running automatically after the computer started, you have to create the autostart script first. my conky autostart script is:
Code:
#!/bin/bash
sleep 20 && conky --config=$HOME/.conkyrc_a &

save it at your home folder as .conky_start.sh.
Next step is make the autostart script executable.
Code:
sudo -i
Enter you root password:
chmod a+x /home/"username"/.conky_start.sh

Next step is,
For Peppermint One users:
Code:
sudo leafpad /etc/xdg/lxsession/Peppermint/autostart

For Peppermint Ice users:
Code:
sudo leafpad /etc/xdg/lxsession/Peppermint_Ice/autostart

add at the very last line:
Code:
@/home/"username"/.conky_start.sh

don't forget to save. :)
Reboot or logout. It should be running from the startup now. I hope this works to you as it works to me. For your information, the screenshot show my desktop with 1024x768 resolution. Maybe you may have to edit the scripts to make it run on your desktop though.
I hope these scripts will be useful to you.
Happy conkying.
Cheers.

_________________
Linux User #527336
Motorbike, Openbox, and Coffee Addict.
Twitter: http://twitter.com/muzieca_zone


Last edited by muzieca on Thu Sep 16, 2010 6:07 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Thu Sep 16, 2010 5:16 pm 
Offline
User avatar

Joined: Thu Jun 24, 2010 1:18 pm
Posts: 117
Location: Sweden
mmm rings and stuff, i had to redo my conky today =)
cant have the same for too long right?

i dont know if you been to the Crunchbang linux forum, thay have a really loooooong thread with alot if conkys, easy to get some ideas and stuff there.

_________________
Contact:
fredrikfritte@gmail.com


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Thu Sep 16, 2010 6:26 pm 
Offline
User avatar

Joined: Thu Jun 17, 2010 11:07 pm
Posts: 141
Location: /home
friTTe wrote:
mmm rings and stuff, i had to redo my conky today =)
cant have the same for too long right?

i dont know if you been to the Crunchbang linux forum, thay have a really loooooong thread with alot if conkys, easy to get some ideas and stuff there.

My first conky script when i'm still using Ubuntu Hardy is by omns from crunchbang linux forum, oh, and hannah's scripts too. This is one of the reason why i'm switching from Ubuntu Hardy to Crunchbang 9.04. :lol: Yes, you're right, crunchbang linux forum has a lot conky scripts.

sirkit77 wrote:
Wow, it`s like the ultimate conky! (Still dreaming of an LCARS conky, though.)

Thank you very much sir.
Well, for the LCARS conky, i've use a simple conky, matched with some LCARS wallpaper. It's not that fancy, but still look nice to me.
Image
Cheers.

_________________
Linux User #527336
Motorbike, Openbox, and Coffee Addict.
Twitter: http://twitter.com/muzieca_zone


Last edited by muzieca on Fri Sep 17, 2010 9:20 am, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Powered by php B.B. © 2000, 2002, 2005, 2007 php B.B. Group
Template made by DEVPPL