class qdii::tmux {
  package { 'tmux':
    ensure => latest,
  }

  -> file { 'tmux_conf_qdii':
    ensure => file,
    source => "puppet:///modules/qdii/dotfiles/tmux_$::operatingsystem",
    path   => "${qdii::homedir}/.tmux.conf",
    owner  => 'qdii',
    group  => 'qdii',
  }
  -> file { 'tmux_conf_root':
    ensure => file,
    source => "puppet:///modules/qdii/dotfiles/tmux_$::operatingsystem",
    path   => '/root/.tmux.conf',
    owner  => 'root',
    group  => 'root',
  }

  if $qdii::at_work {
    file { 'tmux_ohmyzsh_dir':
      ensure => directory,
      path   => "$qdii::homedir/.oh-my-zsh/plugins/tmux",
    }
    -> file { 'tmux_plugins':
      ensure => file,
      source => 'puppet:///modules/qdii/dotfiles/tmux.plugin.zsh.work',
      path   => "$qdii::homedir/.oh-my-zsh/plugins/tmux/tmux.plugin.zsh",
      owner  => 'qdii',
      group  => 'qdii',
    }
  }
}
