- You eventually update ``wiki`` submodule with a thorough section.
-Contributed widgets have to be put in ``lain/widgets/contrib``.
+Contributed widgets have to be put in ``widget/contrib``.
Screenshots
-----------
--]]
return {
- layout = require("lain.layout"),
- util = require("lain.util"),
- widgets = require("lain.widgets")
+ layout = require("lain.layout"),
+ util = require("lain.util"),
+ widget = require("lain.widget")
}
local setmetatable = setmetatable
-- ALSA volume
--- lain.widgets.alsa
+-- lain.widget.alsa
local function worker(args)
local alsa = { widget = wibox.widget.textbox() }
local setmetatable = setmetatable
-- ALSA volume bar
--- lain.widgets.alsabar
+-- lain.widget.alsabar
local alsabar = {
colors = {
background = "#000000",
local setmetatable = setmetatable
-- Battery infos
--- lain.widgets.bat
+-- lain.widget.bat
local function worker(args)
local bat = { widget = wibox.widget.textbox() }
local setmetatable = setmetatable
-- Calendar notification
--- lain.widgets.calendar
+-- lain.widget.calendar
local calendar = { offset = 0 }
function calendar.hide()
local wrequire = require("lain.helpers").wrequire
local setmetatable = setmetatable
-local widgets = { _NAME = "lain.widgets.contrib" }
+local widgets = { _NAME = "lain.widget.contrib" }
return setmetatable(widgets, { __index = wrequire })
local setmetatable = setmetatable
-- Keyboard layout switcher
--- lain.widgets.contrib.kblayout
+-- lain.widget.contrib.kblayout
local kbdlayout = {}
local function worker(args)
local setmetatable = setmetatable
-- MOC audio player
--- lain.widgets.contrib.moc
+-- lain.widget.contrib.moc
local moc = {}
local function worker(args)
local type = type
-- Redshift
--- lain.widgets.contrib.redshift
+-- lain.widget.contrib.redshift
local redshift = { active = false, pid = nil }
function redshift:start()
local string = { format = string.format, gsub = string.gsub }
-- Taskwarrior notification
--- lain.widgets.contrib.task
+-- lain.widget.contrib.task
local task = {}
function task.hide()
tpbat.lua
Battery status widget for ThinkPad laptops that use SMAPI
- lain.widgets.contrib.tpbat
+ lain.widget.contrib.tpbat
More on tp_smapi: http://www.thinkwiki.org/wiki/Tp_smapi
local smapi = require("smapi")
-- ThinkPad SMAPI-enabled battery info widget
--- lain.widgets.contrib.tpbat
+-- lain.widget.contrib.tpbat
local tpbat = {}
function tpbat.hide()
local setmetatable = setmetatable
-- CPU usage
--- lain.widgets.cpu
+-- lain.widget.cpu
local cpu = { core = {} }
local function worker(args)
local setmetatable = setmetatable
-- File system disk space usage
--- lain.widgets.fs
+-- lain.widget.fs
local fs = { unit = { ["mb"] = 1024, ["gb"] = 1024^2 } }
function fs.hide()
local setmetatable = setmetatable
-- Mail IMAP check
--- lain.widgets.imap
+-- lain.widget.imap
local function worker(args)
local imap = { widget = wibox.widget.textbox() }
local wrequire = require("lain.helpers").wrequire
local setmetatable = setmetatable
-local widgets = { _NAME = "lain.widgets" }
+local widgets = { _NAME = "lain.widget" }
return setmetatable(widgets, { __index = wrequire })
local setmetatable = setmetatable
-- Memory usage (ignoring caches)
--- lain.widgets.mem
+-- lain.widget.mem
local mem = {}
local function worker(args)
local setmetatable = setmetatable
-- MPD infos
--- lain.widgets.mpd
+-- lain.widget.mpd
local mpd = {}
local function worker(args)
local setmetatable = setmetatable
-- Network infos
--- lain.widgets.net
+-- lain.widget.net
local function worker(args)
local net = { widget = wibox.widget.textbox() }
local setmetatable = setmetatable
-- PulseAudio volume
--- lain.widgets.pulseaudio
+-- lain.widget.pulseaudio
local function worker(args)
local pulseaudio = { widget = wibox.widget.textbox() }
local setmetatable = setmetatable
-- Pulseaudio volume bar
--- lain.widgets.pulsebar
+-- lain.widget.pulsebar
local pulsebar = {
colors = {
background = "#000000",
local setmetatable = setmetatable
-- System load
--- lain.widgets.sysload
+-- lain.widget.sysload
local sysload = {}
local function worker(args)
local setmetatable = setmetatable
-- coretemp
--- lain.widgets.temp
+-- lain.widget.temp
local temp = {}
local function worker(args)
local setmetatable = setmetatable
-- Template for asynchronous watcher widgets
--- lain.widgets.watch
+-- lain.widget.watch
local function worker(args)
local watch = {}
-- OpenWeatherMap
-- current weather and X-days forecast
--- lain.widgets.weather
+-- lain.widget.weather
local function worker(args)
local weather = { widget = wibox.widget.textbox() }
-Subproject commit 32904a7e2cc20b9aec497aa9a031324fc535b0f9
+Subproject commit d3b29e25c4d47a5988948d2f9432d9353c826c2a