-
Notifications
You must be signed in to change notification settings - Fork 0
/
domic.lua
173 lines (150 loc) · 2.81 KB
/
domic.lua
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
local domic = require("domic")
local goos = domic.goos()
local home_path = domic.home_path
local dot_config_path = domic.dot_config_path
local windows_app_data_path = domic.windows_app_data_path
local windows_local_app_data_path = domic.windows_local_app_data_path
local function linuxdata(data)
if goos == "linux" then
return data
end
return ""
end
local function xplatdata(data)
if goos == "linux" then
return data.linux
elseif goos == "windows" then
return data.windows
end
return ""
end
return {
{
name = "alacritty",
dst = xplatdata({
linux = dot_config_path("alacritty"),
windows = windows_app_data_path("alacritty"),
}),
exec = "alacritty",
},
{
name = "awesome",
dst = linuxdata(dot_config_path("awesome")),
exec = "alacritty",
},
{
name = "bash",
src = "bash/bashrc",
dst = home_path(".bashrc"),
exec = "bash",
},
{
name = "bash_alias",
src = "bash/bash_aliases",
dst = home_path(".bash_aliases"),
exec = "bash",
},
{
name = "bin",
dst = home_path(".bin"),
},
{
name = "dunst",
dst = linuxdata(dot_config_path("dunst")),
exec = "dunst",
},
{
name = "fontconfig",
dst = linuxdata(dot_config_path("fontconfig")),
},
{
name = "git",
dst = dot_config_path("git"),
exec = "git",
},
{
name = "gitui",
dst = xplatdata({
linux = dot_config_path("gitui"),
windows = windows_app_data_path("gitui"),
}),
exec = "gitui",
},
{
name = "go",
dst = xplatdata({
linux = dot_config_path("go"),
windows = windows_app_data_path("go"),
}),
exec = "go",
},
{
name = "joplin-desktop",
dst = dot_config_path("joplin-desktop"),
exec = linuxdata("joplin-desktop"),
},
{
name = "lf",
dst = xplatdata({
linux = dot_config_path("lf"),
windows = windows_local_app_data_path("lf"),
}),
exec = "lf",
},
{
name = "mpv",
dst = xplatdata({
linux = dot_config_path("mpv"),
windows = windows_app_data_path("mpv"),
}),
exec = "mpv",
},
{
name = "picom",
dst = linuxdata(dot_config_path("picom")),
exec = "picom",
},
{
name = "pip",
src = "pip/pip.conf",
dst = xplatdata({
linux = dot_config_path("pip/pip.conf"),
windows = windows_app_data_path("pip/pip.ini"),
}),
exec = "pip",
},
{
name = "powershell",
dst = xplatdata({
windows = home_path("Documents/PowerShell"),
}),
exec = "pwsh",
},
{
name = "rofi",
dst = linuxdata(dot_config_path("rofi")),
exec = "rofi",
},
{
name = "sqlite",
src = "sqlite/sqliterc",
dst = linuxdata(home_path(".sqliterc")),
exec = "sqlite3",
},
{
name = "starship",
src = "starship/starship.toml",
dst = dot_config_path("starship.toml"),
exec = "starship",
},
{
name = "tmux",
dst = linuxdata(dot_config_path("tmux")),
exec = "tmux",
},
{
name = "x11",
dst = linuxdata(home_path(".xprofile")),
exec = "X",
},
}