Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
--]]

return {
layout = require("lain.layout"),
util = require("lain.util"),
widget = require("lain.widget")
layout = require(tostring(...):match(".*lain") .. ".layout"),
util = require(tostring(...):match(".*lain") .. ".util"),
widget = require(tostring(...):match(".*lain") .. ".widget")
}
4 changes: 2 additions & 2 deletions layout/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

--]]

local wrequire = require("lain.helpers").wrequire
local wrequire = require(tostring(...):match(".*lain") .. ".helpers").wrequire
local setmetatable = setmetatable

local layout = { _NAME = "lain.layout" }
local layout = { _NAME = tostring(...):match(".*lain") .. ".layout" }

return setmetatable(layout, { __index = wrequire })
4 changes: 2 additions & 2 deletions util/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ local sqrt = math.sqrt
local pairs = pairs
local client = client
local tonumber = tonumber
local wrequire = require("lain.helpers").wrequire
local wrequire = require(tostring(...):match(".*lain") .. ".helpers").wrequire
local setmetatable = setmetatable

-- Lain utilities submodule
-- lain.util
local util = { _NAME = "lain.util" }
local util = { _NAME = tostring(...):match(".*lain") .. ".util" }

-- Like awful.menu.clients, but only show clients of currently selected tags
function util.menu_clients_current_tags(menu, args)
Expand Down
2 changes: 1 addition & 1 deletion util/menu_iterator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-- lain.util.menu_iterator

local naughty = require("naughty")
local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local atable = require("awful.util").table
local assert = assert
local pairs = pairs
Expand Down
2 changes: 1 addition & 1 deletion widget/alsa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local shell = require("awful.util").shell
local wibox = require("wibox")
local string = string
Expand Down
2 changes: 1 addition & 1 deletion widget/alsabar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local awful = require("awful")
local naughty = require("naughty")
local wibox = require("wibox")
Expand Down
4 changes: 2 additions & 2 deletions widget/bat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local fs = require("gears.filesystem")
local naughty = require("naughty")
local wibox = require("wibox")
Expand All @@ -22,7 +22,7 @@ local function factory(args)
local pspath = args.pspath or "/sys/class/power_supply/"

if not fs.is_dir(pspath) then
naughty.notify { text = "lain.widget.bat: invalid power supply path", timeout = 0 }
naughty.notify { text = tostring(...):match(".*lain") .. ".widget.bat: invalid power supply path", timeout = 0 }
Comment thread
Trial97 marked this conversation as resolved.
Outdated
return
end

Expand Down
4 changes: 2 additions & 2 deletions widget/cal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

--]]

local helpers = require("lain.helpers")
local markup = require("lain.util.markup")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local markup = require(tostring(...):match(".*lain") .. ".util.markup")
local awful = require("awful")
local naughty = require("naughty")
local floor = math.floor
Expand Down
4 changes: 2 additions & 2 deletions widget/contrib/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

--]]

local wrequire = require("lain.helpers").wrequire
local wrequire = require(tostring(...):match(".*lain") .. ".helpers").wrequire
local setmetatable = setmetatable

local widget = { _NAME = "lain.widget.contrib" }
local widget = { _NAME = tostring(...):match(".*lain") .. ".widget.contrib" }

return setmetatable(widget, { __index = wrequire })
2 changes: 1 addition & 1 deletion widget/contrib/moc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local shell = require("awful.util").shell
local focused = require("awful.screen").focused
local escape_f = require("awful.util").escape
Expand Down
2 changes: 1 addition & 1 deletion widget/contrib/redshift.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

--]]

local async = require("lain.helpers").async
local async = require(tostring(...):match(".*lain") .. ".helpers").async
local awful = require("awful")
local execute = os.execute
local type = type
Expand Down
4 changes: 2 additions & 2 deletions widget/contrib/task.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

--]]

local helpers = require("lain.helpers")
local markup = require("lain.util").markup
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local markup = require(tostring(...):match(".*lain") .. ".util").markup
local awful = require("awful")
local naughty = require("naughty")
local mouse = mouse
Expand Down
2 changes: 1 addition & 1 deletion widget/contrib/tp_smapi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local focused = require("awful.screen").focused
local naughty = require("naughty")
local wibox = require("wibox")
Expand Down
2 changes: 1 addition & 1 deletion widget/cpu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local wibox = require("wibox")
local math = math
local string = string
Expand Down
2 changes: 1 addition & 1 deletion widget/fs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local Gio = require("lgi").Gio
local focused = require("awful.screen").focused
local wibox = require("wibox")
Expand Down
2 changes: 1 addition & 1 deletion widget/imap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local naughty = require("naughty")
local wibox = require("wibox")
local awful = require("awful")
Expand Down
4 changes: 2 additions & 2 deletions widget/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

--]]

local wrequire = require("lain.helpers").wrequire
local wrequire = require(tostring(...):match(".*lain") .. ".helpers").wrequire
local setmetatable = setmetatable

local widget = { _NAME = "lain.widget" }
local widget = { _NAME = tostring(...):match(".*lain") .. ".widget" }

return setmetatable(widget, { __index = wrequire })
2 changes: 1 addition & 1 deletion widget/mem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local wibox = require("wibox")
local gmatch, lines, floor = string.gmatch, io.lines, math.floor

Expand Down
2 changes: 1 addition & 1 deletion widget/mpd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local shell = require("awful.util").shell
local escape_f = require("awful.util").escape
local focused = require("awful.screen").focused
Expand Down
2 changes: 1 addition & 1 deletion widget/net.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local naughty = require("naughty")
local wibox = require("wibox")
local string = string
Expand Down
2 changes: 1 addition & 1 deletion widget/pulse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local shell = require("awful.util").shell
local wibox = require("wibox")
local string = string
Expand Down
2 changes: 1 addition & 1 deletion widget/pulsebar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local awful = require("awful")
local naughty = require("naughty")
local wibox = require("wibox")
Expand Down
2 changes: 1 addition & 1 deletion widget/sysload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local wibox = require("wibox")
local open, match = io.open, string.match

Expand Down
2 changes: 1 addition & 1 deletion widget/temp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

--]]

local helpers = require("lain.helpers")
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local wibox = require("wibox")
local tonumber = tonumber

Expand Down
4 changes: 2 additions & 2 deletions widget/weather.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

--]]

local helpers = require("lain.helpers")
local json = require("lain.util").dkjson
local helpers = require(tostring(...):match(".*lain") .. ".helpers")
local json = require(tostring(...):match(".*lain") .. ".util").dkjson
local focused = require("awful.screen").focused
local naughty = require("naughty")
local wibox = require("wibox")
Expand Down