Dotfiles – Ian's notes


Dotfiles

September 28th, 2020 by

I use a set of common Linux tools for day-to-day sysadmin and computer use, and these can all be configured using dotfiles. Here’s a commented listing of each program’s file:

tmux

The contents of ~/.tmux.conf are as follows:

#Use vi keybindings
setw -g mode-keys vi

#Use ctrl-a as the prefix key
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix

#Turn on mouse compatibility
set -g mouse on

#Remove the status bar at the bottom
set -g status off

#Set the status colors for when the bar is shown
set-option -g status-style bg=white,fg=black,default
set-window-option -g window-status-current-bg white
set-window-option -g window-status-current-fg black

Vim

The contents of ~/.vimrc are as follows:

" Line numbers
set nu

" Don't highlight search matches
set nohlsearch

" Search during typing
set incsearch

" 256 colour support
set t_Co=256

" Tab settings
set expandtab
set softtabstop=4
set tabstop=8
set shiftwidth=4
set smarttab

" Auto indent
set autoindent

" Highlight cursor line and columns
set cursorcolumn
set cursorline

" Change settings according to file types
filetype plugin on
filetype indent plugin on
syntax on

" Set leader to space
let mapleader=" "

" Scroll margin of 5 lines
set scrolloff=5

" Set puppet file type for .pp files
au BufNewFile,BufRead,BufReadPost *.pp set filetype=puppet

" Don't collapse URLs in vimwiki
let g:vimwiki_url_maxsave=0

" Wrap words not characters
set linebreak

" Set dark background
set bg=dark

"Cursorline and column highlight config
colorscheme default
hi CursorLine cterm=none ctermbg=238 ctermfg=none
hi CursorColumn cterm=none ctermbg=238 ctermfg=none
hi ColorColumn cterm=none ctermbg=238 ctermfg=none

"Hide docstring autocomp
autocmd FileType python setlocal completeopt-=preview

"Colour in the 80th column
set colorcolumn=80

Xterm

The contents of ~/.Xresources are as follows:

!Use "Huge" font by default
xterm*font: -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1

!Disable bold fonts
XTerm*allowBoldFonts: false

!Alt key fix
XTerm*metaSendsEscape: true

! Generated with :
! XRDB2Xreources.py
!
*.foreground:  #968c83
*.background:  #20111b
*.cursorColor: #968c83
!
! Black
*.color0:      #20111b
*.color8:      #5e5252
!
! Red
*.color1:      #be100e
*.color9:      #be100e
!
! Green
*.color2:      #858162
*.color10:     #858162
!
! Yellow
*.color3:      #eaa549
*.color11:     #eaa549
!
! Blue
*.color4:      #426a79
*.color12:     #426a79
!
! Magenta
*.color5:      #97522c
*.color13:     #97522c
!
! Cyan
*.color6:      #989a9c
*.color14:     #989a9c
!
! White
*.color7:      #968c83
*.color15:     #d5ccba
!
! Bold, Italic, Underline
*.colorBD:     #968c83
!*.colorIT:
!*.colorUL: