2021-02-23 06:32:58 +01:00
|
|
|
local engine = require(... .. ".engine")
|
2019-07-13 00:04:39 +02:00
|
|
|
local layout = require(... .. ".layout")
|
|
|
|
local editor = require(... .. ".editor")
|
|
|
|
local switcher = require(... .. ".switcher")
|
2020-03-21 22:01:16 +01:00
|
|
|
local default_editor = editor.default_editor
|
2022-05-24 05:35:00 +02:00
|
|
|
local default_layout = layout.create{}
|
2019-07-13 14:30:38 +02:00
|
|
|
local gcolor = require("gears.color")
|
|
|
|
local beautiful = require("beautiful")
|
2019-07-14 00:39:38 +02:00
|
|
|
|
|
|
|
local icon_raw
|
2019-07-13 14:30:38 +02:00
|
|
|
local source = debug.getinfo(1, "S").source
|
|
|
|
if source:sub(1, 1) == "@" then
|
2021-02-27 02:39:59 +01:00
|
|
|
icon_raw = source:match("^@(.-)[^/]+$") .. "icon.png"
|
2019-07-14 00:39:38 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
local function get_icon()
|
2021-02-27 02:39:59 +01:00
|
|
|
if icon_raw ~= nil then
|
|
|
|
return gcolor.recolor_image(icon_raw, beautiful.fg_normal)
|
|
|
|
else
|
|
|
|
return nil
|
|
|
|
end
|
2019-07-13 14:30:38 +02:00
|
|
|
end
|
2019-07-13 00:04:39 +02:00
|
|
|
|
2019-07-12 00:06:40 +02:00
|
|
|
return {
|
2021-02-27 02:39:59 +01:00
|
|
|
engine = engine,
|
|
|
|
layout = layout,
|
|
|
|
editor = editor,
|
|
|
|
switcher = switcher,
|
|
|
|
default_editor = default_editor,
|
|
|
|
default_layout = default_layout,
|
|
|
|
icon_raw = icon_raw,
|
|
|
|
get_icon = get_icon,
|
2019-07-12 00:06:40 +02:00
|
|
|
}
|