<commit_before>#
# Cookbook Name:: dotfiles
# Recipe:: tmux
#

package 'tmux' do
end

directory '/Users/miku/.tmux' do
  mode '0700'
  owner 'miku'
end

directory '/Users/miku/.tmux/plugins' do
  mode '0700'
  owner 'miku'
  recursive true
end

git '/Users/miku/.tmux/plugins/tpm' do
  repository 'https://github.com/tmux-plugins/tpm'
  user 'miku'
end

execute 'reload_tmux' do
  action :nothing
  command 'tmux source /Users/miku/.tmux.conf'
  guard_interpreter :bash
  only_if 'tmux info &> /dev/null', user: 'miku'
  user 'miku'
end

cookbook_file '/Users/miku/.tmux.conf' do
  source 'tmux.conf'
  mode '0700'
  owner 'miku'
  notifies :run, 'execute[reload_tmux]', :delayed
end

# powerline dependencies<commit_msg>Install tmux plugins on config change<commit_after>#
# Cookbook Name:: dotfiles
# Recipe:: tmux
#

package 'tmux' do
end

directory '/Users/miku/.tmux' do
  mode '0700'
  owner 'miku'
end

directory '/Users/miku/.tmux/plugins' do
  mode '0700'
  owner 'miku'
  recursive true
end

git '/Users/miku/.tmux/plugins/tpm' do
  repository 'https://github.com/tmux-plugins/tpm'
  user 'miku'
end

execute 'reload_tmux' do
  action :nothing
  command 'tmux source /Users/miku/.tmux.conf'
  guard_interpreter :bash
  only_if 'tmux info &> /dev/null', user: 'miku'
  user 'miku'
end

execute 'install_plugins' do
  action :nothing
  command '/Users/miku/.tmux/plugins/tpm/bin/install_plugins'
  user 'miku'
end

cookbook_file '/Users/miku/.tmux.conf' do
  source 'tmux.conf'
  mode '0700'
  owner 'miku'
  notifies :run, 'execute[reload_tmux]', :delayed
  notifies :run, 'execute[install_plugins]', :delayed
end

# powerline dependencies
{'fraction_non_alphanumeric': 0.1341019417475728, 'fraction_numerical': 0.014563106796116505, 'mean_word_length': 3.9223880597014924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '604517', 'n_tokens_mistral': 660, 'n_tokens_neox': 644, 'n_words': 162}