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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
Status:children_add(function(self)
local h = self._current.hovered
if h and h.link_to then
return " -> " .. tostring(h.link_to)
else
return ""
end
end, 3300, Status.LEFT)
Status:children_add(function()
local h = cx.active.current.hovered
if not h or ya.target_family() ~= "unix" then
return ""
end
return ui.Line({
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
":",
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
" ",
})
end, 500, Status.RIGHT)
Header:children_add(function()
if ya.target_family() ~= "unix" then
return ""
end
return ui.Span(ya.user_name() .. "@" .. ya.host_name() .. ":"):fg("blue")
end, 500, Header.LEFT)
if os.getenv("NVIM") then
require("toggle-pane"):entry("min-preview")
end
require("smart-enter"):setup({
open_multi = true,
})
require("full-border"):setup({
type = ui.Border.PLAIN, -- or ui.Border.ROUNDED
})
th.git = th.git or {}
th.git.modified_sign = "M"
th.git.deleted_sign = "D"
th.git.added_sign = "A"
th.git.untracked_sign = "?"
th.git.ignored_sign = "X"
th.git.updated_sign = "U"
require("git"):setup()
require("mactag"):setup({
keys = {
r = "Red",
o = "Orange",
y = "Yellow",
g = "Green",
b = "Blue",
p = "Purple",
},
colors = {
Red = "#ee7b70",
Orange = "#f5bd5c",
Yellow = "#fbe764",
Green = "#91fc87",
Blue = "#5fa3f8",
Purple = "#cb88f8",
},
})
require("folder-rules"):setup()
|