how do I switch Conky from the right to the left side of the screen?
I install conky123 in ubuntu 12.04 how do I configure it to switch from the right to the left
at the the bottom is the code but I dont know where to edit to make alterations here is a link for a pic or idea
http://
=======
-- conky_grey.lua
--
-- display : horizontal ring gauge
--
-- author : SLK
-- version : v20121005-01
-- license : Distributed under the terms of GNU GPL version 2 or later
--
--=====
require 'cairo'
-------
-- clock DATA
-- -- HOURS
-- clock_h = {
-- {
-- name='time', arg='%H', max_value=12,
-- x=110, y=80,
-- graph_radius=53,
-- graph_thickness=3,
-- graph_unit_
-- graph_bg_
-- graph_fg_
-- txt_radius=34,
-- txt_weight=1, txt_size=10.0,
-- txt_fg_
-- graduation_
-- graduation_
-- graduation_
-- graduation_
-- },
-- }
-- -- MINUTES
-- clock_m = {
-- {
-- name='time', arg='%M', max_value=60,
-- x=110, y=80,
-- graph_radius=57,
-- graph_thickness=2,
-- graph_unit_angle=6, graph_unit_
-- graph_bg_
-- graph_fg_
-- txt_radius=70,
-- txt_weight=0, txt_size=9.0,
-- txt_fg_
-- graduation_
-- graduation_
-- graduation_
-- graduation_
-- },
-- }
-- -- SECONDS
-- clock_s = {
-- {
-- name='time', arg='%S', max_value=60,
-- x=110, y=80,
-- graph_radius=50,
-- graph_thickness=2,
-- graph_unit_angle=6, graph_unit_
-- graph_bg_
-- graph_fg_
-- txt_radius=40,
-- txt_weight=0, txt_size=12.0,
-- txt_fg_
-- graduation_
-- graduation_
-- graduation_
-- graduation_
-- },
-- }
-------
-- gauge DATA
gauge = {
{
name='cpu', arg='cpu', max_value=100,
x=40, y=60,
graph_
graph_
graph_
graph_
graph_
graph_
hand_
txt_radius=1,
txt_weight=0, txt_size=8.0,
txt_
graduation_
graduation_
graduation_
graduation_
caption='',
caption_
caption_
},
{
name='memperc', arg='', max_value=100,
x=120, y=60,
graph_
graph_
graph_
graph_
graph_
graph_
hand_
txt_radius=1,
txt_weight=0, txt_size=8.0,
txt_
graduation_
graduation_
graduation_
graduation_
caption='',
caption_
caption_
},
{
name=
x=200, y=60,
graph_
graph_
graph_
graph_
graph_
graph_
hand_
txt_radius=1,
txt_weight=0, txt_size=8.0,
txt_
graduation_
graduation_
graduation_
graduation_
caption='',
caption_
caption_
},
{
name=
x=280, y=60,
graph_
graph_
graph_
graph_
graph_
graph_
hand_
txt_radius=1,
txt_weight=0, txt_size=8.0,
txt_
graduation_
graduation_
graduation_
graduation_
caption='',
caption_
caption_
},
{
name=
x=360, y=60,
graph_
graph_
graph_
graph_
graph_
graph_
hand_
txt_radius=1,
txt_weight=0, txt_size=8.0,
txt_
graduation_
graduation_
graduation_
graduation_
caption='',
caption_
caption_
},
{
name=
x=435, y=60,
graph_
graph_
graph_
graph_
graph_
graph_
hand_
txt_radius=1,
txt_weight=0, txt_size=8.0,
txt_
graduation_
graduation_
graduation_
graduation_
caption='',
caption_
caption_
},
}
-------
-- rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
-------
-- angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_
local pos = current_angle + start_angle
return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end
-------
-- draw_clock_ring
-- displays clock
--
function draw_clock_
local max_value = data['max_value']
local x, y = data['x'], data['y']
local graph_radius = data['graph_
local graph_thickness, graph_unit_
local graph_unit_angle = data['graph_
local graph_bg_colour, graph_bg_alpha = data['graph_
local graph_fg_colour, graph_fg_alpha = data['graph_
-- background ring
cairo_
cairo_
cairo_
cairo_
-- arc of value
local val = (value % max_value)
local i = 1
while i <= val do
i = i + 1
end
local angle = (graph_unit_angle * i) - graph_unit_
-- graduations marks
local graduation_radius = data['graduatio
local graduation_
local graduation_
local graduation_
if graduation_radius > 0 and graduation_
local nb_graduation = 360 / graduation_
local i = 1
while i <= nb_graduation do
i = i + 1
end
end
-- text
local txt_radius = data['txt_radius']
local txt_weight, txt_size = data['txt_weight'], data['txt_size']
local txt_fg_colour, txt_fg_alpha = data['txt_
local movex = txt_radius * (math.cos((angle * 2 * math.pi / 360)-(math.pi/2)))
local movey = txt_radius * (math.sin((angle * 2 * math.pi / 360)-(math.pi/2)))
cairo_
cairo_
cairo_
cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3);
cairo_show_text (display, value);
cairo_stroke (display);
end
-------
-- draw_gauge_ring
-- displays gauges
--
function draw_gauge_
local max_value = data['max_value']
local x, y = data['x'], data['y']
local graph_radius = data['graph_
local graph_thickness, graph_unit_
local graph_start_angle = data['graph_
local graph_unit_angle = data['graph_
local graph_bg_colour, graph_bg_alpha = data['graph_
local graph_fg_colour, graph_fg_alpha = data['graph_
local hand_fg_colour, hand_fg_alpha = data['hand_
local graph_end_angle = (max_value * graph_unit_angle) % 360
-- background ring
cairo_
cairo_
cairo_
cairo_
-- arc of value
local val = value % (max_value + 1)
local start_arc = 0
local stop_arc = 0
local i = 1
while i <= val do
start_arc = (graph_unit_angle * i) - graph_unit_
stop_arc = (graph_unit_angle * i)
i = i + 1
end
local angle = start_arc
-- hand
start_arc = (graph_unit_angle * val) - (graph_
stop_arc = (graph_unit_angle * val)
cairo_
cairo_
cairo_
-- graduations marks
local graduation_radius = data['graduatio
local graduation_
local graduation_
local graduation_
if graduation_radius > 0 and graduation_
local nb_graduation = graph_end_angle / graduation_
local i = 0
while i < nb_graduation do
i = i + 1
end
end
-- text
local txt_radius = data['txt_radius']
local txt_weight, txt_size = data['txt_weight'], data['txt_size']
local txt_fg_colour, txt_fg_alpha = data['txt_
local movex = txt_radius * math.cos(
local movey = txt_radius * math.sin(
cairo_
cairo_
cairo_
cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3)
cairo_show_text (display, value)
cairo_stroke (display)
-- caption
local caption = data['caption']
local caption_weight, caption_size = data['caption_
local caption_fg_colour, caption_fg_alpha = data['caption_
local tox = graph_radius * (math.cos(
local toy = graph_radius * (math.sin(
cairo_
cairo_
cairo_
cairo_move_to (display, x + tox + 5, y + toy + 1)
-- bad hack but not enough time !
if graph_start_angle < 105 then
end
cairo_show_text (display, caption)
cairo_stroke (display)
end
-------
-- go_clock_rings
-- loads data and displays clock
--
function go_clock_
local function load_clock_
local str, value = '', 0
str = string.format('${%s %s}',data['name'], data['arg'])
str = conky_parse(str)
value = tonumber(str)
end
for i in pairs(clock_h) do
end
for i in pairs(clock_m) do
end
for i in pairs(clock_s) do
end
end
-------
-- go_gauge_rings
-- loads data and displays gauges
--
function go_gauge_
local function load_gauge_
local str, value = '', 0
str = string.format('${%s %s}',data['name'], data['arg'])
str = conky_parse(str)
value = tonumber(str)
end
for i in pairs(gauge) do
end
end
-------
-- MAIN
function conky_main()
if conky_window == nil then
return
end
local cs = cairo_xlib_
local display = cairo_create(cs)
local updates = conky_parse(
update_num = tonumber(updates)
if update_num > 5 then
-- go_clock_
end
cairo_
cairo_
end
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu conky Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Nathaniel edwards
- Solved:
- Last query:
- Last reply: