InicioLinuxCambiar Grado De Opacidad (RGBA) + Conky ;)

Cambiar Grado De Opacidad (RGBA) + Conky ;)

Linux10/2/2010
ATENCION!!!! en este tuto no dire como activar RGBA ya hay demasiados tutos de eso en internet, el objetivo de este tutorial es como cambiar el valor de opacidad que por defecto se asgina al activar RGBA en Ubuntu
ATENCION2!!!! no me responsabilizo por cualquier webonada que hagan xD y terminen con un entorno tipo windows 98 :S
asi quedo mi desktop luego de hacer lo que indicare en el tuto:


Empezemos

abran una terminal y comienzen a copiar y pegar uno por uno

1)
dijo:

$ sudo apt-get install checkinstall



2)
dijo:

$ sudo apt-get build-dep gtk2-engines-murrine



3)
dijo:

$ mkdir tempbuild



4)
dijo:

$ cd tempbuild



5)
dijo:

$ sudo apt-get source gtk2-engines-murrine



6)
dijo:

$ ls


al hacer esto ls nos dara varios archivos en los cuales abra una sola carpeta, entonces hacemos un

7)
dijo:

$ cd +el nombre de la unica carpeta que hay cuando hacemos el ls


por si no entendieron el paso 6 y 7 dejo una imagen:

GRANDE
lo que esta resaltado es el nombre de la unica carpeta que hay

8)
dijo:

$ sudo gedit src/support.h


y nos abrira un texto mas o menos asi:
dijo:

/* Opacity settings */
#define GRADIENT_OPACITY 1.00
#define WINDOW_OPACITY 0.85
#define ENTRY_OPACITY 0.92
#define NOTEBOOK_OPACITY 0.90
#define MENUBAR_OPACITY 0.85
#define MENUBAR_GLOSSY_OPACITY 0.85
#define MENUBAR_STRIPED_OPACITY 0.85
#define TOOLBAR_OPACITY 0.85
#define TOOLBAR_GLOSSY_OPACITY 0.85
#define MENU_OPACITY 0.85
#define TOOLTIP_OPACITY 0.85


para editar cambiamos los valores 0.XX
IMPORTANTE
hasta ahora no he encontrado como revertir los cambios, luego de hacerlo 1 vez, lo intente volver a hacer y ya no existia el archivo de texto (no probe si repitiendo todos los comandos desde el comienzo se podia, si alguien lo hace que me diga porfavor)

9)
guardamos los cambios y
dijo:

./configure --prefix=/usr/ --enable-animation



10)
dijo:

make



11)
dijo:

sudo checkinstall


(le damos enter a todo)

12) reiniciamos X (logueamos out y volvemos a entrar) y ya debe de estar listo. (tienen que tener un tema que soporte RGBA (el motor murrine) )

13) (opcional)
activar BLUR en compiz para que se vea mejor

PARA LOS QUE PIDIERON EL CONKY:
el .conkyrc

dijo:

# -- Conky settings -- #
background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
imlib_cache_size 0

# -- Window specifications -- #

own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints

border_inner_margin 10
border_outer_margin 0

minimum_size 1000 580
maximum_width 1000

alignment tl
gap_x 10
gap_y 10

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

# -- Text settings -- #
use_xft yes
xftfont GodOfWar:size=12
xftalpha 0.8

uppercase no

default_color FFFFFF

# -- Lua Load -- #
lua_load ~/.conky/conky_widgets.lua
lua_draw_hook_pre widgets

TEXT
${goto 250}${font Journal:size=48}${font}
${goto 870}${voffset 65}CPU ${cpu}%
${alignr 20}${voffset 90}MEM ${memperc}%
${goto 870}${voffset 78}FS ${fs_used_perc}%
${alignr 20}${voffset 85}BAT ${battery_percent BAT1}%


y el conky_widgets.lua (crean una carpeta llamada .conky en su home con un $ mkdir /home/suusuario/.conky y guardan el .lua en esa carpeta)
dijo:

--[[
Conky Widgets by londonali1010 (2009) edited by XsilverX90

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

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

Call this script in Conky using the following before TEXT (assuming you save this script to ~/scripts/conky_widgets.lua):
lua_load ~/scripts/conky_widgets.lua
lua_draw_hook_pre widgets

Changelog:
+ v1.1 -- Simplified calls to widgets by implementing a global drawing surface, and included imlib2 by default (03.11.2009)
+ v1.0 -- Original release (17.10.2009)
]]

require 'cairo'
require 'imlib2'
--[[ RING WIDGET ]]
--[[ Options (name, arg, max, bg_colour, bg_alpha, xc, yc, radius, thickness, start_angle, end_angle):
"name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
"arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
"max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
"bg_colour" is the colour of the base ring.
"bg_alpha" is the alpha value of the base ring.
"fg_colour" is the colour of the indicator part of the ring.
"fg_alpha" is the alpha value of the indicator part of the ring.
"x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
"radius" is the radius of the ring.
"thickness" is the thickness of the ring, centred around the radius.
"start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
"end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger (e.g. more clockwise) than start_angle. ]]

function ring(cr, name, arg, max, bgc, bga, fgc, fga, xc, yc, r, t, sa, ea)
local function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

local function draw_ring(pct)
local angle_0=sa*(2*math.pi/360)-math.pi/2
local angle_f=ea*(2*math.pi/360)-math.pi/2
local pct_arc=pct*(angle_f-angle_0)

-- Draw background ring

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

-- Draw indicator ring

cairo_arc(cr,xc,yc,r,angle_0,angle_0+pct_arc)
cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
cairo_stroke(cr)
end

local function setup_ring()
local str = ''
local value = 0

str = string.format('${%s %s}', name, arg)
str = conky_parse(str)

value = tonumber(str)
if value == nil then value = 0 end
pct = value/max

draw_ring(pct)
end

local updates=conky_parse('${updates}')
update_num=tonumber(updates)

if update_num>5 then setup_ring() end
end

--[[ END RING WIDGET ]]

function conky_widgets()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)


cr = cairo_create(cs)
ring(cr, 'cpu', 'CPU0', 100, 0xFFFFFF, 0.2, 0xFFFFFF, 0.8, 920, 150, 50, 10, 0, 180) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)

cr = cairo_create(cs)
ring(cr, 'memperc', '', 100, 0xFFFFFF, 0.2, 0xFFFFFF, 0.8, 920, 250, 50, 10, 180, 360) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)

cr = cairo_create(cs)
ring(cr, 'fs_used_perc', '/', 100, 0xFFFFFF, 0.2, 0xFFFFFF, 0.8, 920, 350, 50, 10, 0, 180) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)

cr = cairo_create(cs)
ring(cr, 'battery_percent', 'BAT1', 100, 0xFFFFFF, 0.2, 0xFFFFFF, 0.8, 920, 450, 50, 10, 180, 360) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)
end



el Wall:


comenten
Datos archivados del Taringa! original
0puntos
527visitas
0comentarios
Actividad nueva en Posteamelo
0puntos
3visitas
0comentarios
Dar puntos:

Dejá tu comentario

0/2000

Autor del Post

X
XsilverX90🇦🇷
Usuario
Puntos0
Posts8
Ver perfil →
PosteameloArchivo Histórico de Taringa! (2004-2017). Preservando la inteligencia colectiva de la internet hispanohablante.

CONTACTO

18 de Septiembre 455, Casilla 52

Chillán, Región de Ñuble, Chile

Solo correo postal

© 2026 Posteamelo.com. No afiliado con Taringa! ni sus sucesores.

Contenido preservado con fines históricos y culturales.