]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Ship bashrc/screenrc/vimrc via puppet
authorPeter Palfrader <peter@palfrader.org>
Mon, 23 Jun 2014 09:38:22 +0000 (11:38 +0200)
committerPeter Palfrader <peter@palfrader.org>
Mon, 23 Jun 2014 09:38:22 +0000 (11:38 +0200)
modules/debian-org/files/root-dotfiles/bashrc [new file with mode: 0644]
modules/debian-org/files/root-dotfiles/screenrc [new file with mode: 0644]
modules/debian-org/files/root-dotfiles/vimrc [new file with mode: 0644]
modules/debian-org/manifests/init.pp

diff --git a/modules/debian-org/files/root-dotfiles/bashrc b/modules/debian-org/files/root-dotfiles/bashrc
new file mode 100644 (file)
index 0000000..7b7ee59
--- /dev/null
@@ -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 (file)
index 0000000..0fd9712
--- /dev/null
@@ -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 (file)
index 0000000..baeffd9
--- /dev/null
@@ -0,0 +1,83 @@
+runtime! debian.vim
+filetype plugin on
+set ai
+:set nocompatible
+:syn on
+:set title
+:set pastetoggle=<F10>
+:set listchars=tab:»­,trail:·
+:set list
+:nmap <F11> :set invlist<return>
+:imap <F11> <C-O>:set invlist<return>
+:set clipboard^=autoselectml guioptions+=A
+let g:Imap_UsePlaceHolders = 1
+let g:Imap_FreezeImap = 1
+:hi MatchParen ctermbg=black
+colorscheme peachpuff
+
+map <F3> :n<return>
+map <F2> :N<return>
+map <F5> :wn<return>
+map <F4> :wN<return>
+map fd ggV/^-- <CR><up>gq
+
+nnoremap <silent> <C-M> :make<return>
+
+nnoremap <silent> <S-left> :bprevious<return>
+nnoremap <silent> <S-right> :bnext<return>
+inoremap <silent> <S-left> <C-O>:bprevious<return>
+inoremap <silent> <S-right> <C-O>:bnext<return>
+
+nnoremap <silent> <C-left> :bprevious<return>
+nnoremap <silent> <C-right> :bnext<return>
+inoremap <silent> <C-left> <C-O>:bprevious<return>
+inoremap <silent> <C-right> <C-O>:bnext<return>
+
+nnoremap <silent> <Esc>[1;2D :bprevious<return>
+nnoremap <silent> <Esc>[1;2C :bnext<return>
+inoremap <silent> <Esc>[1;2D <C-O>:bprevious<return>
+inoremap <silent> <Esc>[1;2C <C-O>:bnext<return>
+
+nnoremap <silent> <Esc>[D :bprevious<return>
+nnoremap <silent> <Esc>[C :bnext<return>
+inoremap <silent> <Esc>[D <C-O>:bprevious<return>
+inoremap <silent> <Esc>[C <C-O>:bnext<return>
+
+nnoremap <silent> <Esc>[d :bprevious<return>
+nnoremap <silent> <Esc>[c :bnext<return>
+inoremap <silent> <Esc>[d <C-O>:bprevious<return>
+inoremap <silent> <Esc>[c <C-O>:bnext<return>
+
+" nnoremap <space><space> :bnew<return>
+nnoremap <silent> <space><left> :bprevious<return>
+nnoremap <silent> <space><right> :bnext<return>
+
+if &term =~ '^screen'
+    " tmux will send xterm-style keys when xterm-keys is on
+    execute "set <xUp>=\e[1;*A"
+    execute "set <xDown>=\e[1;*B"
+    execute "set <xRight>=\e[1;*C"
+    execute "set <xLeft>=\e[1;*D"
+endif
+
+
+
+" wild/tab behavior
+" =================
+set wildmode=longest,list:longest,list:full
+
+" spelling stuff
+" ==============
+set spellfile=~/.vim.spell.en.add
+:nmap <F8> :set invspell<return>
+:imap <F8> <C-O>:set invspell<return>
+
+" Searching and highlighting
+" ==========================
+hi Search cterm=NONE ctermfg=yellow ctermbg=19
+set hlsearch
+nnoremap <CR> :noh<CR><CR>
+
+set tabpagemax=50
+" Do not close buffers we don't see
+set hidden
index 59a3062814acb03aace063bec44b0abf00932ef3..a6270d8b3d20368a6b149c389cd06fb28db6a7d7 100644 (file)
@@ -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',
+       }
 }