• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Back to linux after several years - Ubuntu 9.10 is amazing

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.
I was amazed by ubuntu also. My wireless finally worked out of the box (was cutting out for no reason while running in livecd but it worked.)

You really can't expect a noobie to know how to compile a driver on linux and where to start.

I didn't feel like installing it to a harddrive but i tested (installed)flash player without my video driver installed (requires restart which would clear the ramdisk in livecd) so I know how simple they made ubuntu. You don't really have to look for anything. It also has open office installed by default so it was nice trying that out.

what do people really need except internet(email) some flash videos(youtube) and office apps. (games can be run on wine I guess with some tinkering)

Only cons I see are it needs more specialty software on top of what it already has, fonts(it has none) and thats it.

btw thanks for letting me know there's a way to add real power management features.

I can also confirm that there is a lot less resources used with firefox on linux. You get rid of the cons and change up the interface with compiz and I think I like the new kde4 and you have a windows replacement. (one more con, the media player doesn't come with any codecs but I know kaffeine media player is good if I could find it)

what i forgot to mention is, it's easy to find everything on ubuntu because it knows which video driver you need if it's nvidia/ati and I think you just search for software through the synpatic or apt

Yeah wireless was wonky on my netbook too, same for bluetooth, but upgrading the driver was a snap. Clear step by step commands/instructions, all you needed to know how to do beforehand to do it is read and open a terminal (and install patch/patchutils. kinda nuts a linux install would not have these basic tools installed but thats ubuntu for ya!).

What wireless card/chipset/device does the machine you were having wireless trouble with use? We can probably help. I usd compat drivers, they support several wireless cards, maybe your fix could be the same as mine?
http://linuxwireless.org/en/users/Download#Building_and_installing
(use the stable ones, the nightly ver would install, but my pc would lock up as soon as the drivers were loaded! Luckily I was able to boot into recovery mode, unload the offending modules from the root command line at boot, uninstall the package's modules, then reboot back into my old drivers; someone without the experience I have with linux would have had an extremely tough time with that probably, luckily little basic system tasks and other info keep coming back to me!)


Another note, if I just use the gnome wireless manager program for wireless connection mgmt, I would lose & have to reconnect to the wireless network every time it went to sleep/awoke. Also Id need to punch in my password every wake up to reconnect to wireless. Replacing that stuff with wicd solves both problems. Just apt-get install wicd, it even automatically uninstalls the stock network manager ubuntu comes with, the gnome-wireless junk.


The issues I talk about here would have been enough to send me back to windows7 as I was getting quite annoyed having to punch in my pw twice when waking up (0nce to wake it up & again to connect to wireless), luckily the fixes were relatively simple.
 
I absolutely love linux but when I had Ubuntu 9.04, I could never really figure out how to get anything run properly.
 
im not gonna look into it much but i have ar5B91(draft n) and ar5005(g) or is it 5002. I see something about madwifi supporting the ar 5's
 
I love ubuntu 9.10 but i still could never see myself running it as a primary os. I dual boot it now. I have everything working fine like windows games, flash, skype etc. Idk i still prefer windows 7, im not biased at all im just saying. Ive had the last 2 previous versions of ubuntu as well so im not new to it or anything. I think its mainly because i use ps CS4, sony vegas, and Flstudio so i prefer to do it on windows. Otherwise i can maneuver them both fine. So for me its like a 60/40.

<3 both and if you're not a noob windows doesn't crash.
 
<3 both and if you're not a noob windows doesn't crash.

Working in IT I could resent this statement. We have several windows boxes that just crash for no reason. A few of them dont even produce logs when they do.

At the same time, linux isnt perfect either but it crashes a lot less, with or without the internet attached to it
 
Well probably tuesday or wed. I'll be back on ubuntu full time again. Ordered my asus 1201n netbook/laptop. Can't wait so tired of XP.

I had sold my other computer (phenom 2 machine) which i had ubuntu on, and grabbed my old computer out of storage. But it don't play nice at all with any distro (because of the mobo). So for the last few months i've been dieing lol. Finally!!!!!!!!!!!!!!!!!

Pretty much everything i do is a linux native program so it will be nice to finally come back lol.
 
I love ubuntu 9.10 but i still could never see myself running it as a primary os. I dual boot it now. I have everything working fine like windows games, flash, skype etc. Idk i still prefer windows 7, im not biased at all im just saying. Ive had the last 2 previous versions of ubuntu as well so im not new to it or anything. I think its mainly because i use ps CS4, sony vegas, and Flstudio so i prefer to do it on windows. Otherwise i can maneuver them both fine. So for me its like a 60/40.

<3 both and if you're not a noob windows doesn't crash.

True enough, windows 7 is pretty stable. Ive had a few problems here in there though.

Amusingly I cannot get any of my creative sound cards to work in win7 x64; audigy 1 and audigy2, both suffer from the SCP (snap crackle pop) issue where constant popping noises get piped out of the speakers.
They both work fine in linux with the kernel emu10k* drivers. Seriously I tried dozens and dozens of fixes trying to get the aud2 to work in win7 to no avail.

Its not really windows fault, but creatives (the problem plagues nearly all creative card users with 4gb+ of ram running win7 64) for having crap drivers. It is just amusing that the open source driver in the linux kernel works perfectly in 64 bit mode.

Admittedly I have to keep windows on my main pc for certain work tasks, and because when I reactivate wow its probably going to run a lot better on windows. But I will attempt a wine install of wow and if it really works good then I can go ubuntu full time.

But on the netbook I shrunk my windows7 partition as small as it can go (60gb, lots of work crap on that partition), and the rest of the drive is all linux. I have not had to boot into windows on it for many weeks now, and I have not at all been disappointed.

Furthermore, I did run a win7 vs ubuntu test yesterday, using filezilla I transferred a few eps of some star trek dk9 reruns from my main box to the netbooks fat32 storage partition. I was getting 1-2mb/sec on win7, 2-4mb/sec on ubuntu. Those compat-wireless drivers I talked about/linked before that I am using on the netbook rock seriously hard; the throughput I get from pc to pc over the wireless network on my 1000he is just incredible with these drivers.

Plus Ubuntu looks much much prettier (even the fonts, people keep complaining about fonts in ubuntu, but I imported all the fonts from my win7 fonts directory over to my ubuntu install, and the same fonts from w7 look much prettier on ubuntu than they did in windows) with gnome+compiz; and it runs the same speed as win7 with aero. So I seriously have no reason to switch back on the netbook heh.
 
Working in IT I could resent this statement. We have several windows boxes that just crash for no reason. A few of them dont even produce logs when they do.

At the same time, linux isnt perfect either but it crashes a lot less, with or without the internet attached to it

Yea its not like i can say "No that didnt happen" just saying none of my windows machines have ever just crashed for no reason. My ubuntu has NEVER crashed so thats good, and i do go for alot of things on it not just internet and IM clients lol.

True enough, windows 7 is pretty stable. Ive had a few problems here in there though.

Amusingly I cannot get any of my creative sound cards to work in win7 x64; audigy 1 and audigy2, both suffer from the SCP (snap crackle pop) issue where constant popping noises get piped out of the speakers.
They both work fine in linux with the kernel emu10k* drivers. Seriously I tried dozens and dozens of fixes trying to get the aud2 to work in win7 to no avail.

Its not really windows fault, but creatives (the problem plagues nearly all creative card users with 4gb+ of ram running win7 64) for having crap drivers. It is just amusing that the open source driver in the linux kernel works perfectly in 64 bit mode.

Admittedly I have to keep windows on my main pc for certain work tasks, and because when I reactivate wow its probably going to run a lot better on windows. But I will attempt a wine install of wow and if it really works good then I can go ubuntu full time.

But on the netbook I shrunk my windows7 partition as small as it can go (60gb, lots of work crap on that partition), and the rest of the drive is all linux. I have not had to boot into windows on it for many weeks now, and I have not at all been disappointed.

Furthermore, I did run a win7 vs ubuntu test yesterday, using filezilla I transferred a few eps of some star trek dk9 reruns from my main box to the netbooks fat32 storage partition. I was getting 1-2mb/sec on win7, 2-4mb/sec on ubuntu. Those compat-wireless drivers I talked about/linked before that I am using on the netbook rock seriously hard; the throughput I get from pc to pc over the wireless network on my 1000he is just incredible with these drivers.

Plus Ubuntu looks much much prettier (even the fonts, people keep complaining about fonts in ubuntu, but I imported all the fonts from my win7 fonts directory over to my ubuntu install, and the same fonts from w7 look much prettier on ubuntu than they did in windows) with gnome+compiz; and it runs the same speed as win7 with aero. So I seriously have no reason to switch back on the netbook heh.

Yea its funny you say that because on w7 my friends gcard isnt supported and i had him try ubuntu using wubi. He like flipped out when i showed him gnome+compiz LOL (ubuntu had decent drivers for his out dated card).


*note*
Ive had a couple problems with w7 but nothing i didnt fix in 5 mins ya know. Like a missing .dll, or an unsigned driver some stupid stuff.
 
Last edited:
I just wanted to kind of update my initial sentiment, its not just ubuntu 9.10 that rocks (though it does!)), but really linux as a whole that has evolved into something incredible. Not that it was terrible before, not by a long shot, some of my favorite computing moments of all time was learning and using and hacking Gentoo back when! But also, back then gentoo was the ONLY distro I liked, mostly due to its incredible package management; now lots of distros have great package management, apt has come a long way and ubuntu really turned debian into a kind of pro/hacker distro into an everyone have a good time distro.
But I have now tried several other distros, some ubuntu spinoffs and some totally separate ones, and overall everything works a lot better/smoother/faster than a few years ago.

Im sure a lot has to do with Xorg and Gnome/KDE/XFCE/ect all having come a long way from a few years ago. Also there is no doubt ubuntu deserves a bunch of credit here as they brought the power & flexibility of debian's apt into a mainstream easy to install and maintain distro. All of this happening together really turned out to be something incredible (im repeating myself because I really mean it hehe!). People who have not tried linux yet really have no idea what they are missing out on. And you can even get a lot of games going; in a few weeks when I have the time I will be working on getting wow working in wine, supposedly it runs pretty good! Itll need to be like, rock stable for me to be able to arena or raid from linux, tho the windows client crashes here & there at those worst possible moments more often than Id like too :)


Its downright nuts how little windows has changed from say, the very beginning of vista (say alpha stage) to current windows 7 retail fully patched (we talking what 5+ years here?), compared to linux in that time frame. We are talking tiny changes over many years vs a whole new evolution of linux from something hobbyists tinker with too a fully functional (and in many ways better, definitely more flexible and arguably much better looking) desktop os. Not only that, but there are hundreds if not thousands of different ways to run linux. From simple changes in looks to vastly different functionality and roles, linux can just do everything. All the different window managers/desktop environments, file managers, editors, applications, I mean theres just soooo many options on what kind of system you want to run with linux, where as every win7 box looks practically identical with the exception of the color of the taskbar/window decoration and wallpaper.

On this other forum I post on a lot, the post your desktop threads are usually like 75% windows and 25% linux. Well its almost silly for windows users to even post a desktop, they all look pretty much identical; one person has more icons on his desktop than others, another one has a different wallpaper, but otherwise its the same. But the linux desktops will vary so wildly its crazy! Even just with gnome on ubuntu, there are hundreds of themes, icon sets, window decorations, toolbar/button styles, ect. You can have dozens of gnome screenshots look completely different. Then you get into kde, xfce, enlightenment, openbox, on and on and on. I almost feel bad for all the windows users with identical looking desktops :p
I certainly dont even bother posting win7 desktop shots since I got back into linux last month, I just dont see the point. Now a nice customized gnome desktop with a sweet conky setup and pretty fonts and a transparent terminal displaying sys info, thats what Im talking about =)
Im all about the shiki-brave gnome theme right now. Has its own icons, windows decorations, toolbars & buttons, everything. I also like opencrystal, especially its icons. And Im just now learning about emerald and bijous-project or something. The endless customization is endless!

And back in the day a few yrs ago installing themes, java, codecs, and getting fonts to look good in gnome used to be way complicated, now its just apt-get install <one of dozens of theme packs or specific themes> or other apps. I remember it even used to be troublesome getting newly installed apps to have entries in the app launcher menus of whatever DE you were using!
Now it's great looking, fast, smooth, and easy to use & maintain; linux of today is seriously amazing! Hard to believe that its free, and that largely its regular people creating, improving, and evolving it... sheesh I'm still in shock we have 64 bit flash finally too =)
 
Last edited:
I agree about tho configuration ability available on Linux. Here's my last screenshot:
http://overclockers.posterous.com/imogs-latest-desktop

That screenshot was using the Emerald window decorator, which does better transparency and things with window decorations, like the first screenshot below. The second screenshot is using the more standard GTK window decorator, which has more simple decorations.

The final screenshot is my desktop now that I'm using the wiki brave theme, and I like its look a bit better. Appreciate the tip! :D
 

Attachments

  • windowdec.png
    windowdec.png
    16.8 KB · Views: 344
  • windowdec2.png
    windowdec2.png
    13.6 KB · Views: 344
  • Screenshot-3.jpg
    Screenshot-3.jpg
    74.8 KB · Views: 356
On my 939 dual core and phenom 2 machine i had i was running wow in wine it ran flawless. Ran just as good as it did on windows full blast. At the time i was pretty hardcore/religious about wow running 25 mans every night. Never crashed once on me ever.
 
On my 939 dual core and phenom 2 machine i had i was running wow in wine it ran flawless. Ran just as good as it did on windows full blast. At the time i was pretty hardcore/religious about wow running 25 mans every night. Never crashed once on me ever.

Same experience here. Never had any issues play in WINE and I played the heck out of WoW for a long time during my unemployment spurts
I played through and raided through lich king, but stopped almost a year ago so i cant comment on how any of the new patches work but I dont suspect they have sliden in terms of wine quality
 
I agree about tho configuration ability available on Linux. Here's my last screenshot:
http://overclockers.posterous.com/imogs-latest-desktop

That screenshot was using the Emerald window decorator, which does better transparency and things with window decorations, like the first screenshot below. The second screenshot is using the more standard GTK window decorator, which has more simple decorations.

The final screenshot is my desktop now that I'm using the wiki brave theme, and I like its look a bit better. Appreciate the tip! :D

No problem, looks great btw!! FYI I just grabbed the shiki-colors (i think thats what it was called) package which pulls in around 10 different shiki themes of varying colors. =) My fav is the blue brave but some of the others are cool too, the green one fits in great with Linux Mint =)

Is that conky doing the squiggly stats on the right? Id love to see your .conkyrc =)


I actually just moved my desktop over to Linux Mint 8 as I felt like testing it out again. It looks great. But I cant seem to find some packages that should be in the repositories it says it has access too, corefonts for one. It says it has universe & medibuntu but I still couldnt find it.

Im debating giving xubuntu a shot on my 1000he netbook, I have 2gb ram so ram usage has never been a problem, Im just curious if it will run any smoother. I do love to play with my linux'es =) I need to pick my fav so I can really settle down and get my UI & system perfect.
 
It's conky alright, but with "lua" compiled in. Lua has its own scripts that are called from within the conky script. The lua scripts do the clock and the utilization squiggly, while conky does the text. I got the scripts from conky hardcore, and then modified them after reading them a bit so that they work right for me (I had to add the second CPU ring to reflect the usage on the 2nd core of my CPU).

/etc/conky/conky.conf
Code:
update_interval 2.0
use_xft yes
xftfont verdana :bold:size=10
alignment top_left
xftalpha 0.8
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
stippled_borders 10
border_margin 4
border_width 1
default_shade_color grey
default_outline_color black
default_color white
use_spacer none
no_buffers yes
uppercase no
color1 F8DF58
minimum_size 1400 800
maximum_width 1400
short_units yes
pad_percents 2


lua_load ~/scripts/conky_widgets.lua
lua_draw_hook_pre widgets

TEXT
${font URW Bookman L:bold:size=10}
${goto 250}Hostname: ${nodename}
${goto 250}${sysname} ${kernel}
${goto 250}Uptime:  ${uptime_short}
${goto 250}Wireless Up/Down:  ${totalup wlan0}/${totaldown wlan0}
${goto 250}IP address: ${addr wlan0}
${goto 250}Wired Up/Down: ${totalup eth0}/${totaldown eth0}
${goto 250}IP address: ${addr eth0}
${goto 250}CPU Temperature: ${acpitemp}C 
${goto 250}Battery Time: ${battery_time}
${goto 1155}${voffset -15}CPU: ${cpu cpu0}%
${goto 1155}CPU: ${cpu cpu1}%
${goto 30}${voffset 15}Weather: ${execi 300 /home/mrb78s/weather.sh 44107}
${goto 1165}${voffset 40}RAM: $memperc%
${goto 1125}${voffset 80}FS Usage: ${fs_used_perc}%
${goto 1165}${voffset 83}Power: ${battery_percent}%

conky_widgets.lua:
Code:
--[[
Conky Widgets by londonali1010 (2009)

This script is meant to be a "shell" to hold a suite of widgets for use in Conky.

To configure:
+ Copy the widget's code block (will be framed by --(( WIDGET NAME )) and --(( END WIDGET NAME )), with "[" instead of "(") somewhere between "require 'cairo'" and "function conky_widgets()", ensuring not to paste into another widget's code block
+ To call the widget, add the following just before the last "end" of the entire script:
	cr = cairo_create(cs)
	NAME_OF_FUNCTION(cr, OPTIONS)
	cairo_destroy(cr)
+ Replace OPTIONS with the options for your widget (should be specified in the widget's code block) 

Call this script in Conky using the following before TEXT (assuming you save this script to ~/scripts/conky_widgets.lua):
	lua_load ~/scripts/conky_widgets.lua
	lua_draw_hook_pre widgets
	
Changelog:
+ v1.0 -- Original release (17.10.2009)
]]

require 'cairo'

--[[ AIR CLOCK WIDGET ]]
--[[ Options (xc, yc, size):
	"xc" and "yc" are the x and y coordinates of the centre of the clock, in pixels, relative to the top left of the Conky window
	"size" is the total size of the widget, in pixels ]]

function air_clock(cr, xc, yc, size)
	local offset = 0
	
	shadow_width = size * 0.03
	shadow_xoffset = 0
	shadow_yoffset = size * 0.01
	
	if shadow_xoffset >= shadow_yoffset then
		offset = shadow_xoffset
	else offset = shadow_yoffset
	end
	
	local clock_r = (size - 2 * offset) / (2 * 1.25)
		
	show_seconds=false
	
	-- Grab time
	
	local hours=os.date("%I")
	local mins=os.date("%M")
	local secs=os.date("%S")
	
	secs_arc=(2*math.pi/60)*secs
	mins_arc=(2*math.pi/60)*mins
	hours_arc=(2*math.pi/12)*hours+mins_arc/12
	
	-- Drop shadow
	
	local ds_pat=cairo_pattern_create_radial(xc+shadow_xoffset,yc+shadow_yoffset,clock_r*1.25,xc+shadow_xoffset,yc+shadow_yoffset,clock_r*1.25+shadow_width)
	cairo_pattern_add_color_stop_rgba(ds_pat,0,0,0,0,0.2)
	cairo_pattern_add_color_stop_rgba(ds_pat,1,0,0,0,0)
	
	cairo_move_to(cr,0,0)
	cairo_line_to(cr,conky_window.width,0)
	cairo_line_to(cr,conky_window.width, conky_window.height)
	cairo_line_to(cr,0,conky_window.height)
	cairo_close_path(cr)
	cairo_new_sub_path(cr)
	cairo_arc(cr,xc,yc,clock_r*1.25,0,2*math.pi)
	cairo_set_source(cr,ds_pat)
	cairo_set_fill_rule(cr,CAIRO_FILL_RULE_EVEN_ODD)
	cairo_fill(cr)
	
	-- Glassy border
	
	cairo_arc(cr,xc,yc,clock_r*1.25,0,2*math.pi)
	cairo_set_source_rgba(cr,0.5,0.5,0.5,0.2)
	cairo_set_line_width(cr,1)
	cairo_stroke(cr)
	
	local border_pat=cairo_pattern_create_linear(xc,yc-clock_r*1.25,xc,yc+clock_r*1.25)
	
	cairo_pattern_add_color_stop_rgba(border_pat,0,1,1,1,0.7)
	cairo_pattern_add_color_stop_rgba(border_pat,0.3,1,1,1,0)
	cairo_pattern_add_color_stop_rgba(border_pat,0.5,1,1,1,0)
	cairo_pattern_add_color_stop_rgba(border_pat,0.7,1,1,1,0)
	cairo_pattern_add_color_stop_rgba(border_pat,1,1,1,1,0.7)
	cairo_set_source(cr,border_pat)
	cairo_arc(cr,xc,yc,clock_r*1.125,0,2*math.pi)
	cairo_close_path(cr)
	cairo_set_line_width(cr,clock_r*0.25)
	cairo_stroke(cr)
	
	-- Set clock face
	
	cairo_arc(cr,xc,yc,clock_r,0,2*math.pi)
	cairo_close_path(cr)
	
	local face_pat=cairo_pattern_create_radial(xc,yc-clock_r*0.75,0,xc,yc,clock_r)
	
	cairo_pattern_add_color_stop_rgba(face_pat,0,1,1,1,0.9)
	cairo_pattern_add_color_stop_rgba(face_pat,0.5,1,1,1,0.9)
	cairo_pattern_add_color_stop_rgba(face_pat,1,0.9,0.9,0.9,0.9)
	cairo_set_source(cr,face_pat)
	cairo_fill_preserve(cr)
	cairo_set_source_rgba(cr,0.5,0.5,0.5,0.2)
	cairo_set_line_width(cr, 1)
	cairo_stroke (cr)
	
	-- 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,0,0,0,0.5)
	cairo_stroke(cr)
	
	-- Draw minute hand
	
	xm=xc+0.9*clock_r*math.sin(mins_arc)
	ym=yc-0.9*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_stroke(cr)
	
	-- Draw seconds hand
	
	if show_seconds then
		xs=xc+0.9*clock_r*math.sin(secs_arc)
		ys=yc-0.9*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_stroke(cr)
	end
end

--[[ END AIR CLOCK WIDGET ]]

--[[ RING WIDGET ]]
--[[ Options (name, arg, max, bg_colour, bg_alpha, xc, yc, radius, thickness, start_angle, end_angle):
	"name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_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 ''.
	"max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
	"bg_colour" is the colour of the base ring.
	"bg_alpha" is the alpha value of the base ring.
	"fg_colour" is the colour of the indicator part of the ring.
	"fg_alpha" is the alpha value of the indicator part of the ring.
	"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.
	"radius" is the radius of the ring.
	"thickness" is the thickness of the ring, centred around the radius.
	"start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
	"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. ]]

function ring(cr, name, arg, max, bgc, bga, fgc, fga, xc, yc, r, t, sa, ea)
	local function rgb_to_r_g_b(colour,alpha)
		return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
	end
	
	local function draw_ring(pct)
		local angle_0=sa*(2*math.pi/360)-math.pi/2
		local angle_f=ea*(2*math.pi/360)-math.pi/2
		local pct_arc=pct*(angle_f-angle_0)

		-- Draw background ring

		cairo_arc(cr,xc,yc,r,angle_0,angle_f)
		cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
		cairo_set_line_width(cr,t)
		cairo_stroke(cr)
	
		-- Draw indicator ring

		cairo_arc(cr,xc,yc,r,angle_0,angle_0+pct_arc)
		cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
		cairo_stroke(cr)
	end
	
	local function setup_ring()
		local str = ''
		local value = 0
		
		str = string.format('${%s %s}', name, arg)
		str = conky_parse(str)
		
		value = tonumber(str)
		if value == nil then value = 0 end
		pct = value/max
		
		draw_ring(pct)
	end	
	
	local updates=conky_parse('${updates}')
	update_num=tonumber(updates)
	
	if update_num>5 then setup_ring() end
end

--[[ END RING WIDGET ]]

function conky_widgets()
	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)
	
	cr = cairo_create(cs)
	air_clock(cr, 120, 120, 200) -- options: xc, yc, size
	cairo_destroy(cr)
	
	cr = cairo_create(cs)
	ring(cr, 'cpu', 'CPU0', 100, 0xFFFFFF, 0.2, 0xFFFFFF, 0.8, 1200, 200, 50, 10, 0, 180) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
	cairo_destroy(cr)

cr = cairo_create(cs)
	ring(cr, 'cpu', 'CPU1', 100, 0xFFFFFF, 0.2, 0xFFFFFF, 0.8, 1200, 200, 62, 10, 0, 180) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
	cairo_destroy(cr)
	
	cr = cairo_create(cs)
	ring(cr, 'memperc', '', 100, 0xFFFFFF, 0.2, 0xFFFFFF, 0.8, 1200, 300, 50, 10, 180, 360) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
	cairo_destroy(cr)	
	
	cr = cairo_create(cs)
	ring(cr, 'fs_used_perc', '/', 100, 0xFFFFFF, 0.2, 0xFFFFFF, 0.8, 1200, 400, 50, 10, 0, 180) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
	cairo_destroy(cr)
	
	cr = cairo_create(cs)
	ring(cr, 'battery_percent', 'BAT0', 100, 0xFFFFFF, 0.2, 0xFFFFFF, 0.8, 1200, 500, 50, 10, 180, 360) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
	cairo_destroy(cr)
end
 
Back