From: Peter Palfrader Date: Mon, 23 Jun 2014 09:38:22 +0000 (+0200) Subject: Ship bashrc/screenrc/vimrc via puppet X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=93132ac1a38e33dc6d026fa5feec1f501a5cbaca;p=mirror%2Fdsa-puppet.git Ship bashrc/screenrc/vimrc via puppet --- diff --git a/modules/debian-org/files/root-dotfiles/bashrc b/modules/debian-org/files/root-dotfiles/bashrc new file mode 100644 index 000000000..7b7ee5943 --- /dev/null +++ b/modules/debian-org/files/root-dotfiles/bashrc @@ -0,0 +1,13 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. + +# Note: PS1 and umask are already set in /etc/profile. You should not +# need this unless you want different defaults for root. +# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ ' +# umask 022 + +# You may uncomment the following lines if you want `ls' to be colorized: +export LS_OPTIONS='--color=auto' +eval "`dircolors`" +alias ls='ls $LS_OPTIONS' +alias ll='ls $LS_OPTIONS -l' +alias l='ls $LS_OPTIONS -lA' diff --git a/modules/debian-org/files/root-dotfiles/screenrc b/modules/debian-org/files/root-dotfiles/screenrc new file mode 100644 index 000000000..0fd9712d0 --- /dev/null +++ b/modules/debian-org/files/root-dotfiles/screenrc @@ -0,0 +1,70 @@ +startup_message off +deflogin on +#vbell off +defscrollback 10000 + +# The vt100 description does not mention "dl". *sigh* +#termcapinfo vt100 dl=5\E[M + +## turn sending of screen messages to hardstatus off +#hardstatus on +# +## Set the hardstatus prop on gui terms to set the titlebar/icon title +#termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007 +## use this for the hard status string +#hardstatus string "%h%? users: %u%?" +#hardstatus alwayslastline "%{b w} %H %{=} | %{+bry}%D %d-%m-%y %c %{= d} | %w" +# +## set these terminals up to be 'optimal' instead of vt100 +#termcapinfo xterm*|linux*|rxvt*|Eterm* OP + + +#caption always "%{rw} * %H * | $LOGNAME | %{-}%-Lw%{rw}%50>%{rW}%n%f* %t %{-}%+Lw%<" +#caption always "%{rw} * %H * | $LOGNAME | %{bw}%c %D | %{-}%-Lw%{rw}%50>%{rW}%n%f* %t %{-}%+Lw%<" +#caption always "%{=b}%?%F%:%45=%n*%f %t%?%?%F%{r}%:%{s kk}%?%H%?%F%{-}%? %L=%-Lw%45L>%?%F%{g}%?%n*%f %t%?%F%{-}%?%+Lw%-17= %?%F%{y}%?%c %Y-%m-%d%?" + +#caption always " %{r}%H%{d} %?%F*%: %? | %{r}$LOGNAME%{d} | %{b}%-Lw%{b}%50>%{kw}%n%f* %t %{-}%+Lw%<" +caption always " %?%F%{r}%?%H%{r}%?%F*%: %? %{rd}| %{r}$LOGNAME%{d} | %{b}%-Lw%{b}%50>%{kw}%n%f* %t %{-}%+Lw%<" +#caption always " %{r}%H%{d} | %{r}$LOGNAME%{d} | %{b}%-Lw%{b}%50>%{kw}%n%f* %t %{-}%+Lw%<" +#caption always " %{r}%H%{d} | %{r}$LOGNAME%{d} | %{b-}%-Lw%{b-}%50>%{bW}%n%f* %t %{-}%+Lw%<" +#caption always " %{=r-}%H%{=b-} | %{=}$LOGNAME%{=b-} | %{b-}%-Lw%{b-}%50>%{bW}%n%f* %t %{-}%+Lw%<" + +# To get screen to add lines to xterm's scrollback buffer, uncomment the +# following termcapinfo line which tells xterm to use the normal screen buffer +# (which has scrollback), not the alternate screen buffer. +# +# also makes screen block so irssi ping timeouts +#termcapinfo xterm|xterms|xs|rxvt ti@:te@ + +# fix screens copy&paste +defbce on + + +bindkey ® next +bindkey ¬ prev +# home and end +#bindkey -k kh prev +#bindkey -k kH next + +bindkey î screen +# xterm: +bindkey "^[[1;5D" prev +bindkey "^[[1;5C" next +bindkey "^[[1;5A" focus up +bindkey "^[[1;5B" focus down + +# gnome terminal (in screen: +#bindkey "^[n" screen +bindkey "^[O5D" prev +bindkey "^[O5C" next +bindkey "^[O5A" focus up +bindkey "^[O5B" focus down + +# urxvt shift+left/right +#bindkey "^[[d" prev +#bindkey "^[[c" next +#bindkey "^[[a" focus up +#bindkey "^[[b" focus down + + +defnonblock 5 diff --git a/modules/debian-org/files/root-dotfiles/vimrc b/modules/debian-org/files/root-dotfiles/vimrc new file mode 100644 index 000000000..baeffd940 --- /dev/null +++ b/modules/debian-org/files/root-dotfiles/vimrc @@ -0,0 +1,83 @@ +runtime! debian.vim +filetype plugin on +set ai +:set nocompatible +:syn on +:set title +:set pastetoggle= +:set listchars=tab:»­,trail:· +:set list +:nmap :set invlist +:imap :set invlist +:set clipboard^=autoselectml guioptions+=A +let g:Imap_UsePlaceHolders = 1 +let g:Imap_FreezeImap = 1 +:hi MatchParen ctermbg=black +colorscheme peachpuff + +map :n +map :N +map :wn +map :wN +map fd ggV/^-- gq + +nnoremap :make + +nnoremap :bprevious +nnoremap :bnext +inoremap :bprevious +inoremap :bnext + +nnoremap :bprevious +nnoremap :bnext +inoremap :bprevious +inoremap :bnext + +nnoremap [1;2D :bprevious +nnoremap [1;2C :bnext +inoremap [1;2D :bprevious +inoremap [1;2C :bnext + +nnoremap [D :bprevious +nnoremap [C :bnext +inoremap [D :bprevious +inoremap [C :bnext + +nnoremap [d :bprevious +nnoremap [c :bnext +inoremap [d :bprevious +inoremap [c :bnext + +" nnoremap :bnew +nnoremap :bprevious +nnoremap :bnext + +if &term =~ '^screen' + " tmux will send xterm-style keys when xterm-keys is on + execute "set =\e[1;*A" + execute "set =\e[1;*B" + execute "set =\e[1;*C" + execute "set =\e[1;*D" +endif + + + +" wild/tab behavior +" ================= +set wildmode=longest,list:longest,list:full + +" spelling stuff +" ============== +set spellfile=~/.vim.spell.en.add +:nmap :set invspell +:imap :set invspell + +" Searching and highlighting +" ========================== +hi Search cterm=NONE ctermfg=yellow ctermbg=19 +set hlsearch +nnoremap :noh + +set tabpagemax=50 +" Do not close buffers we don't see +set hidden diff --git a/modules/debian-org/manifests/init.pp b/modules/debian-org/manifests/init.pp index 59a306281..a6270d8b3 100644 --- a/modules/debian-org/manifests/init.pp +++ b/modules/debian-org/manifests/init.pp @@ -306,4 +306,14 @@ class debian-org { matches => [ 'paths', 'contents' ], schedule => weekly } + + file { '/root/.bashrc': + source => 'puppet:///modules/debian-org/root-dotfiles/bashrc', + } + file { '/root/.screenrc': + source => 'puppet:///modules/debian-org/root-dotfiles/screenrc', + } + file { '/root/.vimrc': + source => 'puppet:///modules/debian-org/root-dotfiles/vimrc', + } }