version = "1.0.1" local home = os.getenv("HOME") local xpm_path = home .. "/.local/share/xplr/dtomvan/xpm.xplr" local xpm_url = "https://github.com/dtomvan/xpm.xplr" package.path = home .. "/.config/xplr/plugins/?/init.lua;" .. home .. "/.config/xplr/plugins/?.lua;" .. package.path package.path = package.path .. ";" .. xpm_path .. "/?.lua;" .. xpm_path .. "/?/init.lua" os.execute(string.format("[ -e '%s' ] || git clone '%s' '%s'", xpm_path, xpm_url, xpm_path)) require("xpm").setup({ plugins = { -- Let xpm manage itself "dtomvan/xpm.xplr", "Junker/nuke.xplr", "prncss-xyz/icons.xplr", "gitlab:hartan/web-devicons.xplr", "sayanarijit/fzf.xplr", "sayanarijit/nvim-ctrl.xplr", }, auto_install = true, auto_cleanup = true, }) require("nuke").setup({ pager = "less -XR", open = { run_executables = false, custom = { { mime_regex = "^image/.*", command = "loupe {}" }, { mime_regex = "^video/.*", command = "showtime {}" }, { mime_regex = "^audio/.*", command = "decibels {}" }, { mime_regex = "^text/.*", command = "nvim {}" }, { mime_regex = ".*", command = "xdg-open {}" }, { mime = "application/pdf", command = "papers {}" }, { mime = "application/json", command = "nvim {}" }, }, }, smart_view = { custom = { { extension = "sh", command = "bat -p -l bash {}" }, { extension = "py", command = "bat -p -l py {}" }, { extension = "json", command = "bat -p -l json {}" }, { extension = "yaml", command = "bat -p -l yaml {}" }, { extension = "yml", command = "bat -p -l yaml {}" }, { extension = "toml", command = "bat -p -l toml {}" }, { extension = "md", command = "glow -p {}" }, { extension = "service", command = "bat -p -l ini {}" }, { extension = "timer", command = "bat -p -l ini {}" }, { extension = "Dockerfile", command = "bat -p -l dockerfile {}" }, { extension = "Containerfile", command = "bat -p -l dockerfile {}" }, { extension = "bashrc", command = "bat -p -l bash {}" }, { extension = "zshrc", command = "bat -p -l bash {}" }, { extension = "profile", command = "bat -p -l bash {}" }, { extension = "zprofile", command = "bat -p -l bash {}" }, { extension = "zshenv", command = "bat -p -l bash {}" }, { extension = "css", command = "bat -p -l css {}" }, }, }, })