tag:blogger.com,1999:blog-88232944931875980172024-03-13T04:46:29.855-07:00Ubuntu Tips And TricksUbuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks.AkuBuntuhttp://www.blogger.com/profile/13483680561608995044noreply@blogger.comBlogger280125tag:blogger.com,1999:blog-8823294493187598017.post-47286037551501557392014-08-18T08:37:00.000-07:002014-08-18T08:41:47.705-07:00Latest conky lua, rings and weather<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-Xf6jyuS0cDo/U_IR-1fkUWI/AAAAAAAACGA/BlFRHm2v664/s1600/desktop%2B1_007.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-Xf6jyuS0cDo/U_IR-1fkUWI/AAAAAAAACGA/BlFRHm2v664/s1600/desktop%2B1_007.png" height="356" width="640" /></a></div>
The .conkyrc<br />
<pre class="code" style="border-color: rgb(216, 216, 216); border-style: dashed; border-width: 1px; margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;">background yes
use_xft yes
xftfont Sans:bold:size=8
xftalpha 1
update_interval 0.2
total_run_times 0
own_window yes
own_window_transparent yes
own_window_class override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 350 900
#maximum_length 720
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment top_right
gap_x 10
gap_y 0
no_buffers no
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
uppercase no
lua_load /path to/bargraphl.lua
lua_draw_hook_post main_bars
lua_load /path to/rings.lua
lua_draw_hook_pre main_rings
TEXT
${image ~/.conky/base.png -p 1,1 -s 380x90}${image ~/.conky/base.png -p 1,75 -s 380x86}${image ~/.conky/base.png -p 1,140 -s 380x132}${image ~/.conky/base.png -p 1,251 -s 380x90}${image ~/.conky/base.png -p 1,325 -s 380x82}${image ~/.conky/base.png -p 1,392 -s 380x82}${image ~/.conky/base.png -p 1,455 -s 380x122}${image ~/.conky/base.png -p 1,544 -s 380x205}${if_existing /etc/SuSE-release}${image ~/.conky/Icons/OS/opensuse.png -p 18,25 -s 45x45}${else}${if_existing /etc/fedora-release}${image ~/.conky/Icons/OS/fedora.png -p 18,25 -s 45x45}${else}${if_existing /etc/gentoo-release}${image ~/.conky/Icons/OS/gentoo.png -p 18,25 -s 45x45}${else}${if_existing /etc/issue Ubuntu}${image ~/.conky/Icons/OS/ubuntu.png -p 18,25 -s 45x45}${else}${if_existing /etc/slackware-version}${image ~/.conky/Icons/OS/slackware.png -p 18,25 -s 45x45}${else}${if_existing /etc/issue Mint}${image ~/.conky/Icons/OS/mint.png -p 18,25 -s 45x45}${else}${if_existing /etc/issue Arch}${image ~/.conky/Icons/OS/archlinux.png -p 18,25 -s 45x45}${else}${image ~/.conky/Icons/OS/setting.png -p 18,25 -s 45x45}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${if_existing /proc/net/route wlan0}${image ~/.conky/Icons/Network/wlan.png -p 18,481 -s 45x45}${else}${if_existing /proc/net/route ppp0}${image ~/.conky/Icons/Network/ppp.png -p 18,481 -s 45x45}${else}${if_existing /proc/net/route eth0}${image ~/.conky/Icons/Network/lan.png -p 18,481 -s 45x45}${else}${image ~/.conky/Icons/Network/disconnected.png -p 18,481 -s 45x45}${endif}${endif}${endif}${image ~/.conky/Icons/Memory.png -p 18,170 -s 45x45}${image ~/.conky/Icons/Clock.png -p 18,100 -s 45x45}${image ~/.conky/Icons/temp.png -p 18,275 -s 45x45}${image ~/.conky/Icons/Task_Manager.png -p 18,350 -s 45x45}
#${image ~/.conky/Icons/Weather.png -p 18,626 -s 45x45}
${goto 18}${font sans-serif:bold:size=8}${color yellow}SYSTEM ${hr 2}$color
${goto 70}${exec lsb_release -d -s}
${goto 70}${color white}${font sans-serif:bold:size=8}${sysname} ${kernel}:$alignr$nodename
${goto 70}${color white}${font sans-serif:bold:size=8}4x Intel(R) Core(TM) i5-2410M $alignr${freq_g cpu0}Ghz
${goto 70}${color white}${font sans-serif:bold:size=8}Uptime:$alignr$uptime
#
${voffset 10}${goto 18}${font sans-serif:bold:size=8}${color yellow}TIME & DATE ${hr 2}
${goto 95}${font LCDMono:bold:size=28}${time %I:%M:%S}${goto 255}${time %p}${font}
${goto 125}${font sans-serif:bold:size=8}${Time %A %d/%B/%Y}$color
#
${voffset 8}${goto 18}${font sans-serif:bold:size=8}${color yellow}PROCESSORS ${hr 2}$color
${goto 115}${font sans-serif:bold:size=11}${color red}1${goto 178}2${goto 247}3${goto 315}4${color}${font}
${goto 114}${cpu cpu1}%${goto 177}${cpu cpu2}%${goto 245}${cpu cpu3}%${goto 310}${cpu cpu4}%
${voffset 16}${goto 22}${font sans-serif:bold:size=8} RAM${goto 63}: $memperc% ${goto 190}$mem / $alignr$memmax
${goto 22}${font sans-serif:bold:size=8} DISK${goto 63}: ${fs_used_perc /}%${goto 190}${fs_used /} / $alignr${fs_size /}
${goto 22}${font sans-serif:bold:size=8} SWAP${goto 63}: ${swapperc}%${goto 190}${swap} ${goto 240}/ $alignr${swapmax}
#
${voffset 5}${goto 18}${font sans-serif:bold:size=8}${color yellow}TEMPERATURE ${voffset 2}${hr 2}$color
${goto 65}${font sans-serif:bold:size=8} PCI${goto 109}: ${hwmon 1 temp 1}°C
${goto 65}${font sans-serif:bold:size=8} CORE0${goto 109}: ${hwmon 1 temp 2}°C
${goto 65}${font sans-serif:bold:size=8} CORE1${goto 109}: ${hwmon 1 temp 3}°C
${goto 65}${font sans-serif:bold:size=8} DISK${goto 109}: ${execpi 10 hddtemp -n /dev/sda }°C
#
${voffset 10}${goto 18}${font sans-serif:bold:size=8}${color yellow}TOP PROCESSES${goto 174}PID${goto 227}CPU%${goto 280}MEM%$color
${goto 70}${font sans-serif:bold:size=8}${top name 1} ${goto 174} ${top pid 1}${goto 227}${top cpu 1}${goto 280}${top mem 1}
${goto 70}${font sans-serif:bold:size=8}${top name 2} ${goto 174} ${top pid 2}${goto 227}${top cpu 2}${goto 280}${top mem 2}
${goto 70}${font sans-serif:bold:size=8}${top name 3} ${goto 174} ${top pid 3}${goto 227}${top cpu 3}${goto 280}${top mem 3}
#${goto 70}${font sans-serif:bold:size=8}${top name 4} ${goto 174} ${top pid 4}${goto 227}${top cpu 4}${goto 280}${top mem 4}
#${goto 70}${font sans-serif:bold:size=8}${top name 3} ${goto 174} ${top pid 5}${goto 227}${top cpu 5}${goto 280}${top mem 5}
#
${voffset 13}${goto 18}${font sans-serif:bold:size=8}${color yellow}TOP MEMORY${goto 174}PID${goto 227}CPU%${goto 280}MEM%$color
${goto 70}${top_mem name 1}${goto 174}${top_mem pid 1}${goto 227}${top_mem cpu 1}${goto 280}${top_mem mem 1}
${goto 70}${top_mem name 2}${goto 174}${top_mem pid 2}${goto 227}${top_mem cpu 2}${goto 280}${top_mem mem 2}
${goto 70}${top_mem name 3}${goto 174}${top_mem pid 3}${goto 227}${top_mem cpu 3}${goto 280}${top_mem mem 3}
#${goto 70}${top_mem name 4}${goto 174}${top_mem pid 4}${goto 227}${top_mem cpu 4}${goto 280}${top_mem mem 4}
#${goto 70}${top_mem name 5}${goto 174}${top_mem pid 5}${goto 227}${top_mem cpu 5}${goto 280}${top_mem mem 5}
#
#
${voffset 13}${goto 18}${font sans-serif:bold:size=8}${color yellow}NETWORK ${hr 2}$color${if_existing /proc/net/route wwan0}
$alignc ....Berukband....
${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}a${font}${color} Public IP: $alignr ${addr wwan0}
${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}a${font}${color} Private IP:${alignr}${execi 1800 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}
${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}T${font}${color} Downloads:${goto 237}${downspeed wwan0}/s
${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}N${font}${color} Uploads:${goto 237}${upspeed wwan0}/s
Total: Downloads:${goto 128}${color green}${totaldown wwan0}${color}${goto 185} Uploads:${color red}${goto 243}${totalup wwan0}${color}
#${wireless_link_qual wwan0}%
#
${else}${if_existing /proc/net/route ppp0}
${goto 130} ${color yellow} ....Berukband....$color
${goto 70}Public IP:$alignr ${addr ppp0}
${goto 70}Private IP:${alignr}${execi 1800 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}
${goto 70}Downloads:${goto 237}${downspeed ppp0}/s
${goto 70}Uploads:${goto 237}${upspeed ppp0}/s
${goto 70}Total: Downloads::${goto 188}${color green}${totaldown ppp0}${color}${goto 230} Uploads${color red}${goto 287}${totalup ppp0}${color}
#
${else}${if_existing /proc/net/route wlan0}
${voffset -91}${goto 180}${color yellow} ....Wireless....$color
#${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}a${font}${color}WAN IP:$alignr${execi 3600 wget -O- http://whatismyip.org/ | tail}
${goto 70}${font}${color}IP address: $alignr ${addr wlan0}
${goto 70}${font}${color}ESSID: $alignr ${wireless_essid wlan0}
${goto 70}${font}${color} Downloads:${goto 237}${downspeed wlan0}/s
${goto 70}${font}${color} Uploads:${goto 237}${upspeed wlan0}/s
${goto 70}Total: Downloads:${goto 178}${color green}${totaldown wlan0}${color}${goto 230} Uploads:${color red}${goto 287}${totalup wlan0}${color}
#${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}a${font}${color}Connection quality: $alignr ${wireless_link_qual_perc wlan0}%
#
${else}${if_existing /proc/net/route eth0}
${voffset -91}$alignc ....Cable....
${goto 70}${font}${color}IP address: $alignr ${addr eth0}
${goto 70}${font}${color}ESSID: $alignr ${wireless_essid eth0}
${goto 70}${font}${color} Downloads:${goto 237}${downspeed eth0}/s
${goto 70}${font}${color} Uploads:${goto 237}${upspeed eth0}/s
${goto 70}Total: Downloads:${goto 178}${color green}${totaldown eth0}${color}${goto 230} Uploads:${color red}${goto 287}${totalup eth0}${color}
#${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}a${font}${color}Connection quality: $alignr ${wireless_link_qual_perc eth0}%
#
${else}${if_existing /proc/net/route eth1}
${voffset -91}$alignc ....Cable....
${goto 70}${font}${color}IP address: $alignr ${addr eth1}
${goto 70}${font}${color}ESSID: $alignr ${wireless_essid eth1}
${goto 70}${font}${color} Downloads:${goto 237}${downspeed eth1}/s
${goto 70}${font}${color} Uploads:${goto 237}${upspeed eth1}/s
${goto 70}Total: Downloads:${goto 178}${color green}${totaldown eth1}${color}${goto 230} Uploads:${color red}${goto 287}${totalup eth1}${color}
#${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}a${font}${color}Connection quality: $alignr ${wireless_link_qual_perc eth1}%
#
${else}${goto 120}${font sans-serif:bold:size=8}${color yellow}
$alignc ..Takdok Internet Wei.. ${endif}
${endif}${endif}${endif}${endif}
#
${voffset -7}${goto 18}${font sans-serif:bold:size=8}${color yellow}WEATHER SUNGAI KOYAN ${hr 2}$color${font}${texeci 500 bash $HOME/1b1_accuweather_images/1b1}
${image $HOME/1b1_accuweather_images/cc.png -p 0,595 -s 130x70}
${voffset -10}${goto 22}${font sans-serif:bold:size=7}${color yellow}${execpi 600 sed -n '1p' $HOME/1b1_accuweather_images/messages}${font}${goto 200}${font sans-serif:bold:size=5}${color yellow}TEMPERATURE: $color${alignr}${execpi 600 sed -n '29p' $HOME/1b1_accuweather_images/curr_cond}°C (${execpi 600 sed -n '30p' $HOME/1b1_accuweather_images/curr_cond}°C)
${goto 200}${color yellow}WIND: $color${alignr}${execpi 600 sed -n '31p' $HOME/1b1_accuweather_images/curr_cond} ${execpi 600 sed -n '32p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color yellow}HUMIDITY: $color${alignr}${execpi 600 sed -n '33p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color yellow}DEW POINT: $color${alignr}${execpi 600 sed -n '37p' $HOME/1b1_accuweather_images/curr_cond}°C
${goto 200}${color yellow}PREASURE: $color${alignr}${execpi 600 sed -n '34p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color yellow}VISIBILITY: $color${alignr}${execpi 600 sed -n '38p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color yellow}CLOUD COVER: $color${alignr}${execpi 600 sed -n '35p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color yellow}UV INDEX: $color${alignr}${execpi 600 sed -n '36p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color yellow}SUN/MOON RISE: $color${alignr}${execpi 600 sed -n '39p' $HOME/1b1_accuweather_images/curr_cond}/${execpi 600 sed -n '41p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color yellow}SUN/MOON SET: $color${alignr}${execpi 600 sed -n '40p' $HOME/1b1_accuweather_images/curr_cond}/${execpi 600 sed -n '42p' $HOME/1b1_accuweather_images/curr_cond}
${voffset -90}${goto 135}${font sans-serif:bold:size=5}${color yellow}TODAY${voffset 50}${goto 135}TONIGHT$font${color}${image $HOME/1b1_accuweather_images/tod.png -p 117,593 -s 60x36}${image $HOME/1b1_accuweather_images/ton.png -p 117,640 -s 60x36}
${voffset -60}${goto 175}${font sans-serif:bold:size=5}${execpi 600 sed -n '26p' $HOME/1b1_accuweather_images/first_days}°C${voffset 50}${goto 175}${execpi 600 sed -n '31p' $HOME/1b1_accuweather_images/first_days}°C
${voffset -50}${color gold3}${goto 173}(${execpi 600 sed -n '27p' $HOME/1b1_accuweather_images/first_days}°C)${voffset 50}${goto 173}(${execpi 600 sed -n '32p' $HOME/1b1_accuweather_images/first_days}°C)$color
${voffset 15}${goto 20}${color yellow}${hr 0.25}$color${color yellow}${hr 1}$color
${font sans-serif:bold:size=5}${goto 20}${execpi 600 sed -n '5p' $HOME/1b1_accuweather_images/first_days}${goto 80}${execpi 600 sed -n '10p' $HOME/1b1_accuweather_images/first_days}${goto 140}${execpi 600 sed -n '15p' $HOME/1b1_accuweather_images/first_days}${goto 200}${execpi 600 sed -n '20p' $HOME/1b1_accuweather_images/first_days}${goto 260}${execpi 600 sed -n '1p' $HOME/1b1_accuweather_images/last_days}${goto 320}${execpi 600 sed -n '6p' $HOME/1b1_accuweather_images/last_days}$color${font}${image $HOME/1b1_accuweather_images/6.png -p 10,690 -s 60x36}${image $HOME/1b1_accuweather_images/11.png -p 70,690 -s 60x36}${image $HOME/1b1_accuweather_images/16.png -p 130,690 -s 60x36}${image $HOME/1b1_accuweather_images/21.png -p 190,690 -s 60x36}${image $HOME/1b1_accuweather_images/last_2.png -p 250,690 -s 60x36}${image $HOME/1b1_accuweather_images/last_7.png -p 310,690 -s 60x36}
${voffset 20}${font sans-serif:bold:size=5}${goto 20}${execpi 600 sed -n '8p' $HOME/1b1_accuweather_images/first_days}°C${goto 80}${execpi 600 sed -n '13p' $HOME/1b1_accuweather_images/first_days}°C${goto 140}${execpi 600 sed -n '18p' $HOME/1b1_accuweather_images/first_days}°C${goto 200}${execpi 600 sed -n '23p' $HOME/1b1_accuweather_images/first_days}°C${goto 260}${execpi 600 sed -n '4p' $HOME/1b1_accuweather_images/last_days}°C${goto 320}${execpi 600 sed -n '9p' $HOME/1b1_accuweather_images/last_days}°C${goto 320}${execpi 600 sed -n '14p' $HOME/1b1_accuweather_images/last_days}°C
${voffset -9}${goto 43}${color gold3}(${execpi 600 sed -n '9p' $HOME/1b1_accuweather_images/first_days}°C)${font sans-serif:bold:size=5}${goto 103}(${execpi 600 sed -n '14p' $HOME/1b1_accuweather_images/first_days}°C)${goto 163}(${execpi 600 sed -n '19p' $HOME/1b1_accuweather_images/first_days}°C)${goto 223}(${execpi 600 sed -n '24p' $HOME/1b1_accuweather_images/first_days}°C)${goto 283}(${execpi 600 sed -n '5p' $HOME/1b1_accuweather_images/last_days}°C)${goto 343}(${execpi 600 sed -n '10p' $HOME/1b1_accuweather_images/last_days}°C)
</pre>
<div class="separator" style="clear: both; text-align: center;">
</div>
the bargraph lua...<br />
<pre class="code" style="border-color: rgb(216, 216, 216); border-style: dashed; border-width: 1px; margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">--[[
BARGRAPH WIDGET
v2.1 by wlourf (07 Jan. 2011)
this widget draws a bargraph with different effects
http://u-scripts.blogspot.com/2010/07/bargraph-widget.html
To call the script in a conky, use, before TEXT
lua_load /home/akubuntu/conkyJed/bargraph.lua
lua_draw_hook_pre main_rings
and add one line (blank or not) after TEXT
Parameters are :
3 parameters are mandatory
name - the name of the conky variable to display, for example for {$cpu cpu0}, just write name="cpu"
arg - the argument of the above variable, for example for {$cpu cpu0}, just write arg="cpu0"
arg can be a numerical value if name=""
max - the maximum value the above variable can reach, for example, for {$cpu cpu0}, just write max=100
Optional parameters:
x,y - coordinates of the starting point of the bar, default = middle of the conky window
cap - end of cap line, ossibles values are r,b,s (for round, butt, square), default="b"
http://www.cairographics.org/samples/set_line_cap/
angle - angle of rotation of the bar in degress, default = 0 (i.e. a vertical bar)
set to 90 for an horizontal bar
skew_x - skew bar around x axis, default = 0
skew_y - skew bar around y axis, default = 0
blocks - number of blocks to display for a bar (values >0) , default= 10
height - height of a block, default=10 pixels
width - width of a block, default=20 pixels
space - space between 2 blocks, default=2 pixels
angle_bar - this angle is used to draw a bar on a circular way (ok, this is no more a bar !) default=0
radius - for cicular bars, internal radius, default=0
with radius, parameter width has no more effect.
Colours below are defined into braces {colour in hexadecimal, alpha}
fg_colour - colour of a block ON, default= {0x00FF00,1}
bg_colour - colour of a block OFF, default = {0x00FF00,0.5}
alarm - threshold, values after this threshold will use alarm_colour colour , default=max
alarm_colour - colour of a block greater than alarm, default=fg_colour
smooth - (true or false), create a gradient from fg_colour to bg_colour, default=false
mid_colour - colours to add to gradient, with this syntax {position into the gradient (0 to1), colour hexa, alpha}
for example, this table {{0.25,0xff0000,1},{0.5,0x00ff00,1},{0.75,0x0000ff,1}} will add
3 colours to gradient created by fg_colour and alarm_colour, default=no mid_colour
led_effect - add LED effects to each block, default=no led_effect
if smooth=true, led_effect is not used
possibles values : "r","a","e" for radial, parallel, perdendicular to the bar (just try!)
led_effect has to be used with theses colours :
fg_led - middle colour of a block ON, default = fg_colour
bg_led - middle colour of a block OFF, default = bg_colour
alarm_led - middle colour of a block > ALARM, default = alarm_colour
reflection parameters, not available for circular bars
reflection_alpha - add a reflection effect (values from 0 to 1) default = 0 = no reflection
other values = starting opacity
reflection_scale - scale of the reflection (default = 1 = height of text)
reflection_length - length of reflection, define where the opacity will be set to zero
values from 0 to 1, default =1
reflection - position of reflection, relative to a vertical bar, default="b"
possibles values are : "b","t","l","r" for bottom, top, left, right
draw_me - if set to false, text is not drawn (default = true or 1)
it can be used with a conky string, if the string returns 1, the text is drawn :
example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",
v1.0 (10 Feb. 2010) original release
v1.1 (13 Feb. 2010) numeric values can be passed instead conky stats with parameters name="", arg = numeric_value
v1.2 (28 Feb. 2010) just renamed the widget to bargraph
v1.3 (03 Mar. 2010) added parameters radius & angle_bar to draw the bar in a circular way
v2.0 (12 Jul. 2010) rewrite script + add reflection effects and parameters are now set into tables
v2.1 (07 Jan. 2011) Add draw_me parameter and correct memory leaks, thanks to "Creamy Goodness"
-- 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 version 3 (GPLv3)
--
-- 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, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-- MA 02110-1301, USA.
]]
require 'cairo'
----------------START OF PARAMETERS ----------
function conky_main_bars()
local bars_settings={
{-- single block bar, skew and with reflecting + gradient
name="memperc",
arg="",
max=100,
alarm=70,
alarm_colour={0xFF0000,0.60},
bg_colour={0x0000FF,0},
fg_colour={0xffff00,0},
bg_led={0x0000FF,0.5},
fg_led={0xffff00,1},
led_effect="r",
blocks=1,--20,
x=96,
y=223,
height=277,--,
width=6,
angle=90,
led_effect="e",
reflection_alpha=1,
reflection="r",
space=1,
skew_x=0,
},
{ --[ Graph for Home ]--
name="fs_used_perc",
arg="/home",
max=100,
alarm=56,
alarm_colour={0xFF0000,0.60},
bg_colour={0x0000FF,0},
fg_colour={0xffff00,0},
bg_led={0x0000FF,0.5},
fg_led={0xffff00,1},
led_effect="r",
blocks=1,--20,
x=96,
y=236,
height=277,--,
width=6,
angle=90,
led_effect="e",
reflection_alpha=1,
reflection="r",
space=1,
skew_x=0,
},
{ --[ Graph for Swap ]--
name="swapperc",
arg="",
max=100,
alarm=70,
alarm_colour={0xFF0000,0.60},
bg_colour={0x0000FF,0},
fg_colour={0xffff00,0},
bg_led={0x0000FF,0.5},
fg_led={0xffff00,1},
led_effect="r",
blocks=1,--20,
x=96,
y=249,
height=277,--,
width=6,
angle=90,
led_effect="e",
reflection_alpha=1,
reflection="r",
space=1,
skew_x=0,
},
{ --[ Graph for hwmon temp 1 ]--
name="hwmon 1 temp 1",
arg="hwmon 1 temp 1",
max=100,
alarm=79,
alarm_colour={0xFF0000,0.60},
bg_colour={0x0000FF,0},
fg_colour={0xffff00,0},
bg_led={0x0000FF,0.5},
fg_led={0xffff00,1},
led_effect="r",
blocks=1,--20,
x=145,
y=283,
height=225,--,
width=5,
angle=90,
led_effect="e",
reflection_alpha=1,
reflection="r",
space=1,
skew_x=0,
},
{ --[ Graph for hwmon temp 1 ]--
name="hwmon 1 temp 2",
arg="hwmon 1 temp 2",
max=100,
alarm=76,
alarm_colour={0xFF0000,0.60},
bg_colour={0x0000FF,0},
fg_colour={0xffff00,0},
bg_led={0x0000FF,0.5},
fg_led={0xffff00,1},
led_effect="r",
blocks=1,--20,
x=145,
y=296,
height=225,--,
width=5,
angle=90,
led_effect="e",
reflection_alpha=1,
reflection="r",
space=1,
skew_x=0,
},
{ --[ Graph for hwmon temp 1 ]--
name="hwmon 1 temp 3",
arg="hwmon 1 temp 3",
max=100,
alarm=76,
alarm_colour={0xFF0000,0.60},
bg_colour={0x0000FF,0},
fg_colour={0xffff00,0},
bg_led={0x0000FF,0.5},
fg_led={0xffff00,1},
led_effect="r",
blocks=1,--20,
x=145,
y=309,
height=225,--,
width=5,
angle=90,
led_effect="e",
reflection_alpha=1,
reflection="r",
space=1,
skew_x=0,
},
{ --[ Graph for hwmon temp 1 ]--
name="hddtemp",
arg="hddtemp",
max=100,
alarm=76,
alarm_colour={0xFF0000,0.60},
bg_colour={0x0000FF,0},
fg_colour={0xffff00,0},
bg_led={0x0000FF,0.5},
fg_led={0xffff00,1},
led_effect="r",
blocks=1,--20,
x=145,
y=322,
height=225,--,
width=5,
angle=90,
led_effect="e",
reflection_alpha=1,
reflection="r",
space=1,
skew_x=0,
},
{ --[ Graph for network ]--
name="downspeedf",
arg="ppp0",
max=250,
alarm=200,
alarm_colour={0xFF0000,0.60},
bg_colour={0x0000FF,0.07},
fg_colour={0xffff00,0.07},
bg_led={0x0000FF,0.5},
fg_led={0xffff00,1},
led_effect="r",
blocks=1,--20,
x=145,
y=527,
height=228,--,
width=6,
angle=90,
led_effect="e",
reflection_alpha=1,
reflection="r",
space=1,
skew_x=0,
},
{ --[ Graph for network ]--
name="upspeedf",
arg="ppp0",
max=250,
alarm=200,
alarm_colour={0xFF0000,0.60},
bg_colour={0x0000FF,0.07},
fg_colour={0xffff00,0.07},
bg_led={0x0000FF,0.5},
fg_led={0xffff00,1},
led_effect="r",
blocks=1,--20,
x=145,
y=540,
height=228,--,
width=6,
angle=90,
led_effect="e",
reflection_alpha=1,
reflection="r",
space=1,
skew_x=0,
},
}
-----------END OF PARAMETERS--------------
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)
--prevent segmentation error when reading cpu state
if tonumber(conky_parse('${updates}'))>3 then
for i in pairs(bars_settings) do
draw_multi_bar_graph(bars_settings[i])
end
end
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end
function draw_multi_bar_graph(t)
cairo_save(cr)
--check values
if t.draw_me == true then t.draw_me = nil end
if t.draw_me ~= nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end
if t.name==nil and t.arg==nil then
print ("No input values ... use parameters 'name' with 'arg' or only parameter 'arg' ")
return
end
if t.max==nil then
print ("No maximum value defined, use 'max'")
return
end
if t.name==nil then t.name="" end
if t.arg==nil then t.arg="" end
--set default values
if t.x == nil then t.x = conky_window.width/2 end
if t.y == nil then t.y = conky_window.height/2 end
if t.blocks == nil then t.blocks=10 end
if t.height == nil then t.height=10 end
if t.angle == nil then t.angle=0 end
t.angle = t.angle*math.pi/180
--line cap style
if t.cap==nil then t.cap = "b" end
local cap="b"
for i,v in ipairs({"s","r","b"}) do
if v==t.cap then cap=v end
end
local delta=0
if t.cap=="r" or t.cap=="s" then delta = t.height end
if cap=="s" then cap = CAIRO_LINE_CAP_SQUARE
elseif cap=="r" then
cap = CAIRO_LINE_CAP_ROUND
elseif cap=="b" then
cap = CAIRO_LINE_CAP_BUTT
end
--end line cap style
--if t.led_effect == nil then t.led_effect="r" end
if t.width == nil then t.width=20 end
if t.space == nil then t.space=2 end
if t.radius == nil then t.radius=0 end
if t.angle_bar == nil then t.angle_bar=0 end
t.angle_bar = t.angle_bar*math.pi/360 --halt angle
--colours
if t.bg_colour == nil then t.bg_colour = {0x00FF00,0.5} end
if #t.bg_colour~=2 then t.bg_colour = {0x00FF00,0.5} end
if t.fg_colour == nil then t.fg_colour = {0x00FF00,1} end
if #t.fg_colour~=2 then t.fg_colour = {0x00FF00,1} end
if t.alarm_colour == nil then t.alarm_colour = t.fg_colour end
if #t.alarm_colour~=2 then t.alarm_colour = t.fg_colour end
if t.mid_colour ~= nil then
for i=1, #t.mid_colour do
if #t.mid_colour[i]~=3 then
print ("error in mid_color table")
t.mid_colour[i]={1,0xFFFFFF,1}
end
end
end
if t.bg_led ~= nil and #t.bg_led~=2 then t.bg_led = t.bg_colour end
if t.fg_led ~= nil and #t.fg_led~=2 then t.fg_led = t.fg_colour end
if t.alarm_led~= nil and #t.alarm_led~=2 then t.alarm_led = t.fg_led end
if t.led_effect~=nil then
if t.bg_led == nil then t.bg_led = t.bg_colour end
if t.fg_led == nil then t.fg_led = t.fg_colour end
if t.alarm_led == nil then t.alarm_led = t.fg_led end
end
if t.alarm==nil then t.alarm = t.max end --0.8*t.max end
if t.smooth == nil then t.smooth = false end
if t.skew_x == nil then
t.skew_x=0
else
t.skew_x = math.pi*t.skew_x/180
end
if t.skew_y == nil then
t.skew_y=0
else
t.skew_y = math.pi*t.skew_y/180
end
if t.reflection_alpha==nil then t.reflection_alpha=0 end
if t.reflection_length==nil then t.reflection_length=1 end
if t.reflection_scale==nil then t.reflection_scale=1 end
--end of default values
local function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end
--functions used to create patterns
local function create_smooth_linear_gradient(x0,y0,x1,y1)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end
local function create_smooth_radial_gradient(x0,y0,r0,x1,y1,r1)
local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end
local function create_led_linear_gradient(x0,y0,x1,y1,col_alp,col_led)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1) ---delta, 0,delta+ t.width,0)
cairo_pattern_add_color_stop_rgba (pat, 0.0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1.0, rgb_to_r_g_b(col_alp))
return pat
end
local function create_led_radial_gradient(x0,y0,r0,x1,y1,r1,col_alp,col_led,mode)
local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
if mode==3 then
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
else
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
end
return pat
end
local function draw_single_bar()
--this fucntion is used for bars with a single block (blocks=1) but
--the drawing is cut in 3 blocks : value/alarm/background
--not zvzimzblr for circular bar
local function create_pattern(col_alp,col_led,bg)
local pat
if not t.smooth then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, 0,t.width/2,-t.height,col_alp,col_led)
elseif t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, -t.height/2, 0, t.width/2,-t.height/2,t.height/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba (rgb_to_r_g_b(col_alp))
end
else
if bg then
pat = cairo_pattern_create_rgba (rgb_to_r_g_b(t.bg_colour))
else
pat = create_smooth_linear_gradient(t.width/2, 0, t.width/2,-t.height)
end
end
return pat
end
local y1=-t.height*pct/100
local y2,y3
if pct>(100*t.alarm/t.max) then
y1 = -t.height*t.alarm/100
y2 = -t.height*pct/100
if t.smooth then y1=y2 end
end
if t.angle_bar==0 then
--block for fg value
local pat = create_pattern(t.fg_colour,t.fg_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,0,t.width,y1)
cairo_fill(cr)
cairo_pattern_destroy(pat)
-- block for alarm value
if not t.smooth and y2 ~=nil then
pat = create_pattern(t.alarm_colour,t.alarm_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,y1,t.width,y2-y1)
cairo_fill(cr)
y3=y2
cairo_pattern_destroy(pat)
else
y2,y3=y1,y1
end
-- block for bg value
cairo_rectangle(cr,0,y2,t.width,-t.height-y3)
pat = create_pattern(t.bg_colour,t.bg_led,true)
cairo_set_source(cr,pat)
cairo_pattern_destroy(pat)
cairo_fill(cr)
end
end --end single bar
local function draw_multi_bar()
--function used for bars with 2 or more blocks
for pt = 1,t.blocks do
--set block y
local y1 = -(pt-1)*(t.height+t.space)
local light_on=false
--set colors
local col_alp = t.bg_colour
local col_led = t.bg_led
if pct>=(100/t.blocks) or pct>0 then --ligth on or not the block
if pct>=(pcb*(pt-1)) then
light_on = true
col_alp = t.fg_colour
col_led = t.fg_led
if pct>=(100*t.alarm/t.max) and (pcb*pt)>(100*t.alarm/t.max) then
col_alp = t.alarm_colour
col_led = t.alarm_led
end
end
end
--set colors
--have to try to create gradients outside the loop ?
local pat
if not t.smooth then
if t.angle_bar==0 then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, -t.height/2+y1,t.width/2,0+t.height/2+y1,col_alp,col_led)
elseif t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, y1, 0, t.width/2,y1,t.width/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba (rgb_to_r_g_b(col_alp))
end
else
if t.led_effect=="a" then
pat = create_led_radial_gradient (0, 0, t.radius+(t.height+t.space)*(pt-1),
0, 0, t.radius+(t.height+t.space)*(pt),
col_alp,col_led,3)
else
pat = cairo_pattern_create_rgba (rgb_to_r_g_b(col_alp))
end
end
else
if light_on then
if t.angle_bar==0 then
pat = create_smooth_linear_gradient(t.width/2, t.height/2, t.width/2,-(t.blocks-0.5)*(t.height+t.space))
else
pat = create_smooth_radial_gradient(0, 0, (t.height+t.space), 0,0,(t.blocks+1)*(t.height+t.space),2)
end
else
pat = cairo_pattern_create_rgba (rgb_to_r_g_b(t.bg_colour))
end
end
cairo_set_source (cr, pat)
cairo_pattern_destroy(pat)
--draw a block
if t.angle_bar==0 then
cairo_move_to(cr,0,y1)
cairo_line_to(cr,t.width,y1)
else
cairo_arc( cr,0,0,
t.radius+(t.height+t.space)*(pt)-t.height/2,
-t.angle_bar -math.pi/2 ,
t.angle_bar -math.pi/2)
end
cairo_stroke(cr)
end
end
local function setup_bar_graph()
--function used to retrieve the value to display and to set the cairo structure
if t.blocks ~=1 then t.y=t.y-t.height/2 end
local value = 0
if t.name ~="" then
value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
--$to_bytes doesn't work when value has a decimal point,
--https://garage.maemo.org/plugins/ggit/browse.php/?p=monky;a=commitdiff;h=174c256c81a027a2ea406f5f37dc036fac0a524b;hp=d75e2db5ed3fc788fb8514121f67316ac3e5f29f
--http://sourceforge.net/tracker/index.php?func=detail&aid=3000865&group_id=143975&atid=757310
--conky bug?
--value = (conky_parse(string.format('${%s %s}', t.name, t.arg)))
--if string.match(value,"%w") then
-- value = conky_parse(string.format('${to_bytes %s}',value))
--end
else
value = tonumber(t.arg)
end
if value==nil then value =0 end
pct = 100*value/t.max
pcb = 100/t.blocks
cairo_set_line_width (cr, t.height)
cairo_set_line_cap (cr, cap)
cairo_translate(cr,t.x,t.y)
cairo_rotate(cr,t.angle)
local matrix0 = cairo_matrix_t:create()
tolua.takeownership(matrix0)
cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)
cairo_transform(cr,matrix0)
--call the drawing function for blocks
if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
if t.reflection=="t" or t.reflection=="b" then cairo_translate(cr,0,-t.height) end
else
draw_multi_bar()
end
--dot for reminder
--[[
if t.blocks ~=1 then
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,t.height/2,3,0,2*math.pi)
cairo_fill(cr)
else
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,0,3,0,2*math.pi)
cairo_fill(cr)
end]]
--call the drawing function for reflection and prepare the mask used
if t.reflection_alpha>0 and t.angle_bar==0 then
local pat2
local matrix1 = cairo_matrix_t:create()
tolua.takeownership(matrix1)
if t.angle_bar==0 then
pts={-delta/2,(t.height+t.space)/2,t.width+delta,-(t.height+t.space)*(t.blocks)}
if t.reflection=="t" then
cairo_matrix_init (matrix1,1,0,0,-t.reflection_scale,0,-(t.height+t.space)*(t.blocks-0.5)*2*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,-(t.height+t.space)*(t.blocks),t.width/2,(t.height+t.space)/2)
elseif t.reflection=="r" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,delta+2*t.width,0)
pat2 = cairo_pattern_create_linear (delta/2+t.width,0,-delta/2,0)
elseif t.reflection=="l" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,-delta,0)
pat2 = cairo_pattern_create_linear (-delta/2,0,delta/2+t.width,-0)
else --bottom
cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(t.height+t.space)*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,(t.height+t.space)/2,t.width/2,-(t.height+t.space)*(t.blocks))
end
end
cairo_transform(cr,matrix1)
if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
cairo_translate(cr,0,-t.height/2)
else
draw_multi_bar()
end
cairo_set_line_width(cr,0.01)
cairo_pattern_add_color_stop_rgba (pat2, 0,0,0,0,1-t.reflection_alpha)
cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)
if t.angle_bar==0 then
cairo_rectangle(cr,pts[1],pts[2],pts[3],pts[4])
end
cairo_clip_preserve(cr)
cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
cairo_stroke(cr)
cairo_mask(cr,pat2)
cairo_pattern_destroy(pat2)
cairo_set_operator(cr,CAIRO_OPERATOR_OVER)
end --reflection
pct,pcb=nil
end --setup_bar_graph()
--start here !
setup_bar_graph()
cairo_restore(cr)
end
</span></span></pre>
The ring lua<br />
<br />
<pre class="code" style="border-color: rgb(216, 216, 216); border-style: dashed; border-width: 1px; margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">--[[ RINGS with SECTORS widget
v1.1 by wlourf (07 Jan. 2011)
this widget draws a ring with differents effects
http://u-scripts.blogspot.com/2010/08/rings-sectors-widgets.html
To call the script in a conky, use, before TEXT
lua_load /path/to/the/script/rings.lua
lua_draw_hook_pre main_rings
and add one line (blank or not) after TEXT
Parameters are :
3 parameters are mandatory
name - the name of the conky variable to display,
for example for {$cpu cpu0}, just write name="cpu"
arg - the argument of the above variable,
for example for {$cpu cpu0}, just write arg="cpu0"
arg can be a numerical value if name=""
max - the maximum value the above variable can reach,
for example for {$cpu cpu0}, just write max=100
Optional parameters:
xc,yc - coordinates of the center of the ring,
default = middle of the conky window
radius - external radius of the ring, in pixels,
default = quarter of the width of the conky window
thickness - thickness of the ring, in pixels, default = 10 pixels
start_angle - starting angle of the ring, in degrees, value can be negative,
default = 0 degree
end_angle - ending angle of the ring, in degrees,
value must be greater than start_angle, default = 360 degrees
sectors - number of sectors in the ring, default = 10
gap_sectors - gap between two sectors, in pixels, default = 1 pixel
cap - the way to close a sector, available values are
"p" for parallel , default value
"r" for radial (follow the radius)
inverse_arc - if set to true, arc will be anticlockwise, default=false
border_size - size of the border, in pixels, default = 0 pixel i.e. no border
fill_sector - if set to true, each sector will be completely filled,
default=false, this parameter is inoperate if sectors=1
background - if set to false, background will not be drawn, default=true
foreground - if set to false, foreground will not be drawn, default=true
Colours tables below are defined into braces :
{position in the gradient (0 to 1), colour in hexadecimal, alpha (0 to 1)}
example for a single colour table :
{{0,0xFFAA00,1}} position parameter doesn't matter
example for a two-colours table :
{{0,0xFFAA00,1},{1,0x00AA00,1}} or {{0.5,0xFFAA00,1},{1,0x00AA00,1}}
example for a three-colours table :
{{0,0xFFAA00,1},{0.5,0xFF0000,1},{1,0x00AA00,1}}
bg_colour1 - colour table for background,
default = {{0,0x00ffff,0.1},{0.5,0x00FFFF,0.5},{1,0x00FFFF,0.1}}
fg_colour1 - colour table for foreground,
default = {{0,0x00FF00,0.1},{0.5,0x00FF00,1},{1,0x00FF00,0.1}}
bd_colour1 - colour table for border,
default = {{0,0xFFFF00,0.5},{0.5,0xFFFF00,1},{1,0xFFFF00,0.5}}
Seconds tables for radials gradients :
bg_colour2 - second colour table for background, default = no second colour
fg_colour2 - second colour table for foreground, default = no second colour
bd_colour2 - second colour table for border, default = no second colour
draw_me - if set to false, text is not drawn (default = true or 1)
it can be used with a conky string, if the string returns 1, the text is drawn :
example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",
v1.0 (08 Aug. 2010) original release
v1.1 (07 Jan. 2011) Add draw_me parameter and correct memory leaks, thanks to "Creamy Goodness"
text is parsed inside the function, not in the array of settings
-- 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 version 3 (GPLv3)
--
-- 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, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-- MA 02110-1301, USA.
]]
require 'cairo'
function conky_main_rings()
-- START PARAMETERS HERE
local rings_settings={
--line1
{
name="cpu",
arg="cpu1",
max=100,
xc=120,
yc=205,
radius=30,
thickness=15,
start_angle=-120,
sectors=1,
end_angle=120,
bg_colour1={{0,0x0000FF,0.1},{0.5,0x0000FF,0.5},{1,0x0000FF,0.1}},
fg_colour1={{0,0xFFFF00,0.1},{0.5,0xFFFF00,1.0},{1,0xFFFF00,0.1}},
fg_colour2={{0,0xFF0000,0.1},{0.5,0xFF0000,1.0},{1,0xFF0000,0.1}},
},
{
name="cpu",
arg="cpu2",
max=100,
xc=185,
yc=205,
radius=30,
thickness=15,
start_angle=-120,
sectors=1,
end_angle=120,
bg_colour1={{0,0x0000FF,0.1},{0.5,0x0000FF,0.5},{1,0x0000FF,0.1}},
fg_colour1={{0,0xFFFF00,0.1},{0.5,0xFFFF00,1.0},{1,0xFFFF00,0.1}},
fg_colour2={{0,0xFF0000,0.1},{0.5,0xFF0000,1.0},{1,0xFF0000,0.1}},
},
{
name="cpu",
arg="cpu3",
max=100,
xc=253,
yc=205,
radius=30,
thickness=15,
start_angle=-120,
sectors=1,
end_angle=120,
bg_colour1={{0,0x0000FF,0.1},{0.5,0x0000FF,0.5},{1,0x0000FF,0.1}},
fg_colour1={{0,0xFFFF00,0.1},{0.5,0xFFFF00,1.0},{1,0xFFFF00,0.1}},
fg_colour2={{0,0xFF0000,0.1},{0.5,0xFF0000,1.0},{1,0xFF0000,0.1}},
},
{
name="cpu",
arg="cpu4",
max=100,
xc=320,
yc=205,
radius=30,
thickness=15,
start_angle=-120,
sectors=1,
end_angle=120,
bg_colour1={{0,0x0000FF,0.1},{0.5,0x0000FF,0.5},{1,0x0000FF,0.1}},
fg_colour1={{0,0xFFFF00,0.1},{0.5,0xFFFF00,1.0},{1,0xFFFF00,0.1}},
fg_colour2={{0,0xFF0000,0.1},{0.5,0xFF0000,1.0},{1,0xFF0000,0.1}},
},
}
--END OF PARAMETERS HERE
--main function
--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)
if tonumber(conky_parse('${updates}'))>3 then
for i in pairs(rings_settings) do
draw_ring(cr,rings_settings[i])
end
end
cairo_destroy(cr)
end
function draw_ring(cr, t)
local function rgba_to_r_g_b_a(tcolour)
local colour,alpha=tcolour[2],tcolour[3]
return ((colour / 0x10000) % 0x100) / 255.,
((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
local function calc_delta(tcol1,tcol2)
--calculate deltas P R G B A to table_colour 1
for x = 1, #tcol1 do
tcol1[x].dA = 0
tcol1[x].dP = 0
tcol1[x].dR = 0
tcol1[x].dG = 0
tcol1[x].dB = 0
if tcol2~=nil and #tcol1 == #tcol2 then
local r1,g1,b1,a1 = rgba_to_r_g_b_a(tcol1[x])
local r2,g2,b2,a2 = rgba_to_r_g_b_a(tcol2[x])
tcol1[x].dP = (tcol2[x][1]-tcol1[x][1])/t.sectors
tcol1[x].dR = (r2-r1)/t.sectors
tcol1[x].dG = (g2-g1)/t.sectors
tcol1[x].dB = (b2-b1)/t.sectors
tcol1[x].dA = (a2-a1)/t.sectors
end
end
return tcol1
end
--check values
local function setup(t)
if t.name==nil and t.arg==nil then
print ("No input values ... use parameters 'name'" +
" with 'arg' or only parameter 'arg' ")
return
end
if t.max==nil then
print ("No maximum value defined, use 'max'")
print ("for name=" .. t.name)
print ("with arg=" .. t.arg)
return
end
if t.name==nil then t.name="" end
if t.arg==nil then t.arg="" end
if t.xc==nil then t.xc=conky_window.width/2 end
if t.yc==nil then t.yc=conky_window.height/2 end
if t.thickness ==nil then t.thickness = 10 end
if t.radius ==nil then t.radius =conky_window.width/4 end
if t.start_angle==nil then t.start_angle =0 end
if t.end_angle==nil then t.end_angle=360 end
if t.bg_colour1==nil then
t.bg_colour1={{0,0x00ffff,0.1},{0.5,0x00FFFF,0.5},{1,0x00FFFF,0.1}}
end
if t.fg_colour1==nil then
t.fg_colour1={{0,0x00FF00,0.1},{0.5,0x00FF00,1},{1,0x00FF00,0.1}}
end
if t.bd_colour1==nil then
t.bd_colour1={{0,0xFFFF00,0.5},{0.5,0xFFFF00,1},{1,0xFFFF00,0.5}}
end
if t.sectors==nil then t.sectors=10 end
if t.gap_sectors==nil then t.gap_sectors=1 end
if t.fill_sector==nil then t.fill_sector=false end
if t.sectors==1 then t.fill_sector=false end
if t.border_size==nil then t.border_size=0 end
if t.cap==nil then t.cap="p" end
--some checks
if t.thickness>t.radius then t.thickness=t.radius*0.1 end
t.int_radius = t.radius-t.thickness
--check colors tables
for i=1, #t.bg_colour1 do
if #t.bg_colour1[i]~=3 then t.bg_colour1[i]={1,0xFFFFFF,0.5} end
end
for i=1, #t.fg_colour1 do
if #t.fg_colour1[i]~=3 then t.fg_colour1[i]={1,0xFF0000,1} end
end
for i=1, #t.bd_colour1 do
if #t.bd_colour1[i]~=3 then t.bd_colour1[i]={1,0xFFFF00,1} end
end
if t.bg_colour2~=nil then
for i=1, #t.bg_colour2 do
if #t.bg_colour2[i]~=3 then t.bg_colour2[i]={1,0xFFFFFF,0.5} end
end
end
if t.fg_colour2~=nil then
for i=1, #t.fg_colour2 do
if #t.fg_colour2[i]~=3 then t.fg_colour2[i]={1,0xFF0000,1} end
end
end
if t.bd_colour2~=nil then
for i=1, #t.bd_colour2 do
if #t.bd_colour2[i]~=3 then t.bd_colour2[i]={1,0xFFFF00,1} end
end
end
if t.start_angle>=t.end_angle then
local tmp_angle=t.end_angle
t.end_angle= t.start_angle
t.start_angle = tmp_angle
-- print ("inversed angles")
if t.end_angle-t.start_angle>360 and t.start_angle>0 then
t.end_angle=360+t.start_angle
print ("reduce angles")
end
if t.end_angle+t.start_angle>360 and t.start_angle<=0 then
t.end_angle=360+t.start_angle
print ("reduce angles")
end
if t.int_radius<0 then t.int_radius =0 end
if t.int_radius>t.radius then
local tmp_radius=t.radius
t.radius=t.int_radius
t.int_radius=tmp_radius
print ("inversed radius")
end
if t.int_radius==t.radius then
t.int_radius=0
print ("int radius set to 0")
end
end
t.fg_colour1 = calc_delta(t.fg_colour1,t.fg_colour2)
t.bg_colour1 = calc_delta(t.bg_colour1,t.bg_colour2)
t.bd_colour1 = calc_delta(t.bd_colour1,t.bd_colour2)
end
if t.draw_me == true then t.draw_me = nil end
if t.draw_me ~= nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end
--initialize table
setup(t)
--initialize cairo context
cairo_save(cr)
cairo_translate(cr,t.xc,t.yc)
cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND)
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND)
--get value
local value = 0
if t.name ~="" then
value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
else
value = tonumber(t.arg)
end
if value==nil then value =0 end
--initialize sectors
--angle of a sector :
local angleA = ((t.end_angle-t.start_angle)/t.sectors)*math.pi/180
--value of a sector :
local valueA = t.max/t.sectors
--first angle of a sector :
local lastAngle = t.start_angle*math.pi/180
local function draw_sector(type_arc,angle0,angle,valpc, idx)
--this function draws a portion of arc
--type of arc, angle0 = strating angle, angle= angle of sector,
--valpc = percentage inside the sector, idx = sctor number #
local tcolor
if type_arc=="bg" then --background
if valpc==1 then return end
tcolor=t.bg_colour1
elseif type_arc=="fg" then --foreground
if valpc==0 then return end
tcolor=t.fg_colour1
elseif type_arc=="bd" then --border
tcolor=t.bd_colour1
end
--angles equivalents to gap_sector
local ext_delta=math.atan(t.gap_sectors/(2*t.radius))
local int_delta=math.atan(t.gap_sectors/(2*t.int_radius))
--angles of arcs
local ext_angle=(angle-ext_delta*2)*valpc
local int_angle=(angle-int_delta*2)*valpc
--define colours to use for this sector
if #tcolor==1 then
--plain color
local vR,vG,vB,vA = rgba_to_r_g_b_a(tcolor[1])
cairo_set_source_rgba(cr,vR+tcolor[1].dR*idx,
vG+tcolor[1].dG*idx,
vB+tcolor[1].dB*idx,
vA+tcolor[1].dA*idx )
else
--radient color
local pat=cairo_pattern_create_radial(0,0,t.int_radius,0,0,t.radius)
for i=1, #tcolor do
local vP,vR,vG,vB,vA = tcolor[i][1], rgba_to_r_g_b_a(tcolor[i])
cairo_pattern_add_color_stop_rgba (pat,
vP+tcolor[i].dP*idx,
vR+tcolor[i].dR*idx,
vG+tcolor[i].dG*idx,
vB+tcolor[i].dB*idx,
vA+tcolor[i].dA*idx )
end
cairo_set_source (cr, pat)
cairo_pattern_destroy(pat)
end
--start drawing
cairo_save(cr)
--x axis is parrallel to start of sector
cairo_rotate(cr,angle0-math.pi/2)
local ri,re = t.int_radius ,t.radius
--point A
local angle_a
if t.cap == "p" then
angle_a = int_delta
if t.inverse_arc and type_arc ~="bg" then
angle_a = angle-int_angle-int_delta
end
if not(t.inverse_arc) and type_arc =="bg" then
angle_a = int_delta+int_angle
end
else --t.cap=="r"
angle_a = ext_delta
if t.inverse_arc and type_arc~="bg" then
angle_a = angle-ext_angle-ext_delta
end
if not(t.inverse_arc) and type_arc=="bg" then
angle_a = ext_delta+ext_angle
end
end
local ax,ay = ri*math.cos(angle_a),ri*math.sin(angle_a)
--point B
local angle_b = ext_delta
if t.cap == "p" then
if t.inverse_arc and type_arc ~="bg" then
angle_b = angle-ext_angle-ext_delta
end
if not(t.inverse_arc) and type_arc=="bg" then
angle_b = ext_delta+ext_angle
end
else
if t.inverse_arc and type_arc ~="bg" then
angle_b = angle-ext_angle-ext_delta
end
if not(t.inverse_arc) and type_arc=="bg" then
angle_b = ext_delta+ext_angle
end
end
local bx,by = re*math.cos(angle_b),re*math.sin(angle_b)
-- EXTERNAL ARC B --> C
local b0,b1
if t.inverse_arc then
if type_arc=="bg" then
b0,b1= ext_delta, angle-ext_delta-ext_angle
else
b0,b1= angle-ext_angle-ext_delta, angle-ext_delta
end
else
if type_arc=="bg" then
b0,b1= ext_delta+ext_angle, angle-ext_delta
else
b0,b1= ext_delta, ext_angle+ext_delta
end
end
---POINT D
local angle_c, angle_d
if t.cap == "p" then
angle_d = angle-int_delta
if t.inverse_arc and type_arc=="bg" then
angle_d = angle-int_delta-int_angle
end
if not(t.inverse_arc) and type_arc~="bg" then
angle_d=int_delta+int_angle
end
else
angle_d = angle-ext_delta
if t.inverse_arc and type_arc=="bg" then
angle_d =angle-ext_delta-ext_angle
end
if not(t.inverse_arc) and type_arc~="bg" then
angle_d = ext_angle+ext_delta
end
end
local dx,dy = ri*math.cos(angle_d),ri*math.sin(angle_d)
-- INTERNAL ARC D --> A
local d0,d1
if t.cap=="p" then
if t.inverse_arc then
if type_arc=="bg" then
d0,d1= angle-int_delta-int_angle,int_delta
else
d0,d1= angle-int_delta, angle- int_angle-int_delta
end
else
if type_arc=="bg" then
d0,d1= angle-int_delta, int_delta+int_angle
else
d0,d1= int_delta+int_angle, int_delta
end
end
else
if t.inverse_arc then
if type_arc=="bg" then
d0,d1= angle-ext_delta-ext_angle,ext_delta
else
d0,d1= angle-ext_delta, angle- ext_angle-ext_delta
end
else
if type_arc=="bg" then
d0,d1= angle-ext_delta,ext_delta+ext_angle
else
d0,d1= ext_angle+ext_delta, ext_delta
end
end
end
--draw sector
cairo_move_to(cr,ax,ay)
cairo_line_to(cr,bx,by)
cairo_arc(cr,0,0,re,b0,b1)
cairo_line_to(cr,dx,dy)
cairo_arc_negative(cr,0,0,ri,d0,d1)
cairo_close_path (cr);
--stroke or fill sector
if type_arc=="bd" then
cairo_set_line_width(cr,t.border_size)
cairo_stroke(cr)
else
cairo_fill(cr)
end
cairo_restore(cr)
end
--draw sectors
local n0,n1,n2 = 1,t.sectors,1
if t.inverse_arc then n0,n1,n2 = t.sectors,1,-1 end
local index = 0
for i = n0,n1,n2 do
index = index +1
local valueZ=1
local cstA, cstB = (i-1),i
if t.inverse_arc then cstA,cstB = (t.sectors-i), (t.sectors-i+1) end
if value>valueA *cstA and value<valueA*cstB then
if not t.fill_sector then
valueZ = (value-valueA*cstA)/valueA
end
else
if value<valueA*cstB then valueZ=0 end
end
local start_angle= lastAngle+(i-1)*angleA
if t.foreground ~= false then
draw_sector("fg",start_angle,angleA,valueZ, index)
end
if t.background ~= false then
draw_sector("bg",start_angle,angleA,valueZ, i)
end
if t.border_size>0 then draw_sector("bd",start_angle,angleA,1, i) end
end
cairo_restore(cr)
end
--[[END OF RING-SECTORS WIDGET]]
</span></span></pre>
the background (or choose your own)<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-hRV8ncoVlJc/U_IWEo1EeOI/AAAAAAAACGM/PukWWcN50jw/s1600/base.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-hRV8ncoVlJc/U_IWEo1EeOI/AAAAAAAACGM/PukWWcN50jw/s1600/base.png" height="81" width="320" /></a></div>
the icons..<br />
<br />
http://www.4shared.com/zip/kZ6isXjkce/morning_light_0_2_by_inyourfac.html<br />
<br />
you must select what you want to use..<br />
<br />
the weather file..<br />
<br />
http://bit.ly/1b1_12-2-14 <br />
<br />
that's all, if i miss anything let me know.<br />
<br />
Enjoy<br />
<br />
the credit goes to:<br />
weather conky by TeoBigusGeekus,<br />
Conky jed,<br />
Morning_light_0_2_by_inyourface09,<br />
Bargraph_widget_for_Conky_3_by_wlourf, rings_and_sectors_conky_1_1_by_wlourf,<br />
and all that i forgot, you're the great... i'm the copy paster....<br />
<br />
<br /><div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>AkuBuntuhttp://www.blogger.com/profile/13483680561608995044noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-14832911055549503562014-01-10T05:53:00.000-07:002014-06-24T02:06:45.056-07:00Latest conky with lua<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-5upfyywp0P0/Us_qQJBbv3I/AAAAAAAACDw/p9R_vvx-VoA/s1600/Screenshot+2014-01-04+20:04:49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-5upfyywp0P0/Us_qQJBbv3I/AAAAAAAACDw/p9R_vvx-VoA/s1600/Screenshot+2014-01-04+20:04:49.png" height="356" width="640" /></a></div>
<br />
<br />
This is the .conkyrc <br />
<pre class="code" style="border-color: rgb(216, 216, 216); border-style: dashed; border-width: 1px; margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">background yes
use_xft yes
xftfont Sans:bold:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 290 750
maximum_size 290 760
maximum_width 290
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment top_left
gap_x 5
gap_y -30
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
lua_load /home/{link to your file}/bargraph_small.lua
lua_draw_hook_post main_bars
#
#${image ~/.conky/.images/base.png -p -10,40 -s 383x195}
#
TEXT
${goto
32}${font openlogos:size=80}${color red}v${font}${voffset -65}${goto
170}${font Ubuntu:Bold:size=25}${color red}${pre_exec cat /etc/*release |
grep 'RELEASE' | awk -F'=' '{print $2}'}${color}${font}
${font sans-serif:bold:size=8}${color yellow}SYSTEM ${hr 2}$color
${font OpenLogos:size=12}${color red}t${color white}${font sans-serif:bold:size=8}${sysname} ${kernel}:$alignr$nodename
${font
OpenLogos:size=12}${color red}Z${color white}${font
sans-serif:bold:size=8}4x Intel(R) Core(TM) i5-2410M $alignr${freq_g
cpu0}Ghz
${font StyleBats:size=12}${color red}q${color white}${font sans-serif:bold:size=8}Uptime:$alignr$uptime
${font Poky:size=12}${color red}y${color white}${font sans-serif:bold:size=8}File System: $alignr${fs_type}
#
${font sans-serif:bold:size=8}${color yellow}DATE ${hr 2}
${goto 30}${font RadioSpace:size=28}${time %I:%M:%S}${goto 200}${time %p}${font}
${alignc}${font sans-serif:bold:size=8}${Time %A %m/%d/%Y}$color
#
${font sans-serif:bold:size=8}${color yellow}PROCESSORS ${hr 2}$color
${voffset
2}${font StyleBats:bold:size=9.9}${color red}k${font}${color}${font
sans-serif:bold:size=8} CPU1${goto 57}: ${cpu cpu1}%
${voffset
2}${font StyleBats:bold:size=9.9}${color red}k${font}${color}${font
sans-serif:bold:size=8} CPU2${goto 57}: ${cpu cpu2}%
${voffset
2}${font StyleBats:bold:size=9.9}${color red}k${font}${color}${font
sans-serif:bold:size=8} CPU3${goto 57}: ${cpu cpu3}%
${voffset
2}${font StyleBats:bold:size=9.9}${color red}k${font}${color}${font
sans-serif:bold:size=8} CPU4${goto 57}: ${cpu cpu4}%
${voffset
2}${font StyleBats:size=10}${color red}l${color}${font
sans-serif:bold:size=8} RAM${goto 57}: $memperc% ${goto 190}$mem /
$alignr$memmax
${voffset 2}${font StyleBats:size=9.9}${color
red}x${font}${color}${font sans-serif:bold:size=8} DISK${goto 57}:
${fs_used_perc /}%${goto 190}${fs_used /} / $alignr${fs_size /}
${voffset
2}${font StyleBats:size=9.9}${color red}x${font}${color}${font
sans-serif:bold:size=8} SWAP${goto 57}: ${swapperc}% ${goto 190}${swap}
${goto 240}/ $alignr${swapmax}
#
${voffset 3}${font sans-serif:bold:size=8}${color yellow}TEMPERATURE ${voffset 2}${hr 2}$color
${voffset
0}${goto 8}${font Weather:size=14}${color red}y${font}$color${font
sans-serif:bold:size=8} CORE0${goto 57}: ${hwmon 1 temp 1}${iconv_start
UTF-8 ISO_8859-1}°${iconv_stop}C
${voffset 0}${goto 8}${font
Weather:size=14}${color red}y${font}$color${font sans-serif:bold:size=8}
CORE1${goto 57}: ${hwmon 2 temp 1}${iconv_start UTF-8
ISO_8859-1}°${iconv_stop}C
${voffset 0}${goto 8}${font
Weather:size=14}${color red}y${font}$color${font sans-serif:bold:size=8}
PCI${goto 57}: ${hwmon 1 temp 2}${iconv_start UTF-8
ISO_8859-1}°${iconv_stop}C
${voffset 0}${goto 8}${font
Weather:size=14}${color red}y${font}$color${font sans-serif:bold:size=8}
ACPI${goto 57}: ${acpitemp}${iconv_start UTF-8
ISO_8859-1}°${iconv_stop}C
#
${voffset 3}${font sans-serif:bold:size=8}${color yellow}TOP PROCESSES${goto 154}PID${goto 197}CPU%${goto 255}MEM%$color
${font
StyleBats:size=9.9}${color red}i$color ${font
sans-serif:bold:size=8}${top name 1} ${goto 144} ${top pid 1}${goto
197}${top cpu 1}${goto 250}${top mem 1}
${font
StyleBats:size=9.9}${color red}i$color ${font
sans-serif:bold:size=8}${top name 2} ${goto 144} ${top pid 2}${goto
197}${top cpu 2}${goto 250}${top mem 2}
${font
StyleBats:size=9.9}${color red}i$color ${font
sans-serif:bold:size=8}${top name 3} ${goto 144} ${top pid 3}${goto
197}${top cpu 3}${goto 250}${top mem 3}
${font
StyleBats:size=9.9}${color red}i$color ${font
sans-serif:bold:size=8}${top name 4} ${goto 144} ${top pid 4}${goto
197}${top cpu 4}${goto 250}${top mem 4}
${font
StyleBats:size=9.9}${color red}i$color ${font
sans-serif:bold:size=8}${top name 3} ${goto 144} ${top pid 5}${goto
197}${top cpu 5}${goto 250}${top mem 5}
#
${voffset 3}${font sans-serif:bold:size=8}${color yellow}TOP MEMORIES${goto 154}PID${goto 197}CPU%${goto 255}MEM%$color
${voffset
2}${font StyleBats:size=9.9}${color red}v${font}$color ${top_mem name
1}${goto 144}${top_mem pid 1}${goto 197}${top_mem cpu 1}${goto
250}${top_mem mem 1}
${voffset 2}${font StyleBats:size=9.9}${color
red}v${font}$color ${top_mem name 2}${goto 144}${top_mem pid 2}${goto
197}${top_mem cpu 2}${goto 250}${top_mem mem 2}
${voffset 2}${font
StyleBats:size=9.9}${color red}v${font}$color ${top_mem name 3}${goto
144}${top_mem pid 3}${goto 197}${top_mem cpu 3}${goto 250}${top_mem mem
3}
${voffset 2}${font StyleBats:size=9.9}${color red}v${font}$color
${top_mem name 4}${goto 144}${top_mem pid 4}${goto 197}${top_mem cpu
4}${goto 250}${top_mem mem 4}
${voffset 2}${font
StyleBats:size=9.9}${color red}v${font}$color ${top_mem name 5}${goto
144}${top_mem pid 5}${goto 197}${top_mem cpu 5}${goto 250}${top_mem mem
5}
#
${voffset 3}${font sans-serif:bold:size=8}${color yellow}NETWORK ${hr 2}$color${if_existing /proc/net/route ppp0}
${gw_iface}$alignc ....Berukband....
${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}a${font}${color} Public IP: $alignr ${addr ppp0}
${voffset
2}${font PizzaDudeBullets:size=9.5}${color red}a${font}${color} Private
IP:${alignr}${execi 1800 wget -q -O - checkip.dyndns.org | sed -e
's/[^[:digit:]\|.]//g'}
${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}T${font}${color} Downloads:${goto 237}${downspeed ppp0}/s
${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}N${font}${color} Uploads:${goto 237}${upspeed ppp0}/s
Total:
Downloads:${goto 118}${color green}${totaldown ppp0}${color}${goto 185}
Uploads:${color red}${goto 243}${totalup ppp0}${color}
#${wireless_link_qual ppp0}%
#
${else}${if_existing /proc/net/route wlan0}$
$alignc ....Wireless....
${voffset
2}${font PizzaDudeBullets:size=9.5}${color red}a${font}${color}WAN
IP:$alignr${execi 3600 wget -O- http://whatismyip.org/ | tail}
${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}a${font}${color}IP address: $alignr ${addr wlan0}
${voffset 2}${font PizzaDudeBullets:size=9.5}${color red}a${font}${color}ESSID: $alignr ${wireless_essid wlan0}
${voffset
2}${font PizzaDudeBullets:size=9.5}${color
red}a${font}${color}Connection quality: $alignr
${wireless_link_qual_perc wlan0}%
Downloads:$alignr${downspeed wlan0}/s
${downspeedgraph wlan0 20,290 F57900 FCAF3E}
Total Downloads:$alignr${totaldown wlan0}
Uploads:$alignr${upspeed wlan0}/s
${upspeedgraph wlan0 20,290 F57900 FCAF3E}
Total Uploads:$alignr${totalup wlan0}
#
${else}${if_existing /proc/net/route eth1}
$alignc ....Wireless....
WAN IP:$alignr${execi 3600 wget -O- http://whatismyip.org/ | tail}
IP address: $alignr ${addr eth1}
ESSID: $alignr ${wireless_essid eth1}
Connection quality: $alignr ${wireless_link_qual_perc eth1}%
Downloads:$alignr${downspeed eth1}/s
${downspeedgraph eth1 20,290 F57900 FCAF3E}
Total Downloads:$alignr$${totaldown eth1}
Uploads:$alignr${upspeed eth1}/s
${upspeedgraph eth1 20,290 F57900 FCAF3E}
Total Uploads:$alignr${totalup eth1}
#
${else}${if_existing /proc/net/route eth0}
$alignc ....Cable....
WAN IP:$alignr${execi 3600 wget -O- http://whatismyip.org/ | tail}
IP address: $alignr ${addr eth0}
ESSID: $alignr ${wireless_essid eth0}
Connection quality: $alignr ${wireless_link_qual_perc eth0}%
Downloads:$alignr${downspeed eth0}/s
${downspeedgraph eth1 8,290 F57900 FCAF3E}
Total Downloads:$alignr$${totaldown eth0}
Uploads:$alignr${upspeed eth0}/s
${upspeedgraph eth0 8,290 F57900 FCAF3E}
Total Uploads:$alignr${totalup eth0}
${else}${font sans-serif:bold:size=8}${font}Takdok Internet Pulok Wei${endif}</span></span></pre>
This is the lua... with the credit to the original source<br />
i just edit a little.<br />
#<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">--[[<br />BARGRAPH WIDGET<br />v2.1 by wlourf (07 Jan. 2011)<br />this widget draws a bargraph with different effects <br />http://u-scripts.blogspot.com/2010/07/bargraph-widget.html<br /> <br />To call the script in a conky, use, before TEXT<br /> lua_load /home/akubuntu/conkyJed/bargraph.lua<br /> lua_draw_hook_pre main_rings<br />and add one line (blank or not) after TEXT<br /> <br />Parameters are :<br />3 parameters are mandatory<br />name - the name of the conky variable to display, for example for {$cpu cpu0}, just write name="cpu"<br />arg - the argument of the above variable, for example for {$cpu cpu0}, just write arg="cpu0"<br /> arg can be a numerical value if name=""<br />max - the maximum value the above variable can reach, for example, for {$cpu cpu0}, just write max=100<br /> <br />Optional parameters:<br />x,y - coordinates of the starting point of the bar, default = middle of the conky window<br />cap - end of cap line, ossibles values are r,b,s (for round, butt, square), default="b"<br /> http://www.cairographics.org/samples/set_line_cap/<br />angle - angle of rotation of the bar in degress, default = 0 (i.e. a vertical bar)<br /> set to 90 for an horizontal bar<br />skew_x - skew bar around x axis, default = 0<br />skew_y - skew bar around y axis, default = 0<br />blocks - number of blocks to display for a bar (values >0) , default= 10<br />height - height of a block, default=10 pixels<br />width - width of a block, default=20 pixels<br />space - space between 2 blocks, default=2 pixels<br />angle_bar - this angle is used to draw a bar on a circular way (ok, this is no more a bar !) default=0<br />radius - for cicular bars, internal radius, default=0<br /> with radius, parameter width has no more effect.<br /><br />Colours below are defined into braces {colour in hexadecimal, alpha}<br />fg_colour - colour of a block ON, default= {0x00FF00,1}<br />bg_colour - colour of a block OFF, default = {0x00FF00,0.5}<br />alarm - threshold, values after this threshold will use alarm_colour colour , default=max<br />alarm_colour - colour of a block greater than alarm, default=fg_colour<br />smooth - (true or false), create a gradient from fg_colour to bg_colour, default=false <br />mid_colour - colours to add to gradient, with this syntax {position into the gradient (0 to1), colour hexa, alpha}<br /> for example, this table {{0.25,0xff0000,1},{0.5,0x00ff00,1},{0.75,0x0000ff,1}} will add<br /> 3 colours to gradient created by fg_colour and alarm_colour, default=no mid_colour<br />led_effect - add LED effects to each block, default=no led_effect<br /> if smooth=true, led_effect is not used<br /> possibles values : "r","a","e" for radial, parallel, perdendicular to the bar (just try!)<br /> led_effect has to be used with theses colours :<br />fg_led - middle colour of a block ON, default = fg_colour<br />bg_led - middle colour of a block OFF, default = bg_colour<br />alarm_led - middle colour of a block > ALARM, default = alarm_colour<br /><br />reflection parameters, not available for circular bars<br />reflection_alpha - add a reflection effect (values from 0 to 1) default = 0 = no reflection<br /> other values = starting opacity<br />reflection_scale - scale of the reflection (default = 1 = height of text)<br />reflection_length - length of reflection, define where the opacity will be set to zero<br /> values from 0 to 1, default =1<br />reflection - position of reflection, relative to a vertical bar, default="b"<br /> possibles values are : "b","t","l","r" for bottom, top, left, right<br />draw_me - if set to false, text is not drawn (default = true or 1)<br /> it can be used with a conky string, if the string returns 1, the text is drawn :<br /> example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",<br /><br />v1.0 (10 Feb. 2010) original release<br />v1.1 (13 Feb. 2010) numeric values can be passed instead conky stats with parameters name="", arg = numeric_value <br />v1.2 (28 Feb. 2010) just renamed the widget to bargraph<br />v1.3 (03 Mar. 2010) added parameters radius & angle_bar to draw the bar in a circular way<br />v2.0 (12 Jul. 2010) rewrite script + add reflection effects and parameters are now set into tables<br />v2.1 (07 Jan. 2011) Add draw_me parameter and correct memory leaks, thanks to "Creamy Goodness"<br /><br />-- This program is free software; you can redistribute it and/or modify<br />-- it under the terms of the GNU General Public License as published by<br />-- the Free Software Foundation version 3 (GPLv3)<br />-- <br />-- This program is distributed in the hope that it will be useful,<br />-- but WITHOUT ANY WARRANTY; without even the implied warranty of<br />-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br />-- GNU General Public License for more details.<br />-- <br />-- You should have received a copy of the GNU General Public License<br />-- along with this program; if not, write to the Free Software<br />-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,<br />-- MA 02110-1301, USA. <br /><br />]]<br /><br />require 'cairo'<br /><br />----------------START OF PARAMETERS ----------<br />function conky_main_bars()<br /> local bars_settings={<br /> { --[ Graph for CPU1 ]--<br /> name="cpu",<br /> arg="cpu1",<br /> max=100,<br /> alarm=50,<br /> alarm_colour={0xFF0000,0.72},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=242,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> { --[ Graph for CPU2 ]--<br /> name="cpu",<br /> arg="cpu2",<br /> max=100,<br /> alarm=50,<br /> alarm_colour={0xFF0000,0.72},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=258,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> { --[ Graph for CPU2 ]--<br /> name="cpu",<br /> arg="cpu3",<br /> max=100,<br /> alarm=50,<br /> alarm_colour={0xFF0000,0.72},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=273,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> { --[ Graph for CPU2 ]--<br /> name="cpu",<br /> arg="cpu4",<br /> max=100,<br /> alarm=50,<br /> alarm_colour={0xFF0000,0.72},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=289,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> { --[ Graph for Memory ]--<br /> name="memperc",<br /> arg="",<br /> max=100,<br /> alarm=50,<br /> alarm_colour={0xFF0000,0.72},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=305,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> { --[ Graph for Home ]--<br /> name="fs_used_perc",<br /> arg="/home",<br /> max=100,<br /> alarm=50,<br /> alarm_colour={0xFF0000,0.72},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=321,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> { --[ Graph for Swap ]--<br /> name="swapperc",<br /> arg="",<br /> max=100,<br /> alarm=50,<br /> alarm_colour={0xFF0000,0.72},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=337,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> { --[ Graph for hwmon temp 1 ]--<br /> name="hwmon 1 temp 1",<br /> arg="hwmon 1 temp 1",<br /> max=100,<br /> alarm=86,<br /> alarm_colour={0xFF0000,0.60},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=375,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> { --[ Graph for hwmon temp 1 ]--<br /> name="hwmon 2 temp 1",<br /> arg="hwmon 2 temp 1",<br /> max=100,<br /> alarm=86,<br /> alarm_colour={0xFF0000,0.60},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=394,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> { --[ Graph for hwmon temp 1 ]--<br /> name="hwmon 1 temp 2",<br /> arg="hwmon 1 temp 2",<br /> max=100,<br /> alarm=86,<br /> alarm_colour={0xFF0000,0.60},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=413,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> { --[ Graph for network ]--<br /> name="downspeedf",<br /> arg="ppp0",<br /> max=250,<br /> alarm=200,<br /> alarm_colour={0xFF0000,0.60},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=690,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> { --[ Graph for network ]--<br /> name="upspeedf",<br /> arg="ppp0",<br /> max=250,<br /> alarm=200,<br /> alarm_colour={0xFF0000,0.60},<br /> bg_colour={0xFFFFFF,0.13},<br /> fg_colour={0x00FF00,0.55},<br /> mid_colour={{0.45,0xFFFF00,0.70}},<br /> x=96,y=707,<br /> blocks=66,<br /> space=1,<br /> height=2,width=12,<br /> angle=90,<br /> smooth=true<br /> },<br /> } <br />-----------END OF PARAMETERS--------------<br /><br /><br /> <br /> if conky_window == nil then return end<br /> <br /> local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)<br /> <br /> cr = cairo_create(cs) <br /> --prevent segmentation error when reading cpu state<br /> if tonumber(conky_parse('${updates}'))>3 then<br /> for i in pairs(bars_settings) do<br /> <br /> draw_multi_bar_graph(bars_settings[i])<br /> <br /> end<br /> end<br /> cairo_destroy(cr)<br /> cairo_surface_destroy(cs)<br /> cr=nil<br /><br />end<br /><br /><br /><br />function draw_multi_bar_graph(t)<br /> cairo_save(cr)<br /> --check values<br /> if t.draw_me == true then t.draw_me = nil end<br /> if t.draw_me ~= nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end <br /> if t.name==nil and t.arg==nil then <br /> print ("No input values ... use parameters 'name' with 'arg' or only parameter 'arg' ") <br /> return<br /> end<br /> if t.max==nil then<br /> print ("No maximum value defined, use 'max'")<br /> return<br /> end<br /> if t.name==nil then t.name="" end<br /> if t.arg==nil then t.arg="" end<br /><br /> --set default values <br /> if t.x == nil then t.x = conky_window.width/2 end<br /> if t.y == nil then t.y = conky_window.height/2 end<br /> if t.blocks == nil then t.blocks=10 end<br /> if t.height == nil then t.height=10 end<br /> if t.angle == nil then t.angle=0 end<br /> t.angle = t.angle*math.pi/180<br /> --line cap style<br /> if t.cap==nil then t.cap = "b" end<br /> local cap="b"<br /> for i,v in ipairs({"s","r","b"}) do <br /> if v==t.cap then cap=v end<br /> end<br /> local delta=0<br /> if t.cap=="r" or t.cap=="s" then delta = t.height end<br /> if cap=="s" then cap = CAIRO_LINE_CAP_SQUARE<br /> elseif cap=="r" then<br /> cap = CAIRO_LINE_CAP_ROUND<br /> elseif cap=="b" then<br /> cap = CAIRO_LINE_CAP_BUTT<br /> end<br /> --end line cap style<br /> --if t.led_effect == nil then t.led_effect="r" end<br /> if t.width == nil then t.width=20 end<br /> if t.space == nil then t.space=2 end<br /> if t.radius == nil then t.radius=0 end<br /> if t.angle_bar == nil then t.angle_bar=0 end<br /> t.angle_bar = t.angle_bar*math.pi/360 --halt angle<br /> <br /> --colours<br /> if t.bg_colour == nil then t.bg_colour = {0x00FF00,0.5} end<br /> if #t.bg_colour~=2 then t.bg_colour = {0x00FF00,0.5} end<br /> if t.fg_colour == nil then t.fg_colour = {0x00FF00,1} end<br /> if #t.fg_colour~=2 then t.fg_colour = {0x00FF00,1} end<br /> if t.alarm_colour == nil then t.alarm_colour = t.fg_colour end<br /> if #t.alarm_colour~=2 then t.alarm_colour = t.fg_colour end<br /><br /> if t.mid_colour ~= nil then <br /> for i=1, #t.mid_colour do <br /> if #t.mid_colour[i]~=3 then <br /> print ("error in mid_color table")<br /> t.mid_colour[i]={1,0xFFFFFF,1} <br /> end<br /> end<br /> end<br /> <br /> if t.bg_led ~= nil and #t.bg_led~=2 then t.bg_led = t.bg_colour end<br /> if t.fg_led ~= nil and #t.fg_led~=2 then t.fg_led = t.fg_colour end<br /> if t.alarm_led~= nil and #t.alarm_led~=2 then t.alarm_led = t.fg_led end<br /> <br /> if t.led_effect~=nil then<br /> if t.bg_led == nil then t.bg_led = t.bg_colour end<br /> if t.fg_led == nil then t.fg_led = t.fg_colour end<br /> if t.alarm_led == nil then t.alarm_led = t.fg_led end<br /> end<br /> <br /><br /> if t.alarm==nil then t.alarm = t.max end --0.8*t.max end<br /> if t.smooth == nil then t.smooth = false end<br /><br /> if t.skew_x == nil then <br /> t.skew_x=0 <br /> else<br /> t.skew_x = math.pi*t.skew_x/180 <br /> end<br /> if t.skew_y == nil then <br /> t.skew_y=0<br /> else<br /> t.skew_y = math.pi*t.skew_y/180 <br /> end<br /> <br /> if t.reflection_alpha==nil then t.reflection_alpha=0 end<br /> if t.reflection_length==nil then t.reflection_length=1 end<br /> if t.reflection_scale==nil then t.reflection_scale=1 end<br /> <br /> --end of default values<br /> <br /><br /> local function rgb_to_r_g_b(col_a)<br /> return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]<br /> end<br /> <br /> <br /> --functions used to create patterns<br /><br /> local function create_smooth_linear_gradient(x0,y0,x1,y1)<br /> local pat = cairo_pattern_create_linear (x0,y0,x1,y1)<br /> cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))<br /> cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))<br /> if t.mid_colour ~=nil then<br /> for i=1, #t.mid_colour do<br /> cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))<br /> end<br /> end<br /> return pat<br /> end<br /><br /> local function create_smooth_radial_gradient(x0,y0,r0,x1,y1,r1)<br /> local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)<br /> cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))<br /> cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))<br /> if t.mid_colour ~=nil then<br /> for i=1, #t.mid_colour do<br /> cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))<br /> end<br /> end<br /> return pat<br /> end<br /> <br /> local function create_led_linear_gradient(x0,y0,x1,y1,col_alp,col_led)<br /> local pat = cairo_pattern_create_linear (x0,y0,x1,y1) ---delta, 0,delta+ t.width,0)<br /> cairo_pattern_add_color_stop_rgba (pat, 0.0, rgb_to_r_g_b(col_alp))<br /> cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))<br /> cairo_pattern_add_color_stop_rgba (pat, 1.0, rgb_to_r_g_b(col_alp))<br /> return pat<br /> end<br /><br /> local function create_led_radial_gradient(x0,y0,r0,x1,y1,r1,col_alp,col_led,mode)<br /> local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)<br /> if mode==3 then<br /> cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_alp)) <br /> cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))<br /> cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp)) <br /> else<br /> cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_led))<br /> cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp)) <br /> end<br /> return pat<br /> end<br /><br /><br /><br /><br /><br /><br /> local function draw_single_bar()<br /> --this fucntion is used for bars with a single block (blocks=1) but <br /> --the drawing is cut in 3 blocks : value/alarm/background<br /> --not zvzimzblr for circular bar<br /> local function create_pattern(col_alp,col_led,bg)<br /> local pat<br /> <br /> if not t.smooth then<br /> if t.led_effect=="e" then<br /> pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)<br /> elseif t.led_effect=="a" then<br /> pat = create_led_linear_gradient (t.width/2, 0,t.width/2,-t.height,col_alp,col_led)<br /> elseif t.led_effect=="r" then<br /> pat = create_led_radial_gradient (t.width/2, -t.height/2, 0, t.width/2,-t.height/2,t.height/1.5,col_alp,col_led,2)<br /> else<br /> pat = cairo_pattern_create_rgba (rgb_to_r_g_b(col_alp))<br /> end<br /> else<br /> if bg then<br /> pat = cairo_pattern_create_rgba (rgb_to_r_g_b(t.bg_colour))<br /> else<br /> pat = create_smooth_linear_gradient(t.width/2, 0, t.width/2,-t.height)<br /> end<br /> end<br /> return pat<br /> end<br /> <br /> local y1=-t.height*pct/100<br /> local y2,y3<br /> if pct>(100*t.alarm/t.max) then <br /> y1 = -t.height*t.alarm/100<br /> y2 = -t.height*pct/100<br /> if t.smooth then y1=y2 end<br /> end<br /> <br /> if t.angle_bar==0 then<br /> <br /> --block for fg value<br /> local pat = create_pattern(t.fg_colour,t.fg_led,false)<br /> cairo_set_source(cr,pat)<br /> cairo_rectangle(cr,0,0,t.width,y1)<br /> cairo_fill(cr)<br /> cairo_pattern_destroy(pat)<br /> <br /> -- block for alarm value <br /> if not t.smooth and y2 ~=nil then <br /> pat = create_pattern(t.alarm_colour,t.alarm_led,false)<br /> cairo_set_source(cr,pat)<br /> cairo_rectangle(cr,0,y1,t.width,y2-y1)<br /> cairo_fill(cr)<br /> y3=y2<br /> cairo_pattern_destroy(pat)<br /> else<br /> y2,y3=y1,y1<br /> end<br /> -- block for bg value<br /> cairo_rectangle(cr,0,y2,t.width,-t.height-y3)<br /> pat = create_pattern(t.bg_colour,t.bg_led,true)<br /> cairo_set_source(cr,pat)<br /> cairo_pattern_destroy(pat)<br /> cairo_fill(cr)<br /> end <br /> end --end single bar<br /> <br /><br /><br /><br /><br /><br /> local function draw_multi_bar()<br /> --function used for bars with 2 or more blocks<br /> for pt = 1,t.blocks do <br /> --set block y<br /> local y1 = -(pt-1)*(t.height+t.space)<br /> local light_on=false<br /> <br /> --set colors<br /> local col_alp = t.bg_colour<br /> local col_led = t.bg_led<br /> if pct>=(100/t.blocks) or pct>0 then --ligth on or not the block<br /> if pct>=(pcb*(pt-1)) then <br /> light_on = true<br /> col_alp = t.fg_colour<br /> col_led = t.fg_led<br /> if pct>=(100*t.alarm/t.max) and (pcb*pt)>(100*t.alarm/t.max) then <br /> col_alp = t.alarm_colour <br /> col_led = t.alarm_led <br /> end<br /> end<br /> end<br /><br /> --set colors<br /> --have to try to create gradients outside the loop ?<br /> local pat <br /> <br /> if not t.smooth then<br /> if t.angle_bar==0 then<br /> if t.led_effect=="e" then<br /> pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)<br /> elseif t.led_effect=="a" then<br /> pat = create_led_linear_gradient (t.width/2, -t.height/2+y1,t.width/2,0+t.height/2+y1,col_alp,col_led) <br /> elseif t.led_effect=="r" then<br /> pat = create_led_radial_gradient (t.width/2, y1, 0, t.width/2,y1,t.width/1.5,col_alp,col_led,2) <br /> else<br /> pat = cairo_pattern_create_rgba (rgb_to_r_g_b(col_alp))<br /> end<br /> else<br /> if t.led_effect=="a" then<br /> pat = create_led_radial_gradient (0, 0, t.radius+(t.height+t.space)*(pt-1),<br /> 0, 0, t.radius+(t.height+t.space)*(pt), <br /> col_alp,col_led,3) <br /> else<br /> pat = cairo_pattern_create_rgba (rgb_to_r_g_b(col_alp)) <br /> end<br /> <br /> end<br /> else<br /> <br /> if light_on then<br /> if t.angle_bar==0 then<br /> pat = create_smooth_linear_gradient(t.width/2, t.height/2, t.width/2,-(t.blocks-0.5)*(t.height+t.space))<br /> else<br /> pat = create_smooth_radial_gradient(0, 0, (t.height+t.space), 0,0,(t.blocks+1)*(t.height+t.space),2)<br /> end<br /> else <br /> pat = cairo_pattern_create_rgba (rgb_to_r_g_b(t.bg_colour))<br /> end<br /> end<br /> cairo_set_source (cr, pat)<br /> cairo_pattern_destroy(pat)<br /><br /> --draw a block<br /> if t.angle_bar==0 then<br /> cairo_move_to(cr,0,y1)<br /> cairo_line_to(cr,t.width,y1)<br /> else <br /> cairo_arc( cr,0,0,<br /> t.radius+(t.height+t.space)*(pt)-t.height/2,<br /> -t.angle_bar -math.pi/2 ,<br /> t.angle_bar -math.pi/2)<br /> end<br /> cairo_stroke(cr)<br /> end <br /> end<br /> <br /> <br /> <br /> <br /> local function setup_bar_graph()<br /> --function used to retrieve the value to display and to set the cairo structure<br /> if t.blocks ~=1 then t.y=t.y-t.height/2 end<br /> <br /> local value = 0<br /> if t.name ~="" then<br /> value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))<br /> --$to_bytes doesn't work when value has a decimal point,<br /> --https://garage.maemo.org/plugins/ggit/browse.php/?p=monky;a=commitdiff;h=174c256c81a027a2ea406f5f37dc036fac0a524b;hp=d75e2db5ed3fc788fb8514121f67316ac3e5f29f<br /> --http://sourceforge.net/tracker/index.php?func=detail&aid=3000865&group_id=143975&atid=757310<br /> --conky bug?<br /> --value = (conky_parse(string.format('${%s %s}', t.name, t.arg)))<br /> --if string.match(value,"%w") then<br /> -- value = conky_parse(string.format('${to_bytes %s}',value))<br /> --end<br /> else<br /> value = tonumber(t.arg)<br /> end<br /><br /> if value==nil then value =0 end<br /> <br /> pct = 100*value/t.max<br /> pcb = 100/t.blocks<br /> <br /> cairo_set_line_width (cr, t.height)<br /> cairo_set_line_cap (cr, cap)<br /> cairo_translate(cr,t.x,t.y)<br /> cairo_rotate(cr,t.angle)<br /><br /> local matrix0 = cairo_matrix_t:create()<br /> tolua.takeownership(matrix0)<br /> cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)<br /> cairo_transform(cr,matrix0)<br /><br /> <br /> <br /> --call the drawing function for blocks<br /> if t.blocks==1 and t.angle_bar==0 then<br /> draw_single_bar()<br /> if t.reflection=="t" or t.reflection=="b" then cairo_translate(cr,0,-t.height) end<br /> else<br /> draw_multi_bar()<br /> end<br /><br /> --dot for reminder<br /> --[[<br /> if t.blocks ~=1 then<br /> cairo_set_source_rgba(cr,1,0,0,1)<br /> cairo_arc(cr,0,t.height/2,3,0,2*math.pi)<br /> cairo_fill(cr)<br /> else<br /> cairo_set_source_rgba(cr,1,0,0,1)<br /> cairo_arc(cr,0,0,3,0,2*math.pi)<br /> cairo_fill(cr)<br /> end]]<br /> <br /> --call the drawing function for reflection and prepare the mask used <br /> if t.reflection_alpha>0 and t.angle_bar==0 then<br /> local pat2<br /> local matrix1 = cairo_matrix_t:create()<br /> tolua.takeownership(matrix1)<br /> if t.angle_bar==0 then<br /> pts={-delta/2,(t.height+t.space)/2,t.width+delta,-(t.height+t.space)*(t.blocks)}<br /> if t.reflection=="t" then<br /> cairo_matrix_init (matrix1,1,0,0,-t.reflection_scale,0,-(t.height+t.space)*(t.blocks-0.5)*2*(t.reflection_scale+1)/2)<br /> pat2 = cairo_pattern_create_linear (t.width/2,-(t.height+t.space)*(t.blocks),t.width/2,(t.height+t.space)/2)<br /> elseif t.reflection=="r" then<br /> cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,delta+2*t.width,0)<br /> pat2 = cairo_pattern_create_linear (delta/2+t.width,0,-delta/2,0)<br /> elseif t.reflection=="l" then<br /> cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,-delta,0)<br /> pat2 = cairo_pattern_create_linear (-delta/2,0,delta/2+t.width,-0)<br /> else --bottom<br /> cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(t.height+t.space)*(t.reflection_scale+1)/2)<br /> pat2 = cairo_pattern_create_linear (t.width/2,(t.height+t.space)/2,t.width/2,-(t.height+t.space)*(t.blocks))<br /> end<br /> end<br /> cairo_transform(cr,matrix1)<br /><br /> if t.blocks==1 and t.angle_bar==0 then<br /> draw_single_bar()<br /> cairo_translate(cr,0,-t.height/2) <br /> else<br /> draw_multi_bar()<br /> end<br /> <br /> <br /> cairo_set_line_width(cr,0.01)<br /> cairo_pattern_add_color_stop_rgba (pat2, 0,0,0,0,1-t.reflection_alpha)<br /> cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)<br /> if t.angle_bar==0 then<br /> cairo_rectangle(cr,pts[1],pts[2],pts[3],pts[4])<br /> end<br /> cairo_clip_preserve(cr)<br /> cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)<br /> cairo_stroke(cr)<br /> cairo_mask(cr,pat2)<br /> cairo_pattern_destroy(pat2)<br /> cairo_set_operator(cr,CAIRO_OPERATOR_OVER)<br /> <br /> end --reflection<br /> pct,pcb=nil<br /> end --setup_bar_graph()<br /> <br /> --start here !<br /> setup_bar_graph()<br /> cairo_restore(cr)<br />end</span></span><br />
#<br />
<br />
put .conkyrc in home folder, make it executable<br />
put bargraph_small.lua anywhere you like, but make sure you got the path right.<br />
make sure you got the right font....please refer to your <i>.conkyrc</i><br />
<br />
I didn't fully make it perfect so please edit it to suit you needs.<br />
Enjoy.<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>AkuBuntuhttp://www.blogger.com/profile/13483680561608995044noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-52789796878246836592013-07-12T21:41:00.000-07:002013-07-12T21:43:00.983-07:00Varnish CacheVarnish is a web application accelerator. You install it in front of your web application and it will speed it up significantly.<br />
<br />
Installation on Ubuntu<br />
<br />
<br />
Varnish is distributed in the Ubuntu package repositories, but the version there might be out of date, and we generally recommend using the packages provided by varnish-cache.org. Please be advised that we only provide packages for Ubuntu's LTS releases, not all the intermediate releases. Note that the packages might still work fine on newer releases.<br />
<br />
To use the varnish-cache.org repository, do the following<br />
<br />
<em>curl http://repo.varnish-cache.org/debian/GPG-key.txt | sudo apt-key add -</em><br />
<em>echo "deb http://repo.varnish-cache.org/ubuntu/ precise varnish-3.0" | sudo tee -a /etc/apt/sources.list</em><br />
<em>sudo apt-get update</em><br />
<em>sudo apt-get install varnish</em><br />
<br />
If you want to install the older 2.1 version, replace varnish-3.0 with varnish-2.1 in the command above.<br />
<br />
<br />
https://www.varnish-cache.org<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com1tag:blogger.com,1999:blog-8823294493187598017.post-58228844827397523272013-06-12T01:42:00.001-07:002013-06-12T01:42:40.993-07:00How to auto-close the terminal after a certain period of inactivityI will show you a little trick to close the terminal automatically after
a certain period of inactivity. The trick is very simple, just use any
text editor ( as root) to open the file /etc/profile, in Ubuntu or Linux
Mint Cinnamon, the command will be:<br />
<br />
<i>sudo gedit /etc/profile</i> <br />
<br />
Once the file is open, just append the following lines to the end of the file:<br />
<br />
<i>TMOUT=seconds <br /> export TMOUT</i><br />
<br />
Change the "seconds" in the variable part of TMOUT to any number you
prefer, this is the maximum idling time the terminal can last before
getting closed. I will use 200 as the example here, just add the lines
into the end of the file /etc/profile like this: <span id="goog_1340704944"></span><span id="goog_1340704945"></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-cmgvLPs3hZE/UbgykPVPBEI/AAAAAAAAA8k/S0ijtBYxm9A/s1600/2013-06-11-212926_490x401_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="261" src="http://2.bp.blogspot.com/-cmgvLPs3hZE/UbgykPVPBEI/AAAAAAAAA8k/S0ijtBYxm9A/s320/2013-06-11-212926_490x401_scrot.png" width="320" /></a></div>
Then save the file and close the text editor. After that, run the
following command to apply the new change and your terminal will be
automatically closed after 200 seconds of inactivity:<br />
<br />
<i> source /etc/profile</i><div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-42767442936491213732013-05-03T12:14:00.002-07:002013-05-03T12:14:41.672-07:00Ubuntu Dark Themes Fixs For Mozilla FirefoxHere is a <a href="http://userstyles.org/styles/75467/high-contrast-inverse-google-fix" rel="nofollow">userstyle for Stylish</a> that implements the CSS fix.<br />
<br />
Install both of it.<br />
<br />
Open Firefox --> Tools ---> Adds-on ---> User Styles ----> High Contrast Inverse Google Fix ----> Edit<br />
<br />
Replace content<br />
@-moz-document domain(google.com)<br />
{ input
{
-moz-appearance: none !important;
color: #000000 !important;
}
}<br />
<br />
with this<br />
<pre><code>input[type="text"],
input[type="password"],
textarea
{
-moz-appearance: none !important;
background: white;
color: black;
border-radius: 5px;
border: 1px solid #BBB;
background-color: white;
padding: 3px;
color: black;
}</code></pre>
<pre><code>Save.</code></pre>
<pre><code> </code></pre>
<pre><code>Enjoy the new look.</code></pre>
<pre><code> </code></pre>
<pre><code><a href="http://askubuntu.com/questions/183564/high-contrast-theme-firefox-problem" target="_blank">source </a></code></pre>
<pre><code> </code></pre>
<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>AkuBuntuhttp://www.blogger.com/profile/13483680561608995044noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-33284683705672018562013-03-25T11:39:00.002-07:002013-03-25T12:28:38.775-07:00Make Your PDF File Smaller<div id="content" lang="en">
<h1>
Shrinkpdf: shrink PDF files with Ghostscript</h1>
The simplest shell script in the world to shrink your PDFs (as in reduce filesize)
under Linux with Ghostscript. Inspired by some code I found in an OpenOffice Python
script (I think). It feeds an existing PDF through Ghostscript, downsamples the images
to 72dpi, and does some other stuff. Pretty straightforward.<br />
<br />
<div class="scriptfile">
<a href="http://www.alfredklomp.com/programming/shrinkpdf/shrinkpdf.sh">shrinkpdf.sh</a><br />
<br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: small;"><i> #!/bin/sh
gs -q -dNOPAUSE -dBATCH -dSAFER \
-sDEVICE=pdfwrite \
-dCompatibilityLevel=1.3 \
-dPDFSETTINGS=/screen \
-dEmbedAllFonts=true \
-dSubsetFonts=true \
-dColorImageDownsampleType=/Bicubic \
-dColorImageResolution=<span style="color: red;">72</span> \
-dGrayImageDownsampleType=/Bicubic \
-dGrayImageResolution=<span style="color: red;">72</span> \
-dMonoImageDownsampleType=/Bicubic \
-dMonoImageResolution=<span style="color: red;">72</span> \
-sOutputFile=out.pdf \
$1</i></span>
</pre>
Usage</div>
Download the script by clicking the filename at the top of the box.<br />
If it's not downloading just right click and 'save link as', make sure the file are in 'home' folder.<br />
<br />
Then run:<br />
<br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><code>sh shrinkpdf.sh yourfile.pdf</code></pre>
This produces a shrunken file named <code>out.pdf</code> in the current directory.<br />
Sorry, Windows users; this one is Linux only. Ghostscript does run under Windows, but
I don't know much about Windows scripting. You could try typing all these parameters on
the commandline by hand.<br />
<br />
You can increase the quality by changing the '<span style="color: red;">72</span>' number in the script to what ever number you want (ex: 120) for better image quality.<br />
<br />
Good Luck. <br />
<br />
Credit goes to http://www.alfredklomp.com/programming/shrinkpdf/</div>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-8696063787942637";
/* xtrabuntu */
google_ad_slot = "3660712079";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>AkuBuntuhttp://www.blogger.com/profile/13483680561608995044noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-9468549554817105732013-03-23T13:00:00.002-07:002013-03-23T13:04:30.338-07:00Faster Boot Time Ubuntu 12.04<span style="font-family: inherit; font-size: large;"><b>1)Remove unwanted Startup Application</b></span><br />
<span style="font-size: large;">(most of info recomend this)</span><br />
<span style="font-size: large;">make hidden startup applications visible in the manager</span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: large;"><i><code>sudo sed -i ‘s/NoDisplay=true/NoDisplay=false/g’ /etc/xdg/autostart/*.desktop</code></i></span></pre>
<span style="font-family: inherit; font-size: large;">Click the Start Menu.</span><br />
<span style="font-family: inherit; font-size: large;">Click Startup Applications...</span><br />
<span style="font-family: inherit; font-size: large;">Uncheck any unwanted application </span><br />
<span style="font-family: inherit; font-size: large;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><a href="http://4.bp.blogspot.com/-_j1JinNUrMc/UU4HET3sFsI/AAAAAAAAB8Y/JMpCMnD_Y04/s1600/Screenshot+from+2013-03-24+03:45:36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-_j1JinNUrMc/UU4HET3sFsI/AAAAAAAAB8Y/JMpCMnD_Y04/s320/Screenshot+from+2013-03-24+03:45:36.png" width="262" /></a></span></div>
<span style="font-family: inherit; font-size: large;"> <b> </b></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><b>2)Speed Up Ubuntu Booting Time via Grub</b></span><br />
<span style="font-family: inherit; font-size: large;"><a href="http://www.ubuntubuzz.com/2012/01/how-to-increasespeed-up-ubuntu-booting.html" target="_blank">(Source = Ubuntubuzz)</a><br />here's to do it, open your grub configuration file (/etc/default/grub) and find this line GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”, do as follows :</span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-family: inherit; font-size: large;"><span class="Apple-style-span"><i>sudo gedit /etc/default/grub
</i></span></span></pre>
<span style="font-family: inherit; font-size: large;">replace </span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-family: inherit; font-size: large;">GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”</span></pre>
<span style="font-family: inherit; font-size: large;"> with </span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-family: inherit; font-size: large;"><span class="Apple-style-span"><i>GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash profile”
</i></span></span></pre>
<span style="font-family: inherit; font-size: large;">save and exit</span><br />
<span style="font-size: large;"><br /></span>
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: large;"><i><span style="font-family: inherit;">sudo update-grub2</span></i></span></pre>
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-family: inherit; font-size: large;"><i>sudo reboot</i></span></pre>
<span style="font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">Grub does a search for all the necessary drivers to load, Instead of making Grub search for required drivers, the profiling actually makes Grub remember every necessary driver to work, This action will cutting down all of the driver load times. <br /><br />after your system up, edit /etc/default/grub and remove some option which we have added before.</span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-family: inherit; font-size: large;"><span class="Apple-style-span"><i>sudo gedit /etc/default/grub</i></span></span></pre>
<span style="font-family: inherit; font-size: large;"> replace </span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: large;"><i><span style="font-family: inherit;">GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash profile”</span></i></span></pre>
<span style="font-family: inherit; font-size: large;">with</span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-family: inherit; font-size: large;"><i>GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”</i></span></pre>
<span style="font-family: inherit; font-size: large;">save and exit</span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: large;"><i><span style="font-family: inherit;">sudo update-grub2</span></i></span></pre>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><b>3)Disabling Hibernation Option</b></span><br />
<span style="font-size: large;"><a href="http://www.ossdoc.com/2012/11/how-to-speed-up-computer-on-ubuntu-1204.html" target="_blank">(source=ossdoc)</a></span><br />
<span style="font-size: large;">To disable Hibernation menu type this command:</span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: large;"><i><span style="font-family: inherit;"> sudo gedit /etc/initramfs-tools/conf.d/resume</span></i></span></pre>
<span style="font-size: large;">it will open the editor. Disable hibernation by adding hastag (#) before the line. See this sample:</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">Before:</span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: large;"><i>RESUME=UUID=7c53534d-2a6f-49de-b825-74106a681594</i></span></pre>
<span style="font-size: large;">After:</span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: large;"><i>#RESUME=UUID=7c53534d-2a6f-49de-b825-74106a681594</i></span></pre>
<span style="font-size: large;">Close and save the editor. Hibernation is disabled.</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><b>4) Disabling Grub Menu</b><br />
Disabling grub menu will speed up your computer. You have to set grub time out value as 0. Type this command on Your terminal:</span>
<br />
<blockquote class="tr_bq">
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-family: inherit; font-size: large;"><span class="Apple-style-span"><i>sudo gedit /etc/default/grub</i></span></span></pre>
</blockquote>
<span style="font-family: inherit; font-size: large;">
</span>
<br />
<span style="font-family: inherit; font-size: large;">
</span>
<br />
<div>
<span style="font-family: inherit; font-size: large;">
when the editor opened, set GRUB_TIMEOUT value as 0. Close and save.</span></div>
<span style="font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;"><b><br /><span style="line-height: 18px; text-align: left;">Adjust Your Swappiness </span></b></span>
<br />
<div style="text-align: left;">
<span style="font-family: inherit; font-size: large;"><span style="line-height: 18px;">First, chek your swappinnes. The default value is 60. check it using this command: </span></span></div>
<div style="text-align: left;">
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-family: inherit; font-size: large;"><span style="line-height: 18px;">cat /proc/sys/vm/swappiness</span></span></pre>
</div>
<span style="font-family: inherit; font-size: large;"><span style="line-height: 18px;">open your editor and edit the value. try this command to edit:</span></span><br />
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: large;"><i><span style="font-family: inherit;"><span style="line-height: 18px;">sudo gedit /etc/sysctl.conf</span></span> </i></span></pre>
<blockquote class="tr_bq">
<span style="font-family: inherit; font-size: large;"><span style="line-height: 18px;">add this line to into the file:</span></span></blockquote>
<pre class="code" style="border: 1px dashed rgb(216, 216, 216); margin: 0px 0px 1em; overflow: auto; padding: 0.5em; text-align: left;"><span style="font-size: large;"><i><span style="font-family: inherit;"><span style="line-height: 18px;">vm.swappiness=10</span></span></i></span></pre>
<span style="font-size: large;"><br /></span>
<span style="font-family: inherit; font-size: large;">That's it. Good luck.</span><div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>AkuBuntuhttp://www.blogger.com/profile/13483680561608995044noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-67581559799031463972013-03-06T08:15:00.002-07:002013-03-06T08:15:48.021-07:00CPU-G ANOTHER CPU-Z ON UBUNTU<span style="line-height: 20.766666412353516px;"><span style="font-family: Georgia, Times New Roman, serif;">You must have known CPU-z, a windows application that lets you to find out Hardware information of your system. Now we have similar application named CPU-G with actually have same function and 'interface' that's run on ubuntu.</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-JGqw53xwAlA/UTdZ_4XwhZI/AAAAAAAAA6A/VxivDrQOUKM/s1600/cpu-g.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" src="http://3.bp.blogspot.com/-JGqw53xwAlA/UTdZ_4XwhZI/AAAAAAAAA6A/VxivDrQOUKM/s1600/cpu-g.PNG" /></span></a></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both;">
<span style="color: red; font-family: Georgia, Times New Roman, serif;"><b>How to install CPU-G on Ubuntu</b></span></div>
<div class="separator" style="clear: both;">
<span style="color: red; font-family: Georgia, Times New Roman, serif;"><br /></span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Georgia, Times New Roman, serif;">First before you install it, download CPU-z source installer (*.deb) here, wait until download process finish, go to CPU-G download directory then type following command in your terminal</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Georgia, Times New Roman, serif;"> </span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Georgia, Times New Roman, serif;"> sudo dpkg -i cpu-g_0.9.0_i386.deb </span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Georgia, Times New Roman, serif;"> sudo apt-get -f install </span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Georgia, Times New Roman, serif;">change "cpu-g_0.9.0_i386.deb" with CPU-G file installer you have download.</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Georgia, Times New Roman, serif;"><br /></span></div>
<div class="separator" style="clear: both;">
<span style="color: red; font-family: Georgia, Times New Roman, serif;"><b>How to run CPU-G on Ubuntu</b></span></div>
<div class="separator" style="clear: both;">
<b><span style="font-family: Georgia, Times New Roman, serif;"><br /></span></b></div>
<div class="separator" style="clear: both;">
<span style="font-family: Georgia, Times New Roman, serif;">How to install it is quiet simple, open your terminal or type ALT + F2. then type "cpu-g" there. The CPU-G should running on. [thanks to tahutek.net]</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Arial, Helvetica, sans-serif;">source http://www.ubuntubuzz.com/</span></div>
<br />
<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-62285539878267231352013-02-16T00:40:00.000-07:002013-02-16T00:40:15.812-07:00Garuda OsIndonesia original OS, sorry i brought the whole site here<br />
<br />
<iframe align="center" frameborder="no" height="4200px" name="fullcircle" scrolling="auto" src="http://omrois.blogspot.com/2012/08/garuda-os-sistem-operasi-asli-buatan.html" width="830px"></iframe><div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>AkuBuntuhttp://www.blogger.com/profile/13483680561608995044noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-54551214363284548492013-02-13T02:45:00.001-07:002013-02-13T02:45:49.433-07:00Ubuntu 13.04 Raring Ringtail on a Multitouch Screen Monitor<iframe width="640" height="360" src="http://www.youtube.com/embed/Vp8_jetKEu8?feature=player_detailpage" frameborder="0" allowfullscreen></iframe><div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-62424660253966359542013-01-19T06:32:00.001-07:002013-01-19T06:33:37.470-07:00Unity Changes - Ubuntu 13.04<centre><iframe allowfullscreen="allowfullscreen" frameborder="0" height="360" src="http://www.youtube.com/embed/JtbvStm0Sp8?feature=player_detailpage" width="640"></iframe><centre></centre></centre><br />
<div style="text-align: center;">
<br /></div>
<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-6861068579328270212013-01-13T20:25:00.001-07:002013-01-13T20:25:27.847-07:00How to customize the font and color of the panel clock in Ubuntu and Linux Mint MateIf you are using the Mate edition of Linux Mint ( either 13 or 14), the default clock at the right corner will look like this<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Vlf1Z6cvekY/UPN5htT1MqI/AAAAAAAAA5U/4xDIayjWUXA/s1600/2013-01-10-200850_194x34_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-Vlf1Z6cvekY/UPN5htT1MqI/AAAAAAAAA5U/4xDIayjWUXA/s320/2013-01-10-200850_194x34_scrot.png" height="34" width="194" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
I will show you a small trick to change the font and color of this clock widget to make it look somehow like this: <span id="goog_873885953"></span><span id="goog_873885954"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-wwG4p3TImww/UPN58tFLsCI/AAAAAAAAA5k/JhFAReRWKkQ/s1600/2013-01-10-200810_191x42_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-wwG4p3TImww/UPN58tFLsCI/AAAAAAAAA5k/JhFAReRWKkQ/s1600/2013-01-10-200810_191x42_scrot.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
The trick is pretty simple. First, you will need to get the Digital font. Just <a href="http://www.dafont.com/ds-digital.font?text=digital" target="_blank">download it here</a> then install it.<br />
<br />
Next, create a file named .gtkrc-2.0 in the home folder and copy-paste the following lines into it:<br />
</div>
<pre style="background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> style "my-panel-clock"
{
fg[NORMAL] = "#272727"
font_name = "DS-Digital Bold 12"
}
widget "*.clock-applet-button.*" style "my-panel-clock"
</code></pre>
<br />
After that, just hit Alt+F2 and run the following command to reset the bottom panel:<br />
<pre style="background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> pkill mate-panel
</code></pre>
<br />
<b style="color: red;">Note:</b> You can edit the font, size and the color code in the .gtkrc-2.0 file to meet your preference.<img height="1" src="http://feeds.feedburner.com/%7Er/LinuxAndLife/%7E4/jhpYU5XGj7c" width="1" /><br />
<div class="separator" style="clear: both; text-align: left;">
<br />
<a href="http://1.bp.blogspot.com/-wwG4p3TImww/UPN58tFLsCI/AAAAAAAAA5k/JhFAReRWKkQ/s1600/2013-01-10-200810_191x42_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br />
<a href="http://1.bp.blogspot.com/-wwG4p3TImww/UPN58tFLsCI/AAAAAAAAA5k/JhFAReRWKkQ/s1600/2013-01-10-200810_191x42_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<div class="separator" style="clear: both; text-align: left;">
source: http://www.linuxandlife.com/<br />
<a href="http://1.bp.blogspot.com/-wwG4p3TImww/UPN58tFLsCI/AAAAAAAAA5k/JhFAReRWKkQ/s1600/2013-01-10-200810_191x42_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-70925126224087111082012-12-10T20:04:00.001-07:002012-12-10T20:04:20.253-07:00Ubuntu Got 2 Windows 7 (loader) entries in Grub2<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<h3>
What was the cause of the problem:</h3>
Grub2 looks for the Windows boot files for detecting Windows entries.
Though you removed Windows 7, the Windows 7 boot files aren't removed
(which are "Boot" folder and "bootmgr" file). And as Windows 7 boot
files are there, grub2 simply assumes that, there are Windows 7
installation also. Hence the dual entry.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-B-mtDsI41oY/UMafEA9FGgI/AAAAAAAABr0/cGmeNwRLElU/s1600/grub2-dual-boot-in-grub2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-B-mtDsI41oY/UMafEA9FGgI/AAAAAAAABr0/cGmeNwRLElU/s320/grub2-dual-boot-in-grub2.png" width="320" /></a></div>
<br />
<br />
<br />
<br />
<br />
You should find what you're looking for inside of <code>/boot/grub/grub.cfg</code>. This file is dynamically generated by <code>update-grub2</code>. I am dual booting Ubuntu 32bit and 64bit. If I wanted to remove one, I would simply delete it's section from this file.<br />
<br />
<br />
<pre><code>menuentry 'Ubuntu, with Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
</code>### BEGIN /etc/grub.d/30_os-prober ###</pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre>menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root C08C7F598C7F4944
chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sda2)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root C08C7F598C7F4944
chainloader +1
}
menuentry "Windows Recovery Environment (loader) (on /dev/sda4)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set=root C22A7EEA2A7EDB3D
drivemap -s (hd0) ${root}
chainloader +1</pre>
<br />
<br />
Changes should take effect immediately, so make a backup and be careful.
Also, anything you change in this file will be completely over written
if you run <code>update-grub2</code> again.<br />
<br />
make sure you're delete the right one or you'll be sorry...<br />
<br />
OR<br />
<br />
<br />
Mount the <code>/dev/sda1</code> drive<em></em>. Then in that drive look for a folder named <code>Boot</code> and a file named <code>bootmgr</code>. Remove both the folder and file. Then run <code>update-grub2</code> command again.<br />
You might want to install grub2 again. As I see your Ubuntu installation is at <code>/dev/sdb</code>, the commands will be<br />
<br />
<pre><code>sudo grub-install /dev/sdb
sudo update-grub
</code></pre>
<br />
<br />
Bye..<br />
<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>AkuBuntuhttp://www.blogger.com/profile/13483680561608995044noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-12464625607973028442012-12-03T00:02:00.000-07:002012-12-03T00:02:00.704-07:00 Open the terminal in a specific size and position in Ubuntu/ Linux Mint <span style="font-size: small;"><span style="font-family: inherit;">In Ubuntu or Linux Mint and many other distros, when you open the
terminal, the window will appear at the top left corner of the desktop
screen and I usually have to drag it down to the bottom left of the
desktop. If you dont like the default position and size of the start up
window, you can edit it easily.</span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span>
<br />
<span style="font-size: small;"><span style="font-family: inherit;">There are in fact many methods to customize the start up position of the
terminal, but in this article I will show you a simple way to do the
task without installing anything. In Ubuntu or Linux Mint Cinnamon, just
open the terminal and run the following command:</span></span><br />
<br />
<pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><span style="font-size: small;"><span style="font-family: inherit;"><code style="color: black; word-wrap: normal;">sudo gnome-desktop-item-edit /usr/share/applications/gnome-terminal.desktop</code></span></span></pre>
<br />
<span style="font-size: small;"><span style="font-family: inherit;">If you use MATE, the command will be</span></span><br />
<br />
<pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><span style="font-size: small;"><span style="font-family: inherit;"><code style="color: black; word-wrap: normal;">sudo mate-desktop-item-edit /usr/share/applications/mate-terminal.desktop</code></span></span></pre>
<br />
<span style="font-size: small;"><span style="font-family: inherit;">After you hit enter, you will see the properties window of the launcher for the terminal.<br /><span id="goog_320448486"></span><span id="goog_320448487"></span>
</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><span style="font-family: inherit;"><a href="http://4.bp.blogspot.com/-wTc8yqUiQ1Y/ULr6nAR4SDI/AAAAAAAAA4s/eGS3XNWCU2s/s1600/Screenshot-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-wTc8yqUiQ1Y/ULr6nAR4SDI/AAAAAAAAA4s/eGS3XNWCU2s/s1600/Screenshot-1.png" height="140" width="320" /></a></span></span></div>
<span style="font-size: small;"><span style="font-family: inherit;">In the command tab, just append this option after the part "mate-terminal" (or "gnome-terminal"):</span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"> </span></span><br />
<pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><span style="font-size: small;"><span style="font-family: inherit;"><code style="color: black; word-wrap: normal;">--geometry=100x50+800+300</code></span></span></pre>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"> What this means:<br />
100: the width of the terminal ( in characters)<br />
50: the height ( in lines)<br />
800: x position of the terminal when you open it up<br />
300: y position</span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: inherit;">Just change the numbers into whatever values you prefer then click on
the Close button and everything is done. Next time you open the
terminal, the terminal window will appear at the new position instead of
the top left corner of the desktop screen </span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;">source http://www.linuxandlife.com</span></span><div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-51441329844453900762012-12-01T23:40:00.001-07:002012-12-01T23:40:58.050-07:00Easy way to download Potenza and installPotenza was updated on Gnome-look two days ago and this icon set has
been rated positively. All icons in this set have a squircular shape and
the bright colors make Potenza go together with dark GTK themes very
well.<br />
<br />
Here are some screenshots of Pontenza<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-OHis6KxVwXE/ULr2dnf1KcI/AAAAAAAAA4Q/3pLNveFK1iU/s1600/2012-11-29-212413_1366x768_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-OHis6KxVwXE/ULr2dnf1KcI/AAAAAAAAA4Q/3pLNveFK1iU/s1600/2012-11-29-212413_1366x768_scrot.png" height="224" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-1gZxh8mPjUs/ULr2frHkcAI/AAAAAAAAA4Y/6V1GQEqI7OU/s1600/2012-11-29-212455_1366x768_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-1gZxh8mPjUs/ULr2frHkcAI/AAAAAAAAA4Y/6V1GQEqI7OU/s1600/2012-11-29-212455_1366x768_scrot.png" height="224" width="320" /></a></div>
This is an easy way to download and install<br />
<ul>
<li><span style="font-family: "Trebuchet MS",sans-serif;"><i>sudo wget http://mystras.cloudfactory.eu/Downloads/Potenza.deb</i></span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;"><i>sudo dpkg -i Potenza*</i></span> </li>
<li><span style="font-family: "Trebuchet MS",sans-serif;"><i>sudo apt-get install -f</i></span></li>
</ul>
<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-29613093712685957492012-10-25T22:43:00.004-07:002012-10-25T22:43:51.069-07:00How To Setup Static DNS Servers in UbuntuTo get started, press <strong><span style="font-size: small;">Ctrl – Alt – T</span></strong> on your keyboard to open the terminal. When it opens, run the commands below to open dhclient.conf file.<br />
<blockquote class="tr_bq">
<br />
<pre style="background-color: #e5e5e5; font-family: consolas,'Courier New',courier,monospace; font-size: 14px; margin: 0em; width: 100%;">sudo gedit /etc/dhcp/dhclient.conf</pre>
</blockquote>
Then change the line highlighted to:<br />
<blockquote class="tr_bq">
<pre style="background-color: #e5e5e5; font-family: consolas,'Courier New',courier,monospace; font-size: 14px; margin: 0em; width: 100%;">prepend domain-name-servers x.x.x.x, y.y.y.y;</pre>
</blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-Qtbnk1MMWyA/UIoiijsCSgI/AAAAAAAABrc/5TWUzxqqKOQ/s1600/590x259xcustom_dns_precise_1_thumb.png.pagespeed.ic.dVVyGBpE93.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="http://2.bp.blogspot.com/-Qtbnk1MMWyA/UIoiijsCSgI/AAAAAAAABrc/5TWUzxqqKOQ/s640/590x259xcustom_dns_precise_1_thumb.png.pagespeed.ic.dVVyGBpE93.png" width="640" /></a></div>
<br />
Replace <strong>xx</strong> and <strong>yy </strong>with the primary and secondary DNS server addresses. Separate each address with a comma. Save the file and you’re done.<br />
<br />
i COPY AND PASTE this from <a href="http://www.liberiangeek.net/2012/05/setup-static-dns-servers-in-ubuntu-12-04-precise-pangolin/" target="_blank">here </a>for my own knowledge.<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>AkuBuntuhttp://www.blogger.com/profile/13483680561608995044noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-91174617607693874242012-10-24T01:07:00.000-07:002012-10-24T01:07:04.389-07:00Install Razor Lightweight Desktop in Ubuntu 12.10 & 12.04Razor-qt is an advanced, easy-to-use, and fast desktop environment based
on Qt technologies. It has been tailored for users who value
simplicity, speed, and an intuitive interface. Unlike most desktop
environments, Razor-qt also works fine with weak machines.<br />
<br />
Razor-qt is a new open-source project, it works with various WMs. This
simple tutorial will show you how to install Razor Desktop in Ubuntu
using PPA<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-hwoMFgFr4Zg/UIeg1AOmoII/AAAAAAAAA28/TmDYA5dDwDA/s1600/Razor-desktop-450x360.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-hwoMFgFr4Zg/UIeg1AOmoII/AAAAAAAAA28/TmDYA5dDwDA/s400/Razor-desktop-450x360.png" width="400" /></a></div>
<span style="text-decoration: underline;"><strong>Install Razor Desktop from PPA:</strong></span><br />
<span style="text-decoration: underline;"><strong><br /></strong></span>
Hit Ctrl+Alt+T, copy and paste this command into terminal and hit enter
to add the PPA. It supports Ubuntu 12.10, Ubuntu 12.04, 11.10, 11.04,
and 10.04.<br />
<br />
<code>sudo add-apt-repository ppa:razor-qt/ppa</code><br />
<code>sudo apt-get update<br />
sudo apt-get install razorqt</code><br />
<br />
Log out and select to log in with Razor Desktop:<br />
<code> </code> <div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-86100075346422840352012-10-22T00:45:00.000-07:002012-10-22T00:45:00.839-07:00Ubuntu Builder 2.3.0 Adds Support For Ubuntu 12.10 Quantal Quetzal <span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><b>Ubuntu Builder</b> has been updated to version <b>2.3.0</b> recently which adds support for <b>Ubuntu 12.10 Quantal Quetzal</b> and at the same time drops support for <b>Natty</b>.
Ubuntu Builder is a tool with GUI that allows users to build a
customized version of their Ubuntu-based distributions. The tool allows
to customize either i386 or amd64 OS images.</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><a href="http://3.bp.blogspot.com/-JSm7e7JWXd0/UIOnTOTDKEI/AAAAAAAAA2k/yXMYbBXBMeQ/s1600/ubuntu-builder-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="http://3.bp.blogspot.com/-JSm7e7JWXd0/UIOnTOTDKEI/AAAAAAAAA2k/yXMYbBXBMeQ/s1600/ubuntu-builder-1.png" width="400" /></a></span></span></div>
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"> <b>Ubuntu Builder Installation</b></span></span><br />
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;">Open the terminal and install <i>Ubuntu Builder 2.3.0 </i>in Ubuntu 12.10/12.04 or Linux Mint 13 with the following commands:<br /> </span></span><br />
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><b>sudo add-apt-repository ppa:f-muriana/ubuntu-builder<br />
sudo apt-get update<br />
sudo apt-get install ubuntu-builder
</b></span></span><div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-121410254698133532012-10-21T00:37:00.002-07:002012-10-21T00:37:50.215-07:00Make Unity More Responsive in Ubuntu 12.10 with a Small TweakUbuntu 12.10 has been released and you may have already started
customizing it. Below is a small tweak that will make Unity dash more
responsive.<br />
<br />
Ubuntu 12.10 has a 'low graphics mode' that disables some dash and
launcher effects like active blur and transparency. It also darkens dash
for improved visibility. By sacrificing these effects, you can improve
Unity performance.<br />
<br />
This low graphics mode is enabled by default in llvmpipe software mode
which is used as a fallback method if your system doesn't support 3D
hardware acceleration. However, on high end systems, you can enable low
graphics mode without getting into fallback renderer.<br />
<br />
Low graphics mode can be enabled by adding following line to <i style="font-weight: bold;">~/.xprofile </i>(if the file doesn't exist, create it)<br />
<br />
<b><i>export UNITY_LOW_GFX_MODE=1</i></b><br />
<br />
Logout, and come back for the effect to take place.<br />
<br />
To check if you are running llvmpipe software mode or not, run the following command:<br />
<br />
<b><i>glxgears -info</i></b><br />
<br />
<div style="text-align: justify;">
In software mode, you will get output like this:</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<div>
<b><i>GL_RENDERER = Gallium 0.4 on llvmpipe (LLVM 3.1, 128 bits)</i></b></div>
<div>
<b><i>GL_VERSION = 2.1 Mesa 9.1-devel</i></b></div>
<b><i>GL_VENDOR = VMware, Inc.</i></b><br />
<b><i></i></b></div>
<div style="text-align: justify;">
<b><i></i></b></div>
<div style="text-align: justify;">
<b><i></i></b></div>
<div style="text-align: justify;">
<b><i></i></b></div>
<div style="text-align: justify;">
<b><i><br /></i></b>Low graphics mode changes are mostly same as disabling blur and
transparency effects through compiz config settings manager (CCSM). You
can use either of these methods to improve Unity performance on
your desktop.</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><i>via <a href="http://askubuntu.com/">http://askubuntu.com</a></i></b></div>
<b><i> </i></b> <div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-11989570269253861412012-10-18T01:46:00.002-07:002012-10-18T01:46:35.068-07:00How To Add The BackTrack Repository To Ubuntu 12.10/12.04/11.10 <b>BackTrack </b>is a Ubuntu-based distribution built mainly for
security testing and is provided for all user levels from beginners to
advanced. The BackTrack distro provides professional users and hackers a
large collection of open source tools and utilities that help in
testing your hardware and network (wireless/wired) for security
vulnerabilities. Their home page can be accessed <a href="http://goo.gl/r9rEQ" target="_blank">here</a> if you want to get more information about this Linux distro.<br />
<br />
In this tutorial we will help you add the BackTrack repository to Ubuntu
so that you can install BackTrack packages natively using "<b>sudo apt-get install package</b>" or from <b>Ubuntu Software Center</b>.<br />
<br />
<b><span style="font-family: Georgia, Times New Roman, serif; font-size: medium;">Getting Started</span></b><br />
<br />
Open the terminal under Ubuntu 12.10/12.04/11.10 or older and run the following commands to add the BackTrack repository:<br />
<br />
<span style="background-color: white;"><b>wget -q http://all.repository.backtrack-linux.org/backtrack.gpg -O- | sudo apt-key add -</b></span><br />
<br />
<span style="background-color: white;"><b>sudo sh -c "echo 'deb
http://all.repository.backtrack-linux.org revolution main microverse
non-free testing' >> /etc/apt/sources.list"</b></span> <br />
<br />
<b style="background-color: #ffd966;"><span style="background-color: white;">sudo apt-get update </span></b><br />
<br />
<b style="background-color: #ffd966;"><span style="background-color: white;"><span style="background-color: white;"><b>sudo apt-get upgrade </b></span></span></b><br />
<span style="background-color: #eeeeee;"><br /></span>
<span style="background-color: 0;">To check if the repository is added correctly, you can try to install this BackTrack package: </span><br />
<br />
<span style="background-color: #ffd966;"><span style="background-color: white;"><span style="background-color: white;"><b><span style="background-color: white;">sudo apt-get install backtrack-wallpapers</span></b><br /> </span></span></span><br />
<span style="background-color: 0;">Or you can search BackTrack applications from <b><i>Ubuntu Software Center</i></b>: </span><br />
<br />
<br />
<br />
<br />
<span style="background-color: 0;">source http://www.upubuntu.com </span>
<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-33466126218475011622012-10-08T11:18:00.001-07:002012-10-08T11:18:37.645-07:00Get Nitrux OS - a new awesome icon set for your desktopNitrux OS was just uploaded on Gnome-look but it already has a very high rating. According to the author, Nitrux OS will be the default icon theme of the upcoming distro with the same name. The download file is very light, around 2.5 MB but it consists of 5 different sets and all are very awesome.<br /><br /> If the preview image on gnome-look is not enough for you, here are some screenshots of Nitrux OS Dark icons I just installed on my Mint desktop:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-eaw-JHpef1o/UHMXhWVp7lI/AAAAAAAAA2I/WNqD5dfzHcw/s1600/2012-10-07-214157_1366x768_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="http://1.bp.blogspot.com/-eaw-JHpef1o/UHMXhWVp7lI/AAAAAAAAA2I/WNqD5dfzHcw/s320/2012-10-07-214157_1366x768_scrot.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-WU5_lA1OaZ4/UHMXkNBbIvI/AAAAAAAAA2Q/_N9o8VLuLds/s1600/2012-10-07-214216_1366x768_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="104" src="http://3.bp.blogspot.com/-WU5_lA1OaZ4/UHMXkNBbIvI/AAAAAAAAA2Q/_N9o8VLuLds/s320/2012-10-07-214216_1366x768_scrot.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
You can click <a href="http://gnome-look.org/content/show.php/Nitrux+OS+Icons?content=154496&PHPSESSID=f9242e37d30da38ae14f0f044ed89806" target="_blank">here</a> to directly download this beautiful icon set here from gnome-look. If you are using Ubuntu or any other Ubuntu-based distro, you can open the terminal and run the following commands to install it from the PPA:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
sudo add-apt-repository ppa:upubuntu-com/themes <br /> sudo apt-get update <br /> sudo apt-get install nitruxos </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
source: <a href="http://www.linuxandlife.com/">http://www.linuxandlife.com/</a></div>
<br /><div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-60009015443276928152012-10-06T07:30:00.002-07:002012-10-06T07:30:41.191-07:00How To Vpn Setting For Ubuntu<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-0jSkPFujoiA/UHAwtOjc1pI/AAAAAAAABqM/30MZmB7jw9Y/s1600/url.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="195" src="http://3.bp.blogspot.com/-0jSkPFujoiA/UHAwtOjc1pI/AAAAAAAABqM/30MZmB7jw9Y/s320/url.jpeg" width="320" /> </a></div>
<div class="separator" style="clear: both; text-align: left;">
For the settings: </div>
<div class="separator" style="clear: both; text-align: left;">
1) Download your key from your VPN provider</div>
<div class="separator" style="clear: both; text-align: left;">
2) Extract the file ( usually .zip)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-LuwZ6BgNui0/UHA31nVUV3I/AAAAAAAABqc/-iuXk1jb9vk/s1600/Screenshot+from+2012-10-06+21:48:16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="http://3.bp.blogspot.com/-LuwZ6BgNui0/UHA31nVUV3I/AAAAAAAABqc/-iuXk1jb9vk/s320/Screenshot+from+2012-10-06+21:48:16.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
3) Open your connection manager, choose VPN Connection</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-65GV04eZ9mw/UHA9qZO0pPI/AAAAAAAABq4/NNcklIsiaqg/s1600/Screenshot+from+2012-10-06+21%253A54%253A56.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="201" src="http://1.bp.blogspot.com/-65GV04eZ9mw/UHA9qZO0pPI/AAAAAAAABq4/NNcklIsiaqg/s320/Screenshot+from+2012-10-06+21%253A54%253A56.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
4) Click Configure VPN , under VPN tab click Import</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-ANvKY_RvcxY/UHA-9vP-UgI/AAAAAAAABrA/0hmpGFykUi8/s1600/Screenshot+from+2012-10-06+22%253A20%253A36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="216" src="http://4.bp.blogspot.com/-ANvKY_RvcxY/UHA-9vP-UgI/AAAAAAAABrA/0hmpGFykUi8/s320/Screenshot+from+2012-10-06+22%253A20%253A36.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
5) Find your extracted VPN key folder, where ever you put it, double click..</div>
<div class="separator" style="clear: both; text-align: left;">
sometimes your provider give full certificate, some provider want you to </div>
<div class="separator" style="clear: both; text-align: left;">
key in your username and password</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-2ES8Jw601Dc/UHA_7Pv_EMI/AAAAAAAABrI/uvVzAE8ROGw/s1600/Screenshot+from+2012-10-06+22:21:22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="http://2.bp.blogspot.com/-2ES8Jw601Dc/UHA_7Pv_EMI/AAAAAAAABrI/uvVzAE8ROGw/s320/Screenshot+from+2012-10-06+22:21:22.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
6) Click Save. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
For the connection</div>
<div class="separator" style="clear: both; text-align: left;">
1) Open your Connection Manager</div>
<div class="separator" style="clear: both; text-align: left;">
2) Choose VPN Connection</div>
<div class="separator" style="clear: both; text-align: left;">
3) Choose your server and wait, if you got failure try another server until you succeed.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Enjoy your VPN Connection...</div>
<div class="separator" style="clear: both; text-align: left;">
( mind my english)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>AkuBuntuhttp://www.blogger.com/profile/13483680561608995044noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-83319006090099802382012-09-23T17:43:00.000-07:002012-09-23T17:44:07.370-07:00Ubuntu 12.10 Simplifies GRUB Boot MenuUbuntu 12.10 features a minor but interesting change in GRUB2 Boot Menu.<br /><br /> Menu entries now have 'Ubuntu' as the first option instead of 'Ubuntu with Linux (Kernel version)'. Everything else has been tucked into a new 'Advanced Options' entry which lists older Kernels and recovery mode options.<br /><br /> Here is a screenshot of new boot menu:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-6ekYqQ72LKI/UF-rdLBp87I/AAAAAAAAA10/ABLxuh4s15g/s1600/Ubuntu+12.04+Boot+Menu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="233" src="http://3.bp.blogspot.com/-6ekYqQ72LKI/UF-rdLBp87I/AAAAAAAAA10/ABLxuh4s15g/s320/Ubuntu+12.04+Boot+Menu.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Advanced Options:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-fpcEqQiBoEQ/UF-rZfPZ21I/AAAAAAAAA1s/0q3ob1TCWhA/s1600/Ubuntu+12.10+GRUB+Advanced+Options.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="232" src="http://3.bp.blogspot.com/-fpcEqQiBoEQ/UF-rZfPZ21I/AAAAAAAAA1s/0q3ob1TCWhA/s320/Ubuntu+12.10+GRUB+Advanced+Options.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
For comparison, here is a screenshot of boot menu in Ubuntu 12.04:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-6ekYqQ72LKI/UF-rdLBp87I/AAAAAAAAA10/ABLxuh4s15g/s1600/Ubuntu+12.04+Boot+Menu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="233" src="http://3.bp.blogspot.com/-6ekYqQ72LKI/UF-rdLBp87I/AAAAAAAAA10/ABLxuh4s15g/s320/Ubuntu+12.04+Boot+Menu.png" width="320" /></a></div>
<br />
New boot menu makes sense as any first time Linux user may get confused by recovery mode option and Kernel versions. A simple 'Ubuntu' entry is enough to tell a user what to do in case he is presented with a boot menu. <br /><br /> By default GRUB menu is hidden and it is only shown when a system fails to shut properly or Shift key is held during boot time.<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-36316678337947647692012-09-14T07:17:00.000-07:002012-09-14T07:17:23.373-07:00Sway Black-Base ORANGE: A Nice Dark GTK3 Theme for Unity and Gnome Shell - Ubuntu 12.04/Linux Mint 13 (Maya).Sway Black-Base ORANGE is an elegant GTK3 theme that uses a striking combination of black and orange colors. The theme can be enabled under Unity and Gnome Shell. Here is a screenshot of Sway Black-Base ORANGE under Ubuntu 12.04 (Unity):<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-lWxCCKlqJjA/UFM7k1az1xI/AAAAAAAAA1M/y6Q7aWU_A38/s1600/Sway+Black-Base+ORANGE-ubuntu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="178" src="http://1.bp.blogspot.com/-lWxCCKlqJjA/UFM7k1az1xI/AAAAAAAAA1M/y6Q7aWU_A38/s320/Sway+Black-Base+ORANGE-ubuntu.png" width="320" /></a></div><br />
Sway Black-Base ORANGE Installation<br />
<br />
To install this theme under Ubuntu 12.10/12.04/11.10 or Linux Mint 13 (Maya), open the terminal and issue these commands:<br />
<br />
<em>sudo add-apt-repository ppa:upubuntu-com/gtk3<br />
sudo apt-get update<br />
sudo apt-get install sway-black-orange</em><br />
<br />
You can use Gnome Tweak Tool to enable it, or run these two commands:<br />
<br />
<em>gsettings set org.gnome.desktop.interface gtk-theme 'Sway Black-Base ORANGE'</em><br />
<em><br />
</em> <em>gconftool-2 --set --type string /apps/metacity/general/theme 'Sway Black-Base ORANGE'</em><br />
<br />
<br />
Theme source: gnome-look<div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0tag:blogger.com,1999:blog-8823294493187598017.post-16624588030756226482012-08-08T10:16:00.000-07:002012-08-08T10:16:36.470-07:00Install Latest Build of Terminator from PPA<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-sCVZqjWTFwo/UCKeUYiCt_I/AAAAAAAAA0w/wSjSTravLu0/s1600/Terminator,+Open+Multiple+Terminals+in+Ubuntu+Linux.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="196" src="http://3.bp.blogspot.com/-sCVZqjWTFwo/UCKeUYiCt_I/AAAAAAAAA0w/wSjSTravLu0/s320/Terminator,+Open+Multiple+Terminals+in+Ubuntu+Linux.png" width="320" /></a></div><br />
Terminator allows users to have multiple terminals in one window and use key bindings to switch between them. It provides an efficient way of filling a large area of screen space with terminals.<br />
<br />
<div style="text-align: justify;">Some new features and fixes have been included in Terminator since its last release, so I have packaged it into a PPA.</div><div style="text-align: justify;"> </div><div style="text-align: justify;">Changes:</div><div style="text-align: justify;"> </div><div style="text-align: justify;"><ul><li>Auto-resize columns/rows: Double clicking on a splitter evenly redistributes columns/rows in that grouping</li>
<li>It is now possible to rename multiple windows of Terminator using a keyboard shortcut</li>
<li>You can now add a keyboard shortcut for inserting terminal numbers</li>
<li>Added possibility to rotate the paned containers. Super + R for rotating terminals clockwise and Super + Shift + R for rotating terminals counter-clockwise</li>
<li>Fixed, titlebars not refreshing when using some keyboard shortcuts</li>
<li>Fixed initial terminal sizing with non-default font sizes</li>
<li>Many other fixes</li>
</ul>You can download latest build in Ubuntu 12.04 and 12.10 by running the commands below. Do note that this is not an official stable release from developers.<br />
<br />
<div><b><i>sudo add-apt-repository ppa:niteshgupta16/ubuntuvibes</i></b></div><div><b><i>sudo apt-get update</i></b></div><div><b><i>sudo apt-get install terminator</i></b></div><hr /><br />
</div><br />
<div style="text-align: justify;">Some new features and fixes have been included in Terminator since its last release, so I have packaged it into a PPA. </div><div class="blogger-post-footer">Ubuntu Linux Guide Kubuntu Edubuntu Info Tips And Tricks</div>TheRevhttp://www.blogger.com/profile/13109335580037676056noreply@blogger.com0