···
2
+
local home = os.getenv("HOME")
3
+
local xpm_path = home .. "/.local/share/xplr/dtomvan/xpm.xplr"
4
+
local xpm_url = "https://github.com/dtomvan/xpm.xplr"
6
+
package.path = home .. "/.config/xplr/plugins/?/init.lua;" .. home .. "/.config/xplr/plugins/?.lua;" .. package.path
8
+
package.path = package.path .. ";" .. xpm_path .. "/?.lua;" .. xpm_path .. "/?/init.lua"
10
+
os.execute(string.format("[ -e '%s' ] || git clone '%s' '%s'", xpm_path, xpm_url, xpm_path))
12
+
require("xpm").setup({
14
+
-- Let xpm manage itself
17
+
"prncss-xyz/icons.xplr",
18
+
"gitlab:hartan/web-devicons.xplr",
19
+
"sayanarijit/fzf.xplr",
20
+
"sayanarijit/nvim-ctrl.xplr",
22
+
auto_install = true,
23
+
auto_cleanup = true,
26
+
require("nuke").setup({
29
+
run_executables = false,
31
+
{ mime_regex = "^image/.*", command = "loupe {}" },
32
+
{ mime_regex = "^video/.*", command = "showtime {}" },
33
+
{ mime_regex = "^audio/.*", command = "decibels {}" },
34
+
{ mime_regex = "^text/.*", command = "nvim {}" },
35
+
{ mime_regex = ".*", command = "xdg-open {}" },
36
+
{ mime = "application/pdf", command = "papers {}" },
37
+
{ mime = "application/json", command = "nvim {}" },
42
+
{ extension = "sh", command = "bat -p -l bash {}" },
43
+
{ extension = "py", command = "bat -p -l py {}" },
44
+
{ extension = "json", command = "bat -p -l json {}" },
45
+
{ extension = "yaml", command = "bat -p -l yaml {}" },
46
+
{ extension = "yml", command = "bat -p -l yaml {}" },
47
+
{ extension = "toml", command = "bat -p -l toml {}" },
48
+
{ extension = "md", command = "glow -p {}" },
49
+
{ extension = "service", command = "bat -p -l ini {}" },
50
+
{ extension = "timer", command = "bat -p -l ini {}" },
51
+
{ extension = "Dockerfile", command = "bat -p -l dockerfile {}" },
52
+
{ extension = "Containerfile", command = "bat -p -l dockerfile {}" },
53
+
{ extension = "bashrc", command = "bat -p -l bash {}" },
54
+
{ extension = "zshrc", command = "bat -p -l bash {}" },
55
+
{ extension = "profile", command = "bat -p -l bash {}" },
56
+
{ extension = "zprofile", command = "bat -p -l bash {}" },
57
+
{ extension = "zshenv", command = "bat -p -l bash {}" },
58
+
{ extension = "css", command = "bat -p -l css {}" },