My user config prefs
1version = "1.0.1"
2local home = os.getenv("HOME")
3local xpm_path = home .. "/.local/share/xplr/dtomvan/xpm.xplr"
4local xpm_url = "https://github.com/dtomvan/xpm.xplr"
5
6package.path = home .. "/.config/xplr/plugins/?/init.lua;" .. home .. "/.config/xplr/plugins/?.lua;" .. package.path
7
8package.path = package.path .. ";" .. xpm_path .. "/?.lua;" .. xpm_path .. "/?/init.lua"
9
10os.execute(string.format("[ -e '%s' ] || git clone '%s' '%s'", xpm_path, xpm_url, xpm_path))
11
12require("xpm").setup({
13 plugins = {
14 -- Let xpm manage itself
15 "dtomvan/xpm.xplr",
16 "Junker/nuke.xplr",
17 "prncss-xyz/icons.xplr",
18 "gitlab:hartan/web-devicons.xplr",
19 "sayanarijit/fzf.xplr",
20 "sayanarijit/nvim-ctrl.xplr",
21 },
22 auto_install = true,
23 auto_cleanup = true,
24})
25
26require("nuke").setup({
27 pager = "less -XR",
28 open = {
29 run_executables = false,
30 custom = {
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 {}" },
38 },
39 },
40 smart_view = {
41 custom = {
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 {}" },
59 },
60 },
61})