Dotfiles/modules/tmux.lua
Ade Attwood 56bcdd34b3 refactor(core): move from base16 themes to nord
This is moves everything I can think of. A lot of the things I use have
this built in. The vim and tmux themes has been added so the place I
spend all my time looks nice.
2024-06-08 14:50:57 +01:00

31 lines
954 B
Lua

local git = require "lib.git"
local plugin_dir = os.getenv "HOME" .. "/.tmux/plugins"
local config_file = os.getenv "HOME" .. "/.tmux.conf"
if not configz.is_file(config_file) then
configz.link(config_file, {
source = os.getenv "PWD" .. "/site-modules/core/files/tmux.conf",
})
end
if not configz.is_directory(plugin_dir) then
configz.directory(plugin_dir)
end
local plugins = {
["tmux-yank"] = { url = "https://github.com/tmux-plugins/tmux-yank.git" },
["tmux-open"] = { url = "https://github.com/tmux-plugins/tmux-open.git" },
["tmux-copycat"] = { url = "https://github.com/tmux-plugins/tmux-copycat.git" },
["tmux-nord"] = { url = "https://github.com/nordtheme/tmux.git", revision = "main" },
}
for plugin, config in pairs(plugins) do
git.repo {
src = config.url,
target = plugin_dir .. "/" .. plugin,
version = config.revision or "master",
}
end
configz.run(string.format("rm -rf %s/base16-tmux", plugin_dir))