-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinit.lua
More file actions
33 lines (30 loc) · 869 Bytes
/
Copy pathinit.lua
File metadata and controls
33 lines (30 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
local engine = require(... .. ".engine")
local layout = require(... .. ".layout")
local editor = require(... .. ".editor")
local switcher = require(... .. ".switcher")
local default_editor = editor.default_editor
local default_layout = layout.create{}
local gcolor = require("gears.color")
local beautiful = require("beautiful")
local icon_raw
local source = debug.getinfo(1, "S").source
if source:sub(1, 1) == "@" then
icon_raw = source:match("^@(.-)[^/]+$") .. "icon.png"
end
local function get_icon()
if icon_raw ~= nil then
return gcolor.recolor_image(icon_raw, beautiful.fg_normal)
else
return nil
end
end
return {
engine = engine,
layout = layout,
editor = editor,
switcher = switcher,
default_editor = default_editor,
default_layout = default_layout,
icon_raw = icon_raw,
get_icon = get_icon,
}