feat(pp): move the tmux config over to configz
This commit is contained in:
parent
8d56ef0940
commit
447563c596
4 changed files with 30 additions and 49 deletions
|
|
@ -3,3 +3,4 @@ require("modules.clojure")
|
|||
require("modules.lua-lsp")
|
||||
require("modules.nvim")
|
||||
require("modules.nvm")
|
||||
require("modules.tmux")
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ node default {
|
|||
include core::git
|
||||
include core::zsh
|
||||
include core::bin
|
||||
include core::tmux
|
||||
include core::fonts
|
||||
include core::emacs
|
||||
include core::terminal
|
||||
|
|
|
|||
29
modules/tmux.lua
Normal file
29
modules/tmux.lua
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
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" },
|
||||
["base16-tmux"] = { url = "https://github.com/tinted-theming/base16-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
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
#
|
||||
# Config for tmux terminal multiplexer
|
||||
#
|
||||
# Author Ade Attwood <code@adeattwood.co.uk>
|
||||
# Updated 2018-07-16
|
||||
#
|
||||
|
||||
class core::tmux {
|
||||
exec { 'make tmux dir':
|
||||
creates => "${user_home}/.tmux/plugins",
|
||||
path => '/usr/bin:/usr/sbin:/bin',
|
||||
command => "mkdir -p ${user_home}/.tmux/plugin",
|
||||
}
|
||||
|
||||
file { "${user_home}/.tmux.conf":
|
||||
ensure => 'link',
|
||||
owner => $user,
|
||||
target => find_file('core/tmux.conf'),
|
||||
}
|
||||
|
||||
vcsrepo { "${user_home}/.tmux/plugins/tmux-yank":
|
||||
ensure => latest,
|
||||
source => 'https://github.com/tmux-plugins/tmux-yank.git',
|
||||
provider => git,
|
||||
revision => 'master',
|
||||
}
|
||||
|
||||
vcsrepo { "${user_home}/.tmux/plugins/tmux-open":
|
||||
ensure => latest,
|
||||
source => 'https://github.com/tmux-plugins/tmux-open.git',
|
||||
provider => git,
|
||||
revision => 'master',
|
||||
}
|
||||
|
||||
vcsrepo { "${user_home}/.tmux/plugins/tmux-copycat":
|
||||
ensure => latest,
|
||||
source => 'https://github.com/tmux-plugins/tmux-copycat.git',
|
||||
provider => git,
|
||||
revision => 'master',
|
||||
}
|
||||
|
||||
vcsrepo { "${user_home}/.tmux/plugins/base16-tmux":
|
||||
ensure => latest,
|
||||
source => 'https://github.com/tinted-theming/base16-tmux.git',
|
||||
provider => git,
|
||||
revision => 'main',
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue