Awesome en Debian
1. Introducción
1.1. ¿Qué es?
1.2. Awesome en Debian
2. Awesome 2
2.1. Instalación
2.2. Configuración básica. awesomerc
2.3. A nuestro gusto: Fondo de pantalla, terminales, implementación del menú de aplicaciones
2.4. Widgets
2.4.1. Reloj
3. Awesome 3
3.1. Instalación
3.2. Configuración: rc.lua
3.3. Configuración: archivo de tema
4. Awesome y el arranque del sistema
4.1. Iniciar Awesome sin gestor de identificación
4.2. Arranque con GDM
4.3. Awesome como Window Manager para kde
5. Pequeños trucos y consejos
6. Páginas web de interés y lanzamientos
1. Introducción
1.1. ¿Qué es?
Awesome es un gestor de ventanas con capacidad de utilizar tanto el modo tradicional (floating) como una distribución automática de las ventanas por la pantalla, como si de un mosaico se tratase. Es un gestor ligero y muy versátil, tanto en la antigua rama 2 como en la nueva rama 3 que viene con la gran novedad del uso del lenguaje de programación Lua en su configuración.
Según la página web de awesome
It's extremely fast, small, dynamic and heavily extensible using the Lua programming language. We provide an easily usable and very-well documented API to configure and define the behaviour of your window manager.Algunas de sus características
- Extensible, gracias al uso de Lua
- Se hace uso de librerías XCB asíncronas, en sustitución de las Xlib, síncronas, lo que se traduce en una mayor rapidez.
- Soporte para múltiples monitores (XRandR, Xinerama o Zaphod)
- Todo se puede hacer con el teclado haciendo innecesario el uso del ratón
- Uso de tags en lugar de workspaces dando más libertad a la distribución de las ventanas
Además, podemos encontrar una gran cantidad de documentación en la página web del proyecto y en su wiki. No es recomendable para usuarios que gusten de GUI's, dado que toda la configuración se realizará con ficheros de texto.
Conceptos relativos a Awesome y los "Tiling Window Manager"
Tags: Comparable a un "escritorio virtual". Es posible asignar a cada uno su propia distribución de las ventanas en la pantalla, y también podemos ejecutar un proceso en varios a la vez.
Layouts: Podemos describirlo como la forma en que las ventanas ocupan el espacio disponible. Disponibles en awesome 3 tenemos:
- Tiled donde el espacio disponible se divide en las áreas master y stacking. En la primera se situará el proceso que demande nuestra atención más inmediata, y podemos dividirla en filas y/o columnas
- Max cada proceso y/o ventana ocupará el máximo espacio disponible en la pantalla
- Magnifier todas las ventanas del área stacking aparecen "detrás" del área master
- Floating el sistema se comporta como un gestor de ventanas "no tiling"
Statusbar: Podemos situarla arriba, abajo, a la izquierda o a la derecha de la pantalla.
Screen: Cada monitor conectado al ordenador. Se numeran empezando por 1.
Client: Las ventanas.
Widgets: Los hay de varios tipos, desde simples cuadros de texto hasta iconos interactivos.
1.2. Awesome en Debian
Actualmente disponemos de awesome en las tres ramas principales de debian en distintas versiones:
Debian Stable
En Lenny disponemos de la versión 2.3.3-1
Debian Testing
En Squeeze ya disponemos de la rama 3, concretamente en la versión: 3.4.2-2
Debian Unstable
En Sid disponemos de la versión 3.4.2-3
Los cambios en las versiones de awesome se propagan con rapidez a los repositorios de Debian ya que Julien Danjou además de ser el principal desarrollador de awesome también es su mantenedor en nuestra distribución.
2. Awesome 2
2.1. Instalación
Debian Etch [Old Stable]
Debido a que Awesome no se encuentra en los paquetes de Debian Etch [Antigua rama estable de Debian] vamos a instalar desde "Backports" Y para ello abriremos una terminal ejecutando lo siguiente:
# nano /etc/apt/sources.listAñadimos
# backports
deb http://www.backports.org/debian etch-backports main contribDescargamos en instalamos las llaves,
# wget -O - http://backports.org/debian/archive.key | apt-key add -Listo, instalamos Awesome
# aptitude -t etch-backports install awesomeDebian Lenny [Actual rama estable de Debian]
# aptitude install awesome2.2. Configuración básica .awesomerc
El fichero de configuración de awesome es .awesomerc Debería estar en ~/, pero la instalación de Awesome no lo hace por nosotros. Al iniciar Awesome, éste intenta leer ~/.awesomerc. Si no existe se ajusta a la configuración por defecto.
Lo que haremos será copiar el fichero que viene de ejemplo en el paquete a nuestro home
# cd /usr/share/doc/awesome
# lsDescubrimos el fichero awesomerc.gz, tenemos que descomprimirlo.
# gzip -d awesomerc.gzAhora como usuario normal
$ cp awesomerc /home/usuario/.awesomercDe nuevo, todo es mucho más fácil si trabajamos en Lenny. El fichero awesomerc se habrá creado en el directorio home del usuario, por lo que los pasos anteriores no serían necesarios.
Bueno, ya tenemos archivo de configuración para manejarlo a nuestro antojo. Vamos a investigarlo un poco:
# nano .awesomercY lo que tendremos será lo siguiente:
screen 0
{
# configuración de la pantalla actual
styles
{
# estilo de la pantalla actual, aquí podremos cambiar los colores y el tipo de letra
}
tags
{
# espacios de trabajo, aquí podemos ponerle nombre a cada escritorio, decidir cómo se comportarán las ventanas en cada uno (por ejemplo, podríamos asignar al escritorio 1 el modo tiling, y al 2 el modo flotante)
}
layouts
{
# configuración de los tipos de mosaicos disponibles, es decir, de qué manera se cubrirá la pantalla con las ventanas
}
statusbar mystatusbar
{
# configuración de la barra de estado de la pantalla actual
}
}
rules
{
# descripción de reglas, aquí podemos determinar, para cada aplicación, si se abrirá en modo flotante o no, en qué escritorio aparecerá al invocarla... Por ejemplo,
rule { name = "MPlayer" float = true tags="1"}
indica que mplayer utilizará el modo flotante y se abrirá en el escritorio 1
}
mouse
{
#Configuración del ratón
}
keys
{
# teclas rápidas, o <em>hotkeys</em>
}De todas formas, a parte de ser bastante intuitivo, se pueden consultar el man para tener más información acerca del archivo de configuración.
$ man awesomeComo estamos ansiosos por ver qué aspecto tiene awesome, reiniciamos y
$ startxSi todo ha ido bien, nos encontraremos ante la configuración por defecto de Awesome. Es decir, no hay fondo de pantalla. Sólo una barra arriba con los nueve escritorios, un icono para cambiar la disposición de las ventanas (por ejemplo de modo "tiling" a modo flotante, esto ya lo hemos explicado), y el logo de Awesome, que nos muestra la página del manual.
Pero por ahora lo único que nos interesa es saber que la combinación de teclas "Mod4" + Return nos abre un terminal. Y es todo lo que necesitamos para poner a punto nuestro Awesome
Nota: "Mod4" suele ser la tecla de windows.
Podemos abrir varios terminales para comprobar en qué consiste un "tiling window manager" Para ejecutar aplicaciones /scripts antes que Awesome, debemos editar el archivo:
~/.xinitrcAsí, podriamos añadir lo siguiente:
#Script de inicialización de los widgets
~/.awesome/widget_init.sh
#Ejecución de Awesome
exec awesome2.3. A nuestro gusto: Fondo de pantalla, terminales, implementación del menú de aplicaciones
Podemos pensar en poner un fondo de pantalla. Como siempre, hay múltiples opciones. Optamos por la instalación de feh
# aptitude install fehAñadimos a ~/.xinitrc la línea
feh --bg-scale (aquí la ruta al fondo que queramos)Otro aspecto importante a considerar es la elección de un terminal. Nos decantamos por urxvt, aunque hay muchas posibilidades (aterm, mrxvt, rxvt...)
# aptitude install rxvt-unicodeAwesome no sabe que queremos usar ese terminal en concreto. Para indicárselo nos vamos de nuevo a .awesomerc y sustituímos el terminal que viene por defecto (xterm) por urxvt. Es decir, donde antes teníamos
modkey = {"Mod4"}
key = "Return"
command = "spawn"
arg = "exec xterm"Lo cambiamos por
modkey = {"Mod4"}
key = "Return"
command = "spawn"
arg = "exec urxvt"y así en todas las ocasiones en las que se haga referencia al terminal. Para comprobar que hemos editado bien el fichero podemos hacer
$ awesome -kSi todo ha ido bien, el sistema nos lo indica y podremos reiniciar para ver cómo ha quedado. Si no, te indica cuál es el error y toca volver a editar.
Supongamos que todo ha funcionado. Así,
$ startxy nos encontraremos con un gestor de ventanas con fondo de pantalla y los colores a nuestro gusto. Pero quizás queremos terminales transparentes, u otro tipo de características. Necesitamos .Xdefaults. Si no existe lo creamos, y añadimos ahí lo que necesitemos
$ nano /home/usuario/.XdefaultsPor ejemplo, para tener el terminal transparente y otras pequeñas funcionalidades,
Xft.antialias: true
!urxvt - setting
URxvt*background: #000000
URxvt*foreground: #ffffff
URxvt*scrollBar: false
URxvt*font: xft:Bitstream Vera Sans mono:size=9
URxvt*inheritPixmap: true
URxvt*termName: rxvtAwesome-2.3 Nos ofrece la posibilidad de implementar un menú de aplicaciones. Como algunos notarán, hay muchas posibilidades para implementarlo, los desarrolladores nos proponen varios modos. A continuación trataremos el más sencillo.
Hará falta crear el siguiente archivo:
~/.awesome/menuO con cualquier otro nombre que nos interese, siempre y cuando sepamos tenerlo en cuenta en los siguientes pasos. Un modo de crear dicho archivo puede ser:
$ cd ~/
$ mkdir .awesome
$ cd .awesome
$ touch menuUna vez creado, debemos añadirle el nombre del binario de las aplicaciones que nos interesen. Por ejemplo:
xterm
iceweasel
gimp
ardourLo podemos hacer usando nuestro editor favorito. Por ejemplo:
$ nano ~/.awesome/menuCtrl+O para guardar, y Ctrl+X para salir
Por último, hará falta asociar dicho menú a una tecla rápida (hotkey) de nuestro entorno. Para ello, tendremos que añadir la siguiente configuración en la sección keys { ... } del archivo creado anteriormente ~/.awesomerc:
key {
modkey = {"Mod4"}
key = "p"
command = "spawn"
arg = "exec `cat ~/.awesome/menu | awesome-menu 'Ejecutar:'`"
}2.4. Widgets.
Dado que hay infinidad de widgets posibles, puesto que hay infinidad de ideas para ello, tan solo se explicará el más básico de todos: El reloj.
2.4.1. Reloj
Lo primero que hay que hacer es añadir un espacio para el reloj en la barra de estado que tenemos en ~/.awesomerc:
screen 0
{
statusbar mystatusbar {
...
#Al final del apartado
...
#Añadimos
textbox clock {
text_align = "right"
align = "right"
width = "100"
}
#Creando de este modo un recuadro de 100 píxeles al lado izquierdo de la barra de estado
}
}A continuación, hará falta ir rellenando dicho recuadro de forma automática y desde el principio del arranque de Awesome (por el simple hecho de no hacerlo manualmente) utilizando el siguiente script:
#!/bin/sh
#
while true
do
if [ -S ~/.awesome_ctl.0 ]; then
(while true
do
# See 'man date' to see the possible replacements for the % fields.
# uncomment the following line for use with awesome 2.3
echo "0 widget_tell mystatusbar clock text " " `date +\"%a, %b %d %I:%M %p\"`"
#echo "0 widget_tell clock" " `date +\"%a, %b %d %I:%M %p\"`"
echo "" # an empty line flushes data inside awesome
sleep 1
done) | awesome-client
else
sleep 1
fi
doneQue por ejemplo podemos guardar en:
~/.awesome/widget_clock.shPosteriormente, tendremos que añadir la ejecución de dicho script en el archivo de inicialización de los widgets que se ha comentado anteriormente:
~/.awesome/widget_init.shQue será ejecutado automáticamente al inicio de la sesión tal y como se ha explicado, también, anteriormente.
Y así, sin más, tendremos un reloj que podremos configurar del modo que creamos conveniente con el buen uso de ~/.awesomerc.
3. Awesome 3
3.1. Instalación
Awesome 3 se encuentra actualmente en las ramas Testing [Squeeze] y Unstable [Sid] de Debian. Para su instalación basta con ejecutar:
aptitude install awesomeTambién podemos, al igual que se comentó para awesome 2, bajarnos el .tar.gz de la web, compilarlo e instalarlo. Algunas guías para eso pueden encontrarse aquí
3.2. Configuración de rc.lua
Vamos a iniciar por primera vez awesome 3. Para leer sobre posibles alternativas, podemos remitirnos a 4. Awesome y el arranque del sistema
$ startxAhora deberíamos encontrar la configuración por defecto de awesome, con 9 tags y el panel en la parte superior de la pantalla.
En caso que te salga un mensaje similar a este:
awsetbg: I can't find an app to set the wallpaper with. You can install one in
many many ways but I will give you some simple advice: install Eterm and
you're set. Eterm provides Esetroot and thats a great wallpaper setter. I
recommend you install the package provided by your distro.Instalaremos feh, una aplicación de la que ya hablamos en 2.3. A nuestro gusto: Fondo de pantalla, terminales, implementación del menú de aplicaciones
Abrimos un terminal ("Mod4+Enter"), que será xterm puesto que aún no hemos configurado el rc.lua. En principio, "Mod4" es la tecla de Windows.
Con "mod4+Shift+q" salimos de awesome y estaremos de vuelta en la tty1. Entramos de nuevo y ahora sí, nos encontraremos con el fondo de pantalla por defecto de awesome 3
Empezamos su configuración
Lo primero que haremos es crear una carpeta en nuestro home llamada "Awesome" dentro de .config
$ mkdir /home/arctica/.config/awesomeEl fichero de configuración se encuentra en
/etc/xdg/awesome/rc.luaAsí, lo copiamos para tener una base sobre la que trabajar
$ cp /etc/xdg/awesome/rc.lua /home/arctica/.config/awesome/rc.lua/home/arctica/.cache/awesome se creará en el próximo reinicio.
Intentaremos explicar los aspectos más relevantes de rc.lua, aunque el fichero es bastante autoexplicativo.
Las líneas que comienzan por -- son comentarios, y Awesome no las tiene en cuenta al leer el rc.lua
$ cd /home/arctica/.config/awesomeLuego
$ nano rc.luaLo que encontraremos será esto:
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- Load Debian menu entries
require("debian.menu")
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/usr/share/awesome/themes/default/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "x-terminal-emulator"
editor = os.getenv("EDITOR") or "editor"
editor_cmd = terminal .. " -e " .. editor
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
-- If you do not like this or do not have such a key,
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others.
modkey = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters.
layouts =
{
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
awful.layout.suit.spiral,
awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
awful.layout.suit.magnifier,
awful.layout.suit.floating
}
-- }}}
-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {}
for s = 1, screen.count() do
-- Each screen has its own tag table.
tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s)
end
-- }}}
-- {{{ Menu
-- Create a laucher widget and a main menu
myawesomemenu = {
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
{ "restart", awesome.restart },
{ "quit", awesome.quit }
}
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "Debian", debian.menu.Debian_menu.Debian },
{ "open terminal", terminal }
}
})
mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
menu = mymainmenu })
-- }}}
-- {{{ Wibox
-- Create a textclock widget
mytextclock = awful.widget.textclock({ align = "right" })
-- Create a systray
mysystray = widget({ type = "systray" })
-- Create a wibox for each screen and add it
mywibox = {}
mypromptbox = {}
mylayoutbox = {}
mytaglist = {}
mytaglist.buttons = awful.util.table.join(
awful.button({ }, 1, awful.tag.viewonly),
awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
)
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
if not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
client.focus = c
c:raise()
end),
awful.button({ }, 3, function ()
if instance then
instance:hide()
instance = nil
else
instance = awful.menu.clients({ width=250 })
end
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end))
for s = 1, screen.count() do
-- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
mylayoutbox[s] = awful.widget.layoutbox(s)
mylayoutbox[s]:buttons(awful.util.table.join(
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
-- Create a taglist widget
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
-- Create a tasklist widget
mytasklist[s] = awful.widget.tasklist(function(c)
return awful.widget.tasklist.label.currenttags(c, s)
end, mytasklist.buttons)
-- Create the wibox
mywibox[s] = awful.wibox({ position = "top", screen = s })
-- Add widgets to the wibox - order matters
mywibox[s].widgets = {
{
mylauncher,
mytaglist[s],
mypromptbox[s],
layout = awful.widget.layout.horizontal.leftright
},
mylayoutbox[s],
mytextclock,
s == 1 and mysystray or nil,
mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft
}
end
-- }}}
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
))
-- }}}
-- {{{ Key bindings
globalkeys = awful.util.table.join(
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "k",
function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "w", function () mymainmenu:show(true) end),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
awful.key({ modkey, }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end),
-- Standard program
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- Load Debian menu entries
require("debian.menu")
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/usr/share/awesome/themes/default/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "x-terminal-emulator"
editor = os.getenv("EDITOR") or "editor"
editor_cmd = terminal .. " -e " .. editor
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
-- If you do not like this or do not have such a key,
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others.
modkey = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters.
layouts =
{
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
awful.layout.suit.spiral,
awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
awful.layout.suit.magnifier,
awful.layout.suit.floating
}
-- }}}
-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {}
for s = 1, screen.count() do
-- Each screen has its own tag table.
tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s)
end
-- }}}
-- {{{ Menu
-- Create a laucher widget and a main menu
myawesomemenu = {
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
{ "restart", awesome.restart },
{ "quit", awesome.quit }
}
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "Debian", debian.menu.Debian_menu.Debian },
{ "open terminal", terminal }
}
})
mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
menu = mymainmenu })
-- }}}
-- {{{ Wibox
-- Create a textclock widget
mytextclock = awful.widget.textclock({ align = "right" })
-- Create a systray
mysystray = widget({ type = "systray" })
-- Create a wibox for each screen and add it
mywibox = {}
mypromptbox = {}
mylayoutbox = {}
mytaglist = {}
mytaglist.buttons = awful.util.table.join(
awful.button({ }, 1, awful.tag.viewonly),
awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
)
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
if not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
client.focus = c
c:raise()
end),
awful.button({ }, 3, function ()
if instance then
instance:hide()
instance = nil
else
instance = awful.menu.clients({ width=250 })
end
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end))
for s = 1, screen.count() do
-- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
mylayoutbox[s] = awful.widget.layoutbox(s)
mylayoutbox[s]:buttons(awful.util.table.join(
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
-- Create a taglist widget
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
-- Create a tasklist widget
mytasklist[s] = awful.widget.tasklist(function(c)
return awful.widget.tasklist.label.currenttags(c, s)
end, mytasklist.buttons)
-- Create the wibox
mywibox[s] = awful.wibox({ position = "top", screen = s })
-- Add widgets to the wibox - order matters
mywibox[s].widgets = {
{
mylauncher,
mytaglist[s],
mypromptbox[s],
layout = awful.widget.layout.horizontal.leftright
},
mylayoutbox[s],
mytextclock,
s == 1 and mysystray or nil,
mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft
}
end
-- }}}
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
))
-- }}}
-- {{{ Key bindings
globalkeys = awful.util.table.join(
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "k",
function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "w", function () mymainmenu:show(true) end),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
awful.key({ modkey, }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end),
-- Prompt
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
awful.key({ modkey }, "x",
function ()
awful.prompt.run({ prompt = "Run Lua code: " },
mypromptbox[mouse.screen].widget,
awful.util.eval, nil,
awful.util.getdir("cache") .. "/history_eval")
end)
)
clientkeys = awful.util.table.join(
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
awful.key({ modkey, }, "n", function (c) c.minimized = not c.minimized end),
awful.key({ modkey, }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c.maximized_vertical = not c.maximized_vertical
end)
)
-- Compute the maximum number of digit we need, limited to 9
keynumber = 0
for s = 1, screen.count() do
keynumber = math.min(9, math.max(#tags[s], keynumber));
end
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it works on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, keynumber do
globalkeys = awful.util.table.join(globalkeys,
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewonly(tags[screen][i])
end
end),
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewtoggle(tags[screen][i])
end
end),
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.movetotag(tags[client.focus.screen][i])
end
end),
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.toggletag(tags[client.focus.screen][i])
end
end))
end
clientbuttons = awful.util.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move),
awful.button({ modkey }, 3, awful.mouse.client.resize))
-- Set keys
root.keys(globalkeys)
-- }}}
-- {{{ Rules
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "MPlayer" },
properties = { floating = true } },
{ rule = { class = "pinentry" },
properties = { floating = true } },
{ rule = { class = "gimp" },
properties = { floating = true } },
-- Set Firefox to always map on tags number 2 of screen 1.
-- { rule = { class = "Firefox" },
-- properties = { tag = tags[1][2] } },
}
-- }}}
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.add_signal("manage", function (c, startup)
-- Add a titlebar
-- awful.titlebar.add(c, { modkey = modkey })
-- Enable sloppy focus
c:add_signal("mouse::enter", function(c)
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
and awful.client.focus.filter(c) then
client.focus = c
end
end)
if not startup then
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- awful.client.setslave(c)
-- Put windows in a smart way, only if they does not set an initial position.
if not c.size_hints.user_position and not c.size_hints.program_position then
awful.placement.no_overlap(c)
awful.placement.no_offscreen(c)
end
end
end)
client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}
Lua es un lenguaje de programación, así que tendrá características tales como inclusión de librerías y definición de variables.
Ahora vamos a explicar algunas partes de rc.lua que nos pueden resultar de interés
1. Cambiando la terminal usada por defecto
Awesome permite e integra perfectamente cualquier terminal que deseemos utilizar, por defecto utiliza xterm pero podemos cambiar a nuestra terminal favorita editando la siguiente parte
-- This is used later as the default terminal and editor to run.
terminal = "urxvt"
editor = os.getenv("EDITOR") or "editor"
editor_cmd = terminal .. " -e " .. editorHan de notar que he puesto a "urxvt" como terminal predeterminada para mi uso dentro de Awesome. Igualmente pueden escoger la que gusten, ya sea "eterm" - "xterm" - "gnome-terminal" ... etc
2. Cambiando el directorio de los temas usados por Awesome
Por defecto los temas de Awesome 3 se encuentran en /usr/share/awesome/themes Lo que haremos es cambiar el directorio de los temas para una edición más cómoda sin necesidad de ser usuario Root. Para ello vamos a ejecutar:
$ cp -r /usr/share/awesome/themes /home/usuario/.config/awesomeAhora tenemos la carpeta "themes" en nuestro /home/usuario/.config/awesome entonces pasamos a definir esta carpeta en nuestro rc.lua y para ello vamos a editar la siguiente parte:
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/usr/share/awesome/themes/default/theme.lua")Hemos de cambiar por lo siguiente:
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/home/usuario/.config/awesome/themes/default/theme.lua")Con este paso podemos editar nuestro tema principal de Awesome.
3. Cambiando el "Modkey" usado en Awesome
ModKey es la "Tecla Maestra" que equivale en nuestro teclado a la tecla "Windows". Podemos cambiar a nuestro antojo la tecla a utilizar editando la siguiente parte:
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
-- If you do not like this or do not have such a key,
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others.
modkey = "Mod4"4. Asignando nombres a cada Tag
Generalmente los tags vienen predefinidos por 1,2,3,4,5,6,7,8,9 podemos asignar un nombre a cada tag. La sección que viene por defecto en rc.lua se ve así
-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {}
for s = 1, screen.count() do
-- Each screen has its own tag table.
tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s)
end
-- }}}Para asignar un nombre a cada Tag se dejará de la siguiente manera
-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {}
tags.settings = {
{ name = "Terminal", layout = layouts[1] },
{ name = "Web", layout = layouts[9] },
{ name = "Datos", layout = layouts[1] },
{ name = "Texto", layout = layouts[1] },
{ name = "Multim", layout = layouts[1] },
{ name = "Red", layout = layouts[1] },
{ name = "Vbox", layout = layouts[1] },
{ name = "Tv", layout = layouts[1] }
}
for s = 1, screen.count() do
tags[s] = {}
for i, v in ipairs(tags.settings) do
tags[s][i] = tag({ name = v.name })
tags[s][i].screen = s
awful.tag.setproperty(tags[s][i], "layout", v.layout)
end
tags[s][1].selected = true
end
-- }}}
5. Asignando Combinaciones de teclas a nuestros programas instalados para su rápida ejecución
Si bien es cierto podemos hacer uso del menú que por defecto nos entrega Awesome, siempre es mejor tener nuestra propia combinación de teclas.
Un ejemplo básico:
Si quisiéramos lanzar Iceweasel rápidamente, vamos a utilizar la siguiente combinación: TECLA WINDOWS + I Pero para ello debemos hacer previas modificaciones.
La sección donde se agregan estos parámetros es la siguiente:
-- Standard program
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
Ahora simplemente vamos a agregar nuestras aplicaciones favoritas, de manera que esta sección ha quedado de la siguiente manera:
-- Standard program
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit),
awful.key({ modkey, }, "i", function () awful.util.spawn("iceweasel") end),
awful.key({ modkey, "Control" }, "i", function () awful.util.spawn("google-chrome") end),
awful.key({ modkey, }, "t", function () awful.util.spawn("thunar") end),
awful.key({ modkey, }, "e", function () awful.util.spawn("leafpad") end),
awful.key({ modkey, "Control" }, "t", function () awful.util.spawn("tvtime") end),
awful.key({ modkey, }, "v", function () awful.util.spawn("vlc") end),
awful.key({ modkey, }, "s", function () awful.util.spawn("sonata") end),
awful.key({ modkey, }, "q", function () awful.util.spawn("k3b") end),
awful.key({ modkey, "Control" }, "e", function () awful.util.spawn("eog") end),
awful.key({ modkey, }, "g", function () awful.util.spawn("gimp") end),
awful.key({ modkey, "Control" }, "o", function () awful.util.spawn("soffice") end),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
6. Algunos de los principales KeyBindings son
Window manager control
Mod4 + Control + r
Restart awesome.
Mod4 + Shift + q
Quit awesome.
Mod4 + r
Run prompt.
Mod4 + x
Run Lua code prompt.
Mod4 + Return
Spawn terminal emulator.
Mod4 + w
Open main menu.
Clients
Mod4 + Shift + r
Redraw the focused window.
Mod4 + m
Maximize client.
Mod4 + n
Minimize client.
Mod4 + f
Set client fullscreen.
Mod4 + Shift + c
Kill focused client.
Mod4 + t
Mark a client.
Navigation
Mod4 + j
Focus next client.
Mod4 + k
Focus previous client.
Mod4 + u
Focus first urgent client.
Mod4 + Left
View previous tag.
Mod4 + Right
View next tag.
Mod4 + 1-9
Switch to tag 1-9.
Mod4 + Control + j
Focus next screen.
Mod4 + Control + k
Focus previous screen.
Mod4 + Escape
Focus previously selected tag set.
Layout modification
Mod4 + Shift + j
Switch client with next client.
Mod4 + Shift + k
Switch client with previous client.
Mod4 + o
Send client to next screen.
Mod4 + h
Decrease master width factor by 5%.
Mod4 + l
Increase master width factor by 5%.
Mod4 + Shift + h
Increase number of master windows by 1.
Mod4 + Shift + l
Decrease number of master windows by 1.
Mod4 + Control + h
Increase number of columns for non-master windows by 1.
Mod4 + Control + l
Decrease number of columns for non-master windows by 1.
Mod4 + space
Switch to next layout.
Mod4 + Shift + space
Switch to previous layout.
Mod4 + Control + space
Toggle client floating status.
Mod4 + Control + Return
Swap focused client with master.
Mod4 + Control + 1-9
Toggle tag view.
Mod4 + Shift + 1-9
Tag client with tag.
Mod4 + Control + 1-9
Toggle tag view.
Mod4 + Shift + 1-9
Tag client with tag.
Mod4 + Shift + Control + 1-9
Toggle tag on client.
Mod4 + Shift + F1-9
Tag marked clients with tag.
Mod4 + Shift + Control + 1-9
Toggle tag on client.
Mod4 + Shift + F1-9
Tag marked clients with tag.
3.3. Configuración, archivo de tema
Editaremos ahora el archivo de tema, para ello nos movemos donde se encuentra nuestro archivo de Themes
$ cd /home/usuario/.config/awesome/themes/defaultEntramos en el archivo de configuración
$ nano theme.luaNos encontraremos con lo siguiente
---------------------------
-- Default awesome theme --
---------------------------
theme = {}
theme.font = "sans 8"
theme.bg_normal = "#222222"
theme.bg_focus = "#535d6c"
theme.bg_urgent = "#ff0000"
theme.bg_minimize = "#444444"
theme.fg_normal = "#aaaaaa"
theme.fg_focus = "#ffffff"
theme.fg_urgent = "#ffffff"
theme.fg_minimize = "#ffffff"
theme.border_width = "1"
theme.border_normal = "#000000"
theme.border_focus = "#535d6c"
theme.border_marked = "#91231c"
-- There are other variable sets
-- overriding the default one when
-- defined, the sets are:
-- [taglist|tasklist]_[bg|fg]_[focus|urgent]
-- titlebar_[bg|fg]_[normal|focus]
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
-- Example:
--theme.taglist_bg_focus = "#ff0000"
-- Display the taglist squares
theme.taglist_squares_sel = "/usr/share/awesome/themes/default/taglist/squarefw.png"
theme.taglist_squares_unsel = "/usr/share/awesome/themes/default/taglist/squarew.png"
theme.tasklist_floating_icon = "/usr/share/awesome/themes/default/tasklist/floatingw.png"
-- Variables set for theming the menu:
-- menu_[bg|fg]_[normal|focus]
-- menu_[border_color|border_width]
theme.menu_submenu_icon = "/usr/share/awesome/themes/default/submenu.png"
theme.menu_height = "15"
theme.menu_width = "100"
-- You can add as many variables as
-- you wish and access them by using
-- beautiful.variable in your rc.lua
--theme.bg_widget = "#cc0000"
-- Define the image to load
theme.titlebar_close_button_normal = "/usr/share/awesome/themes/default/titlebar/close_normal.png"
theme.titlebar_close_button_focus = "/usr/share/awesome/themes/default/titlebar/close_focus.png"
theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_normal_inactive.png"
theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_focus_inactive.png"
theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/default/titlebar/ontop_normal_active.png"
theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/default/titlebar/ontop_focus_active.png"
theme.titlebar_sticky_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_normal_inactive.png"
theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_focus_inactive.png"
theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/default/titlebar/sticky_normal_active.png"
theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/default/titlebar/sticky_focus_active.png"
theme.titlebar_floating_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/floating_normal_inactive.png"
theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/floating_focus_inactive.png"
theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/default/titlebar/floating_normal_active.png"
theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/default/titlebar/floating_focus_active.png"
theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_normal_inactive.png"
theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_focus_inactive.png"
theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/default/titlebar/maximized_normal_active.png"
theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/default/titlebar/maximized_focus_active.png"
-- You can use your own command to set your wallpaper
theme.wallpaper_cmd = { "awsetbg /usr/share/awesome/themes/default/background.png" }
-- You can use your own layout icons like this:
theme.layout_fairh = "/usr/share/awesome/themes/default/layouts/fairhw.png"
theme.layout_fairv = "/usr/share/awesome/themes/default/layouts/fairvw.png"
theme.layout_floating = "/usr/share/awesome/themes/default/layouts/floatingw.png"
theme.layout_magnifier = "/usr/share/awesome/themes/default/layouts/magnifierw.png"
theme.layout_max = "/usr/share/awesome/themes/default/layouts/maxw.png"
theme.layout_fullscreen = "/usr/share/awesome/themes/default/layouts/fullscreenw.png"
theme.layout_tilebottom = "/usr/share/awesome/themes/default/layouts/tilebottomw.png"
theme.layout_tileleft = "/usr/share/awesome/themes/default/layouts/tileleftw.png"
theme.layout_tile = "/usr/share/awesome/themes/default/layouts/tilew.png"
theme.layout_tiletop = "/usr/share/awesome/themes/default/layouts/tiletopw.png"
theme.layout_spiral = "/usr/share/awesome/themes/default/layouts/spiralw.png"
theme.layout_dwindle = "/usr/share/awesome/themes/default/layouts/dwindlew.png"
theme.awesome_icon = "/usr/share/awesome/icons/awesome16.png"
return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
La sección para editar los colores es:
theme.bg_normal = "#222222"
theme.bg_focus = "#535d6c"
theme.bg_urgent = "#ff0000"
theme.bg_minimize = "#444444"
theme.fg_normal = "#aaaaaa"
theme.fg_focus = "#ffffff"
theme.fg_urgent = "#ffffff"
theme.fg_minimize = "#ffffff"
theme.border_width = "1"
theme.border_normal = "#000000"
theme.border_focus = "#535d6c"
theme.border_marked = "#91231c"
Pueden probar cambiado esta configuración y dejando la sección de esta manera. Este es solo un ejemplo de colores para Awesome, recuerden que pueden cambiar los colores a su gusto y preferencias.
Cambiamos por lo siguiente:
theme.bg_normal = "#ededed"
theme.bg_focus = "#441717"
theme.bg_urgent = "#ffffff"
theme.bg_minimize = "#444444"
theme.fg_normal = "#441717"
theme.fg_focus = "#ffffff"
theme.fg_urgent = "#441717"
theme.fg_minimize = "#111111"
theme.border_width = "1"
theme.border_normal = "#ededed"
theme.border_focus = "#ededed"
theme.border_marked = "#441717"
4. Awesome y el arranque del sistema
Éste es un aspecto importante en Awesome, dado que los widgets como el reloj deben que iniciarse automáticamente al hacerlo nuestro gestor de ventanas.
Para abordar este aspecto hemos de tener en cuenta si usamos gestor de identificación (gdm, kdm, xdm, slim) o no.
4.1. Iniciar awesome sin gestor de identificación
Editamos ~/.xinitrc. Si no existe, lo creamos, o podemos copiarlo de /etc/X11/xinit
$ cp /etc/X11/xinit/xinitrc /home/usuario/.xinitrc(prefierimos tenerlo oculto)
$ nano ~/.xinitrcAñadimos exec awesome
4.2. Arranque con GDM
Podemos utilitzar dos archivos para la inicialización de scripts:
/etc/gdm/PostLogin/Default
/etc/gdm/PreSession/DefaultA priori, no hay mucha diferencia. Pero si nos paramos a pensarlo algo mejor, nos daremos cuenta que en el primero de ellos no disponemos de dos variables fundamentales: $GDMSESSION y/o $DESKTOP_SESSION.
En cambio con el segundo, sí. Dichas variables contienen el nombre del gestor de ventanas que se haya arrancado con GDM.
¿Para qué pueden servirnos dichas variables? Para poder utilizar dos gestores de ventanas en la misma máquina. ¿Por qué? Por qué si usamos Gnome, a pesar de tener Awesome instalado, los scripts de inicialización comentados antes se ejecutan igualmente y por lo tanto la inicialización de los scripts para Awesome no tienen por qué ser los mismos que nos pueden interesar en Gnome.
De este modo, para inicializar los widgets o scripts que nos interesen en Awesome es recomendable hacerlo usando el segundo archivo:
/etc/gdm/PreSession/DefaultAñadiéndole las siguientes líneas al final del archivo:
if [ "$GDMSESSION" == "awesome" ]
then
~/.awesome/widget_init.sh
fiEs importante tener en cuenta que ahora no hace falta usar:
exec awesomePorque GDM es quien gestiona ese proceso.
4.3. Awesome como Window Manager para kde
Awesome puede, al igual que muchos otros manejadores de ventanas, ser el window manager que use por defecto un determinado escritorio. En este caso, vamos a hablar de como hacer de Awesome el manejador de ventanas de kde (probado en kde 4.2, aunque debería valer para la rama kde3).
Lo primero que tenemos que hacer es crear el directorio .kde/env/ si este no existiese. En él, crearemos un script (algo como window_manager.sh). Su contenido será:
KDEWM=/usr/bin/awesomeGuardamos, hacemos el pertinente chmod +x y reiniciamos sesión.
NOTA: Algunas aplicaciones intentarán "recordar" el comportamiento que tenían con kwin al ocupar el espacio en la pantalla, y pueden dar problemas con el tiling dinámico de awesome. Se recomienda hacer una limpia en el directorio de configuración de kde /home/usuario/.kde y dejar solo aquello que necesitemos (configuración de cuentas de kmail por ejemplo).
5. Pequeños trucos y consejos
- Cambiar el layout (disposición de ventanas): mantener pulsado mod4 y apretar espacio.
- Mover ventanas (pasar una ventana al plano principal): mantener pulsado mod4 y arrastrar con el botón izquierdo del ratón.
- Redimensionar ventanas (y recolocarlas de forma dinámica): mantener pulsado mod4 y arrastrar con el botón derecho del ratón.
6. Páginas web de interés y lanzamientos
Hasta la fecha, la lista de liberaciones de awesome, con sus nombres clave correspondientes, es
26 nov 2009 awesome 3.4.2 For The Restless
9 nov 2009 awesome 3.4.1 Ego Rock
20 oct 2009 awesome 3.4 Closing In
9 oct 2009 awesome 3.4-rc Black Star
28 sep 2009 awesome 3.4-rc2 Piku
11 sep 2009 awesome 3.4-rc1 Uprising
7 sep 2009 awesome 3.3.4 Mercury
25 aug 2009 awesome 3.3.3 Firelight
27 jul 2009 awesome 3.3.2 Half Moon
18 jun 2009 awesome 3.3.1 Bionic
4 jun 2009 awesome 3.3 Stellar
26 may 2009 awesome 3.3-rc4 Breath
18 may 2009 awesome 3.3-rc3 Uniform
8 may 2009 awesome 3.3-rc2 Bad Boyfriend
1 may 2009 awesome 3.3-rc1 The Lightning Strike
4 apr 2009 awesome 3.2.1 Complicated
13 mar 2009 awesome 3.2 Accidental Babies
27 feb 2009 awesome 3.2-rc4 Faith
20 feb 2009 awesome 3.2-rc3 Chocolate
13 feb 2009 awesome 3.2-rc2 Hunting For Witches
6 feb 2009 awesome 3.2-rc1 Candyman
5 feb 2009 awesome 3.1.2 Nobody Came
8 jan 2009 awesome 3.1.1 Ring My Bell
12 dec 2008 awesome 3.1 Helicopter
5 dec 2008 awesome 3.1-rc5 Face
28 nov 2008 awesome 3.1-rc4 Seven Nation Army
21 nov 2008 awesome 3.1-rc3 When Doves Cry
14 nov 2008 awesome 3.1-rc2 When She Believes
7 nov 2008 awesome 3.1-rc1 The Golden Floor
18 sep 2008 awesome 3.0 Fake Plastic Trees
5 sep 2008 awesome 3.0-rc6 Elect The Dead
29 aug 2008 awesome 3.0-rc5 Marshals Are Dead
22 aug 2008 awesome 3.0-rc4 Scared Of Girls
15 aug 2008 awesome 3.0-rc3 Into The Groove
8 aug 2008 awesome 3.0-rc2 Wake Up Call
1 aug 2008 awesome 3.0-rc1 Time To PretendPuede ver el registro completo de versiones aquí.