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,23 +1,33 @@
|
||||||
# Install tmux
|
# Install tmux.
|
||||||
#
|
#
|
||||||
class tmux {
|
# === Parameters
|
||||||
|
#
|
||||||
|
# $source:
|
||||||
|
# Configuration file source. None by default.
|
||||||
|
#
|
||||||
|
class tmux($source=undef) {
|
||||||
|
|
||||||
if $::operatingsystem != "OpenBSD" {
|
if $::operatingsystem != "OpenBSD" {
|
||||||
package { "tmux":
|
package { "tmux":
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
before => File["/etc/tmux.conf"],
|
before => $source ? {
|
||||||
|
undef => undef,
|
||||||
|
default => File["/etc/tmux.conf"],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/etc/tmux.conf":
|
if $source {
|
||||||
ensure => present,
|
file { "/etc/tmux.conf":
|
||||||
mode => "0644",
|
ensure => present,
|
||||||
owner => "root",
|
mode => "0644",
|
||||||
group => $::operatingsystem ? {
|
owner => "root",
|
||||||
"openbsd" => "wheel",
|
group => $::operatingsystem ? {
|
||||||
default => "root",
|
"openbsd" => "wheel",
|
||||||
},
|
default => "root",
|
||||||
source => "puppet:///modules/tmux/tmux.conf",
|
},
|
||||||
|
source => $source,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue