Results 11 to 18 of 18
I've switched to straight Debian now. I figured if I was using direct derivatives, I may as well roll my own. The down side is that my kernel is *quite* ...
- 11-25-2011 #11
I've switched to straight Debian now. I figured if I was using direct derivatives, I may as well roll my own. The down side is that my kernel is *quite* old at the moment but working OK.
Thanks to Hazel for the bash scrip to get the kernel name. This is a slightly modified version which you place in a directory of choice.
You will also need the Linux source for your kernel downloaded, extracted and symlinked as /usr/src/linux.Code:#! /bin/bash # [ -h /usr/src/linux ] && namesource=`readlink /usr/src/linux` name=`grep NAME /usr/src/$namesource/Makefile | cut -c 8-` echo $name exit
This is the .conkyrc file. I have made a comment where you need to set the path to your kernel name script
And this is what it looks likeCode:############################################## # Settings ############################################## background yes use_xft yes xftfont sans:size=9 xftalpha 1 update_interval 1.0 total_run_times 0 own_window yes own_window_transparent yes own_window_type normal own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager double_buffer yes minimum_size 200 200 maximum_width 240 draw_shades no draw_outline no draw_borders no draw_graph_borders yes default_color d8d8d8 default_shade_color 000000 default_outline_color d9d7d6 alignment top_right gap_x 12 gap_y 20 no_buffers yes uppercase no cpu_avg_samples 2 override_utf8_locale no ############################################## # Output ############################################## TEXT S Y S T E M I N F O ${hr} Host:$alignr$nodename Kernel:$alignr${exec YOUR KERNEL NAME SCRIPT HERE} Uptime:$alignr$uptime RAM:$alignr$mem/$memmax Swap usage:$alignr$swap/$swapmax /$alignr${fs_used /}/${fs_size /} /home/$alignr${fs_used /home/}/${fs_size /home/} /tmp/$alignr${fs_used /tmp/}/${fs_size /tmp/} C P U ${hr} Core 1:$alignr${cpu cpu1}% Frequency:$alignr${freq cpu1}MHz ${cpubar cpu1 10} Core 2:$alignr${cpu cpu2}% Frequency:$alignr${freq cpu2}MHz ${cpubar cpu2 10} Core 3:$alignr${cpu cpu3}% Frequency:$alignr${freq cpu3}MHz ${cpubar cpu3 10} Core 4:$alignr${cpu cpu4}% Frequency:$alignr${freq cpu4}MHz ${cpubar cpu4 10} Temp:$alignr${hwmon 0 temp 1}${iconv_start UTF-8 ISO_8859-1}°${iconv_stop} Load:${alignr}${loadavg} N V I D I A ${hr} GPU Tempurature:$alignr${nvidia temp}${iconv_start UTF-8 ISO_8859-1}°${iconv_stop} GPU Frequency:$alignr${nvidia gpufreq}MHz RAM Tempurature:$alignr${nvidia memfreq}MHz P R O C E S S ${hr} Name${goto 150}CPU%${goto 200}MEM% ${top name 1}${goto 150}${top cpu 1}${goto 200}${top mem 1} ${top name 2}${goto 150}${top cpu 2}${goto 200}${top mem 2} ${top name 3}${goto 150}${top cpu 3}${goto 200}${top mem 3} ${top name 4}${goto 150}${top cpu 4}${goto 200}${top mem 4} ${top name 5}${goto 150}${top cpu 5}${goto 200}${top mem 5} E T H E R N E T ${hr} Down:${alignr}${downspeed eth0} Up:${alignr}${upspeed eth0} ${downspeedgraph eth0 25,120 000000 ff0000} ${alignr}${upspeedgraph eth0 25,120 000000 00ff00}$color Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0} ${iconv_start UTF-8 ISO_8859-1} B B C H E A D L I N E S ${hr} ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 1} ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 2} ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 3} ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 4} ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 5}${iconv_stop}

I would love to get the headlines clickable but I don't think conky handles click events and I haven't yet managed to get the CPU frequency bars to change colour based on the %age if that's possible. Any of our conky wizards know if that is achievable?If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 12-03-2011 #12I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 12-04-2011 #13Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 12-04-2011 #14If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 12-04-2011 #15
OK, got something working to colour the CPU bars. It's fairly basic as it changes the colour of the whole bar rather than a gradient colour change.
The colourise lua script which should be placed in a directory of your choice.
and the revised .conkyrc with the changes highlightedCode:-- -- Conky Lua script to colorise the cpu bar of well um conky! -- -- First attempt at Lua -- found on the Internet function colour_to_components(colour) -- Take the RGB components r, g, b, and return an RGB integer return (colour / 0x10000) % 0x100, (colour / 0x100) % 0x100, colour % 0x100 end function components_to_colour(r, g, b) -- Take the RGB components r, g, b, and return an RGB integer return ((math.floor(r + 0.5) * 0x10000) + (math.floor(g + 0.5) * 0x100) + math.floor(b + 0.5)) % 0xffffff -- no bit shifting operator in Lua afaik end -- /found on the Internet function conky_colourise_cpu_bar(cpuID, defaultColour) local red, green, blue = colour_to_components(defaultColour) local colour = 0 local cpuPercent = tonumber(conky_parse(string.format('${cpu cpu%i}', tonumber(cpuID)))) if cpuPercent ~= nil and (cpuPercent - 10) > 0 then if cpuPercent > 90 then value = 90 end local percentage = (cpuPercent - 10) / (90 - 10) if percentage > 1 then percentage = 1 end red = red + percentage * (0xff - red) green = green - percentage * green blue = blue - percentage * blue end colour = components_to_colour(red, green, blue) return string.format("${color #%06x}", colour) end
I haven't figured out how to not hard code the default colour into the lua script (in my case 111166) so just change that as needed.Code:############################################## # Settings ############################################## background yes use_xft yes xftfont sans:size=9 xftalpha 1 update_interval 1.0 total_run_times 0 own_window yes own_window_transparent yes own_window_type normal own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager double_buffer yes minimum_size 200 200 maximum_width 240 draw_shades no draw_outline no draw_borders no draw_graph_borders yes default_color 111166 color0 111166 default_shade_color 000000 default_outline_color d9d7d6 alignment top_right gap_x 12 gap_y 20 no_buffers yes uppercase no cpu_avg_samples 2 override_utf8_locale no lua_load PATH TO YOUR COLOURISE SCRIPT ############################################## # Output ############################################## TEXT S Y S T E M I N F O ${hr} Host:$alignr$nodename Kernel:$alignr${exec YOUR KERNEL NAME SCRIPT HERE} Uptime:$alignr$uptime RAM:$alignr$mem/$memmax Swap usage:$alignr$swap/$swapmax /$alignr${fs_used /}/${fs_size /} /home/$alignr${fs_used /home/}/${fs_size /home/} /tmp/$alignr${fs_used /tmp/}/${fs_size /tmp/} C P U ${hr} Core 1:$alignr${cpu cpu1}% Frequency:$alignr${freq cpu1}MHz ${lua_parse conky_colourise_cpu_bar 1 0x111166}${cpubar cpu1 10}${color} Core 2:$alignr${cpu cpu2}% Frequency:$alignr${freq cpu2}MHz ${lua_parse conky_colourise_cpu_bar 2 0x111166}${cpubar cpu2 10}${color} Core 3:$alignr${cpu cpu3}% Frequency:$alignr${freq cpu3}MHz ${lua_parse conky_colourise_cpu_bar 3 0x111166}${cpubar cpu3 10}${color} Core 4:$alignr${cpu cpu4}% Frequency:$alignr${freq cpu4}MHz ${lua_parse conky_colourise_cpu_bar 4 0x111166}${cpubar cpu4 10}${color} Temp:$alignr${hwmon 0 temp 1}${iconv_start UTF-8 ISO_8859-1}°${iconv_stop} Load:${alignr}${loadavg} N V I D I A ${hr} GPU Temperature:$alignr${nvidia temp}${iconv_start UTF-8 ISO_8859-1}°${iconv_stop} GPU Frequency:$alignr${nvidia gpufreq}MHz RAM Frequency:$alignr${nvidia memfreq}MHz P R O C E S S ${hr} Name${goto 150}CPU%${goto 200}MEM% ${top name 1}${goto 150}${top cpu 1}${goto 200}${top mem 1} ${top name 2}${goto 150}${top cpu 2}${goto 200}${top mem 2} ${top name 3}${goto 150}${top cpu 3}${goto 200}${top mem 3} ${top name 4}${goto 150}${top cpu 4}${goto 200}${top mem 4} ${top name 5}${goto 150}${top cpu 5}${goto 200}${top mem 5} E T H E R N E T ${hr} Down:${alignr}${downspeed eth0} Up:${alignr}${upspeed eth0} ${downspeedgraph eth0 25,120 000000 ff0000} ${alignr}${upspeedgraph eth0 25,120 000000 00ff00}$color Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0} ${iconv_start UTF-8 ISO_8859-1} B B C H E A D L I N E S ${hr} ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 1} ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 2} ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 3} ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 4} ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 5}${iconv_stop}
Screenshot.jpgLast edited by elija; 12-04-2011 at 11:11 AM. Reason: Added screenshot
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 12-04-2011 #16
Nice.
Does the color change according to CPU usage or frequency?Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 12-04-2011 #17If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 12-06-2011 #18
Some borrowed from elija and Hazel. Current weather borrowed from Arch. Nothing real fancy or colors or a long text file but suits me to a T. Just the facts maa'm.
What it looks likeCode:# set to yes if you want Conky to be forked in the background background yes cpu_avg_samples 2 net_avg_samples 2 out_to_console no # X font when Xft is disabled, you can pick one with program xfontsel #font 7x12 #font 6x10 #font 7x13 font 8x12 #font 7x12 #font *mintsmild.se* #font -*-*-*-*-*-*-34-*-*-*-*-*-*-* #font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1 # Use Xft? use_xft yes # Xft font when Xft is enabled xftfont gentium:size=10 own_window_transparent yes own_window_colour black own_window_type desktop # Create own window instead of using desktop (required in nautilus, pcmanfm and rox desktops) own_window yes # Text alpha when using Xft xftalpha 0.8 #on_bottom no # mail spool mail_spool $MAIL # Update interval in seconds update_interval 1 # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # Minimum size of text area minimum_size 10 10 maximum_width 300 max_user_text 90000 # Draw shades? draw_shades no # Draw outlines? draw_outline no # Draw borders around text draw_borders no # Stippled borders? stippled_borders 0 # border margins #border_margin 10 # border width border_width 2 # Default colors and also border colors default_color white default_shade_color white default_outline_color white # 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 30 gap_y 30 # Add spaces to keep things from moving about? This only affects certain objects. use_spacer right # Subtract file system buffers from used memory? no_buffers yes # set to yes if you want all text to be in uppercase uppercase no # boinc (seti) dir # seti_dir /opt/seti # Possible variables to be used: # # Variable Arguments Description # acpiacadapter ACPI ac adapter state. # acpifan ACPI fan state # acpitemp ACPI temperature. # adt746xcpu CPU temperature from therm_adt746x # adt746xfan Fan speed from therm_adt746x # battery (num) Remaining capasity in ACPI or APM # battery. ACPI battery number can be # given as argument (default is BAT0). # buffers Amount of memory buffered # cached Amount of memory cached # color (color) Change drawing color to color # cpu CPU usage in percents # cpubar (height) Bar that shows CPU usage, height is # bar's height in pixels # downspeed net Download speed in kilobytes # downspeedf net Download speed in kilobytes with one # decimal # exec shell command Executes a shell command and displays # the output in torsmo. warning: this # takes a lot more resources than other # variables. I'd recommend coding wanted # behaviour in C and posting a patch :-). # execi interval, shell Same as exec but with specific interval. # command Interval can't be less than # update_interval in configuration. # fs_bar (height), (fs) Bar that shows how much space is used on # a file system. height is the height in # pixels. fs is any file on that file # system. # fs_free (fs) Free space on a file system available # for users. # fs_free_perc (fs) Free percentage of space on a file # system available for users. # fs_size (fs) File system size # fs_used (fs) File system used space # hr (height) Horizontal line, height is the height in # pixels # i2c (dev), type, n I2C sensor from sysfs (Linux 2.6). dev # may be omitted if you have only one I2C # device. type is either in (or vol) # meaning voltage, fan meaning fan or temp # meaning temperature. n is number of the # sensor. See /sys/bus/i2c/devices/ on # your local computer. # kernel Kernel version # loadavg (1), (2), (3) System load average, 1 is for past 1 # minute, 2 for past 5 minutes and 3 for # past 15 minutes. # machine Machine, i686 for example # mails Mail count in mail spool. You can use # program like fetchmail to get mails from # some server using your favourite # protocol. See also new_mails. # mem Amount of memory in use # membar (height) Bar that shows amount of memory in use # memmax Total amount of memory # memperc Percentage of memory in use # new_mails Unread mail count in mail spool. # nodename Hostname # outlinecolor (color) Change outline color # pre_exec shell command Executes a shell command one time before # torsmo displays anything and puts output # as text. # processes Total processes (sleeping and running) # running_processes Running processes (not sleeping), # requires Linux 2.6 # shadecolor (color) Change shading color # stippled_hr (space), Stippled (dashed) horizontal line # (height) # swapbar (height) Bar that shows amount of swap in use # swap Amount of swap in use # swapmax Total amount of swap # swapperc Percentage of swap in use # sysname System name, Linux for example # time (format) Local time, see man strftime to get more # information about format # totaldown net Total download, overflows at 4 GB on # Linux with 32-bit arch and there doesn't # seem to be a way to know how many times # it has already done that before torsmo # has started. # totalup net Total upload, this one too, may overflow # updates Number of updates (for debugging) # upspeed net Upload speed in kilobytes # upspeedf net Upload speed in kilobytes with one # decimal # uptime Uptime # uptime_short Uptime in a shorter format # # seti_prog Seti@home current progress # seti_progbar (height) Seti@home current progress bar # seti_credit Seti@hoome total user credit ## antiX additives examples. Add below Text## ##${color cccccc}battery: ${color cccccc}$acpiacadapter, ${battery_percent BAT1}% ##${color}battery:${color} ${battery} ##Witeless example## #${color cccccc}Wireless: #${color cccccc}essid: ${wireless_essid wlan0} #${color cccccc}IP:${color cccccc} ${addr wlan0} #${color cccccc}speed: ${color cccccc} ${wireless_bitrate wlan0} #${color cccccc}link strength: ${color cccccc} ${wireless_link_bar 7,50 wlan0} # stuff after 'TEXT' will be formatted on screen TEXT ${image /home/harry/Icons/antix-logo.png 105x85} ${color}AntiX-M11-base-686 Fluxbox ${color}$sysname $kernel ${color}Kernel:${exec /home/harry/Documents/kernelname} ${color}Uptime: $uptime ${color}${time %a %d %b %k:%M} ${color}Monitors: ${color}Cpu: ${color}${cpu}% ${color}Fan: ${color}${hwmon fan 1} ${color}Temp: ${color} ${hwmon temp 1}C ${color}Ram : ${color}$mem${color}/${color}$memmax ${color}- ${color}$memperc% ${color}Swap: ${color}$swap${color}/${color}$swapmax ${color}- ${color}$swapperc% ${color}Processes: ${color}$processes ${color}running: ${color}$running_processes ${color}Link Strength: ${color} ${wireless_link_bar 7,50 wlan0} ${color}Root:${color} ${fs_free /} ${color}= ${fs_free_perc /}% ${execi 300 /home/harry/.weather.sh 79772}
http://i43.tinypic.com/noby9g.jpgLinux Registered User # 475019
Lead,Follow, or get the heck out of the way
AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
Open CourseWare for Linux Geeks


1Likes
Reply With Quote

