Esta web utiliza cookies, puedes ver nuestra política de cookies, aquí Si continuas navegando estás aceptándola

awesome 3.5


El proyecto puede encontrarse en github: https://github.com/tjormola/delightful

Comenzamos clonando el repo:

git clone git://scm.solitudo.net/delightful.git

Nos bajamos los módulos:

cd delightful
git submodule init
git submodule update

Los instalamos:

cp -a delightful/delightful ~/.config/awesome
cp -a delightful/submodules/vicious ~/.config/awesome
cp -a delightful/submodules/awesome-freedesktop/freedesktop ~/.config/awesome
cp delightful/submodules/imap/lua/imap.lua/imap.lua ~/.config/awesome
cp delightful/submodules/weatherlib/src/weatherlib.lua ~/.config/awesome
cp delightful/submodules/metar/src/metar.lua ~/.config/awesome
cp delightful/calendar2.lua ~/.config/awesome

Habilitamos los módulos que vayamos a utilizar en la config de awesome:

vi ~/.config/awesome/rc.lua

-- Delightful widgets
require('delightful.widgets.cpu')
require('delightful.widgets.datetime')
require('delightful.widgets.memory')

-- Which widgets to install?
-- This is the order the widgets appear in the wibox.
delightful_widgets = {
    delightful.widgets.cpu,
    delightful.widgets.memory,
    delightful.widgets.datetime,
}

-- Widget configuration
delightful_config = {
    [delightful.widgets.cpu] = {
        command = 'gnome-system-monitor',
    },
    [delightful.widgets.memory] = {
        command = 'gnome-system-monitor',
    },
}

Creamos un widget para mostrar el uso de disco en /:

-- Create an HD widget
function GetHdUsage()
  local command = "df -h /|tail -n 1|awk '{print$5}'"
  local fh = assert(io.popen(command, "r"))
  local text = "|HD: " .. fh:read("*l")
  fh:close()
  return text
end

-- Get HD usage
hdwidget = wibox.widget.textbox()
hdwidget:set_text(GetHdUsage())
hdwidgettimer = timer({ timeout = 60 })
hdwidgettimer:connect_signal("timeout",
  function()
    hdwidget:set_text(GetHdUsage())
  end
)
hdwidgettimer:start()

Sustituimos la parte donde solo se mostraba el reloj:

if s == 1 then right_layout:add(wibox.widget.systray()) end
right_layout:add(mytextclock)

Por:

for s = 1, screen.count() do
    if s == 1 then
        right_layout:add(wibox.widget.systray())
        right_layout:add(hdwidget)
        delightful.utils.fill_wibox_container(delightful_widgets, delightful_config, right_layout)
    end

Arrancamos Awesome y ya lo tenemos listo :)


Autor: Kr0m -- 13/06/2017 21:06:35