Unify style and indentation.
This commit is contained in:
parent
ee08eecb49
commit
76d2aa5776
960
editor.lua
960
editor.lua
File diff suppressed because it is too large
Load Diff
42
init.lua
42
init.lua
|
@ -3,12 +3,12 @@ local layout = require(... .. ".layout")
|
||||||
local editor = require(... .. ".editor")
|
local editor = require(... .. ".editor")
|
||||||
local switcher = require(... .. ".switcher")
|
local switcher = require(... .. ".switcher")
|
||||||
local function default_name(tag)
|
local function default_name(tag)
|
||||||
if tag.machi_name_cache == nil then
|
if tag.machi_name_cache == nil then
|
||||||
tag.machi_name_cache =
|
tag.machi_name_cache =
|
||||||
tostring(tag.screen.geometry.width) .. "x" .. tostring(tag.screen.geometry.height) .. "+" ..
|
tostring(tag.screen.geometry.width) .. "x" .. tostring(tag.screen.geometry.height) .. "+" ..
|
||||||
tostring(tag.screen.geometry.x) .. "+" .. tostring(tag.screen.geometry.y) .. '+' .. tag.name
|
tostring(tag.screen.geometry.x) .. "+" .. tostring(tag.screen.geometry.y) .. '+' .. tag.name
|
||||||
end
|
end
|
||||||
return tag.machi_name_cache
|
return tag.machi_name_cache
|
||||||
end
|
end
|
||||||
local default_editor = editor.default_editor
|
local default_editor = editor.default_editor
|
||||||
local default_layout = layout.create{ name_func = default_name }
|
local default_layout = layout.create{ name_func = default_name }
|
||||||
|
@ -18,25 +18,25 @@ local beautiful = require("beautiful")
|
||||||
local icon_raw
|
local icon_raw
|
||||||
local source = debug.getinfo(1, "S").source
|
local source = debug.getinfo(1, "S").source
|
||||||
if source:sub(1, 1) == "@" then
|
if source:sub(1, 1) == "@" then
|
||||||
icon_raw = source:match("^@(.-)[^/]+$") .. "icon.png"
|
icon_raw = source:match("^@(.-)[^/]+$") .. "icon.png"
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_icon()
|
local function get_icon()
|
||||||
if icon_raw ~= nil then
|
if icon_raw ~= nil then
|
||||||
return gcolor.recolor_image(icon_raw, beautiful.fg_normal)
|
return gcolor.recolor_image(icon_raw, beautiful.fg_normal)
|
||||||
else
|
else
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
engine = engine,
|
engine = engine,
|
||||||
layout = layout,
|
layout = layout,
|
||||||
editor = editor,
|
editor = editor,
|
||||||
switcher = switcher,
|
switcher = switcher,
|
||||||
default_name = default_name,
|
default_name = default_name,
|
||||||
default_editor = default_editor,
|
default_editor = default_editor,
|
||||||
default_layout = default_layout,
|
default_layout = default_layout,
|
||||||
icon_raw = icon_raw,
|
icon_raw = icon_raw,
|
||||||
get_icon = get_icon,
|
get_icon = get_icon,
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,9 @@ local INFO = 0
|
||||||
local DEBUG = -1
|
local DEBUG = -1
|
||||||
|
|
||||||
local module = {
|
local module = {
|
||||||
log_level = WARNING,
|
log_level = WARNING,
|
||||||
global_default_cmd = "dw66.",
|
global_default_cmd = "dw66.",
|
||||||
allow_shrinking_by_mouse_moving = false,
|
allow_shrinking_by_mouse_moving = false,
|
||||||
}
|
}
|
||||||
|
|
||||||
local function log(level, msg)
|
local function log(level, msg)
|
||||||
|
|
973
switcher.lua
973
switcher.lua
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue