tmux: Make config file optional and configurable

This commit is contained in:
Ossi Salmi 2014-01-20 00:54:02 +02:00
parent 2106fdb0ae
commit 4a071406d7
2 changed files with 22 additions and 21 deletions

View file

@ -1,9 +0,0 @@
set -g prefix C-a
set -g base-index 1
set -g status off
bind C-a send-prefix
bind C-l last-window
bind C-n next-window
bind C-p previous-window
bind C-@ next-window
bind Space next-window

View file

@ -1,14 +1,23 @@
# Install tmux
# Install tmux.
#
class tmux {
# === Parameters
#
# $source:
# Configuration file source. None by default.
#
class tmux($source=undef) {
if $::operatingsystem != "OpenBSD" {
package { "tmux":
ensure => installed,
before => File["/etc/tmux.conf"],
before => $source ? {
undef => undef,
default => File["/etc/tmux.conf"],
},
}
}
if $source {
file { "/etc/tmux.conf":
ensure => present,
mode => "0644",
@ -17,7 +26,8 @@ class tmux {
"openbsd" => "wheel",
default => "root",
},
source => "puppet:///modules/tmux/tmux.conf",
source => $source,
}
}
}