tmux: Make config file optional and configurable
This commit is contained in:
parent
2106fdb0ae
commit
4a071406d7
2 changed files with 22 additions and 21 deletions
|
@ -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
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue