This repository has been archived on 2024-09-01. You can view files and clone it, but cannot push or open issues or pull requests.
al-skel/home/.config/awesome/widgets/sysinf.lua

34 lines
799 B
Lua
Raw Normal View History

-- {{{ init environment
local wakka = {}
local capi = {
2018-05-18 22:36:34 -05:00
mouse = mouse,
screen = screen
}
-- {{{ display
-- formats the lines for the notify
local function display()
2018-05-18 22:36:34 -05:00
local lines = "<u>AUR Updates:</u>\n"
local f = io.popen("archey", "r")
local s = f:read('*all')
line = lines .. "\n" .. s .. "\n"
f:close()
return line
end
-- }}}
-- }}}
function wakka.addToWidget(mywidget)
2018-05-18 22:36:34 -05:00
mywidget:add_signal('mouse::enter', function ()
usage = naughty.notify({
text = string.format('<span font_desc="%s">%s</span>', "monospace", display()),
timeout = 0,
hover_timeout = 0.5,
screen = capi.mouse.screen
})
end)
mywidget:add_signal('mouse::leave', function () naughty.destroy(usage) end)
end
return wakka