From 6a0f88d7d4974b56c021a516ee78f3c0bc02dfc0 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sun, 11 Oct 2015 12:02:22 +0200 Subject: [PATCH] manage screenrc and set hostname in vagrant box --- Vagrantfile | 2 ++ salt/roots/base/init.sls | 7 +++++++ salt/roots/base/screenrc | 14 ++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 salt/roots/base/screenrc diff --git a/Vagrantfile b/Vagrantfile index 8aec6d0..a4d3642 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -14,6 +14,8 @@ Vagrant.configure(2) do |config| # boxes at https://atlas.hashicorp.com/search. config.vm.box = "debian/jessie64" + config.vm.hostname = "gva-dev" + # Disable automatic box update checking. If you disable this, then # boxes will only be checked for updates when the user runs # `vagrant box outdated`. This is not recommended. diff --git a/salt/roots/base/init.sls b/salt/roots/base/init.sls index 87bb303..db79767 100644 --- a/salt/roots/base/init.sls +++ b/salt/roots/base/init.sls @@ -4,3 +4,10 @@ base-packages: - screen - htop - git + +/home/vagrant/.screenrc: + file.managed: + - user: vagrant + - group: vagrant + - mode: 0644 + - source: salt://base/screenrc diff --git a/salt/roots/base/screenrc b/salt/roots/base/screenrc new file mode 100644 index 0000000..a555c1e --- /dev/null +++ b/salt/roots/base/screenrc @@ -0,0 +1,14 @@ +# vim: syntax=screen + +hardstatus on +hardstatus alwayslastline +hardstatus string "%{= r}[ %{G}%H%{= r} ] %= %{=b b}%-w%{=rb db}%>%n %t%{-}%+w %=%{= r} [ %{G}%c %{M}%D %m-%d %{r}]" + +startup_message off + +defscrollback 10240 + +bind f eval "caption splitonly" "hardstatus ignore" +bind F eval "caption always" "hardstatus alwayslastline" + +defbce "on"