Skip to content

Instantly share code, notes, and snippets.

@cbilson
Last active August 22, 2017 08:54
Show Gist options
  • Save cbilson/50c6bbbf71019af9c152 to your computer and use it in GitHub Desktop.
Save cbilson/50c6bbbf71019af9c152 to your computer and use it in GitHub Desktop.
My FreeBSD Config Files
# Set the prefix to ^z
#unbind-key C-b
set-option -g prefix C-z
bind-key C-z send-prefix
# screen ^C c
unbind-key ^C
bind-key ^C new-window
unbind-key c
bind-key c new-window
# detach ^D d
unbind-key ^D
bind-key ^D detach
# displays *
unbind-key *
bind-key * list-clients
# next ^@ ^N sp n
unbind-key ^@
bind-key ^@ next-window
unbind-key ^N
bind-key ^N next-window
unbind-key " "
bind-key " " next-window
unbind-key n
bind-key n next-window
# title A
unbind-key A
bind-key A command-prompt "rename-window %%"
# prev ^H ^P p ^?
unbind-key ^H
bind-key ^H previous-window
unbind-key ^P
bind-key ^P previous-window
unbind-key p
bind-key p previous-window
# unbind-key BSpace
# bind-key BSpace previous-window
# windows ^W w
unbind-key ^W
bind-key ^W list-windows
unbind-key w
bind-key w list-windows
# redisplay ^L l
unbind-key ^L
bind-key ^L refresh-client
unbind-key l
bind-key l refresh-client
# " windowlist -b
unbind-key '"'
bind-key '"' choose-window
# Copy mode
bind-key ^[ copy-mode
bind-key Escape copy-mode
# Paste mode
bind-key ] paste-buffer
bind-key ^] paste-buffer
set-window-option -g mode-keys emacs
# Make mouse useful in copy mode
#set-window-option -g mode-mouse on
# drew paste
bind-key P run-shell 'tmux saveb -| curl -s -XPOST -H "Content-type: text/plain" --data-binary @- http://p.draines.com/'
# More straight forward key bindings for splitting
#unbind-key %
bind-key | split-window -h
bind-key h split-window -h
#unbind-key '"'
bind-key - split-window -v
bind-key v split-window -v
# History
set-option -g history-limit 15000
# Status Bar
set-option -g status-bg black
#set-option -g status-bg white
set-option -g status-fg white
#set-option -g status-fg black
set-option -g status-left-length 15
set-option -g status-left ' #[fg=cyan,bright]#10H#[fg=green]:#[fg=white]#S#[fg=green] | #[default]'
#set-option -g status-left ' #[fg=cyan]#10H#[fg=green]:#[fg=black]#S#[fg=green] | #[default]'
set-option -g status-right '#[fg=green]| #[fg=yellow]%Y-%m-%d %H:%M '
set-option -g status-justify centre
set-window-option -g window-status-current-fg black
#set-window-option -g window-status-current-attr bright
#set-option -g status-bg black
#set-option -g status-fg white
#set-option -g status-interval 5
#set-option -g status-left '#[fg=green] #H #[default]'
#set-option -g status-right '#[fg=yellow]#(uptime | cut -d ":" -f 4)#[default] #[fg=cyan,bold]%m/%d %H:%M#[default]'
# Notifying if other windows has activities
set-window-option -g monitor-activity off
set-option -g visual-activity off
# Highlighting the active window in status bar
#set-window-option -g window-status-current-bg cyan
set-window-option -g window-status-current-fg cyan
# Clock
set-window-option -g clock-mode-colour green
set-window-option -g clock-mode-style 24
# don't clobber ssh agent
set-option -g update-environment "DISPLAY WINDOWID GPG_AGENT_INFO"
## Custom status bar, via https://github.com/myusuf3/dotfiles
## Powerline symbols: <E2><AE><82> <E2><AE><83> <E2><AE><80> <E2><AE><81> <E2><AD><A4>
## If you do not have a patched font (see: https://github.com/Lokaltog/vim-powerline/tree/develop/fontpatcher)
## comment out the lines below to get a "regular" statusbar without special symbols
set-option -g status-bg colour234
set-option -g message-fg colour16
set-option -g message-bg colour221
set-option -g status-left-length 40
set-option -g status-right-length 40
set-option -g status-interval 5
set-option -g pane-border-fg colour245
set-option -g pane-active-border-fg colour39
set-option -g status-justify left
# set-option -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour238,nobold]<E2><AE><80>#[fg=colour15,bg=colour238,bold] #(up) #[fg=colour238,bg=colour234,nobold]<E2><AE><80>'
# set-option -g status-right '#[fg=colour245]<E2><AE><83> %R <E2><AE><83> %d %b #[fg=colour254,bg=colour234,nobold]<E2><AE><82>#[fg=colour16,bg=colour254,bold] #h '
set-option -g window-status-format "#[fg=white,bg=colour234] #I #W "
set-option -g window-status-current-format "#[fg=colour234,bg=colour39]<E2><AE><80>#[fg=colour16,bg=colour39,noreverse,bold] #I <E2><AE><81> #W #[fg=colour39,bg=colour234,nobold]<E2><AE><80>"
set-option -g default-terminal "screen-256color"
set -g base-index 1
#Color table from: http://www.understudy.net/custom.html
fg_black=%{$'\e[0;30m'%}
fg_red=%{$'\e[0;31m'%}
fg_green=%{$'\e[0;32m'%}
fg_brown=%{$'\e[0;33m'%}
fg_blue=%{$'\e[0;34m'%}
fg_purple=%{$'\e[0;35m'%}
fg_cyan=%{$'\e[0;36m'%}
fg_lgray=%{$'\e[0;37m'%}
fg_dgray=%{$'\e[1;30m'%}
fg_lred=%{$'\e[1;31m'%}
fg_lgreen=%{$'\e[1;32m'%}
fg_yellow=%{$'\e[1;33m'%}
fg_lblue=%{$'\e[1;34m'%}
fg_pink=%{$'\e[1;35m'%}
fg_lcyan=%{$'\e[1;36m'%}
fg_white=%{$'\e[1;37m'%}
#Text Background Colors
bg_red=%{$'\e[0;41m'%}
bg_green=%{$'\e[0;42m'%}
bg_brown=%{$'\e[0;43m'%}
bg_blue=%{$'\e[0;44m'%}
bg_purple=%{$'\e[0;45m'%}
bg_cyan=%{$'\e[0;46m'%}
bg_gray=%{$'\e[0;47m'%}
#Attributes
at_normal=%{$'\e[0m'%}
at_bold=%{$'\e[1m'%}
at_italics=%{$'\e[3m'%}
at_underl=%{$'\e[4m'%}
at_blink=%{$'\e[5m'%}
at_outline=%{$'\e[6m'%}
at_reverse=%{$'\e[7m'%}
at_nondisp=%{$'\e[8m'%}
at_strike=%{$'\e[9m'%}
at_boldoff=%{$'\e[22m'%}
at_italicsoff=%{$'\e[23m'%}
at_underloff=%{$'\e[24m'%}
at_blinkoff=%{$'\e[25m'%}
at_reverseoff=%{$'\e[27m'%}
at_strikeoff=%{$'\e[29m'%}
PROMPT="
${fg_lgreen}%n@${at_underl}%m${at_underloff}${fg_white}[${fg_cyan}%~${fg_white}]
[${fg_green}%T${fg_white}]->> ${at_normal}"
autoload -U compinit
compinit
setopt correctall
setopt autocd
setopt auto_resume
setopt extendedglob
setopt completeinword
unsetopt caseglob
unsetopt beep
bindkey -e
## Set some ZSH auto complete options
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
zstyle ':completion:*:warnings' format '%BSorry, no matches for: %d%b'
zstyle ':completion:*:killall:*' command 'ps -u $USER -o cmd'
## History stuffs
HISTFILE=~/.zsh-histfile
HISTSIZE=5000
SAVEHIST=5000
setopt incappendhistory
setopt sharehistory
setopt extendedhistory
#ALIASES
alias ls='ls -G' #I like color
alias l='ls -lFh' #size,show type,human readable
alias la='ls -lAFh' #long list,show almost all,show type,human readable
alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
alias lt='ls -ltFh' #long list,sorted by date,show type,human readable
alias ll='ls -lFh' #long list,sorted by date,show type,human readable
freebsd-update fetch
freebsd-update install
pkg install -y vim emacs-nox11 git curl unzip zsh dmd2 clojure ezjail en-aspell tmux
git clone http://github.com/cbilson/prelude ~/.emacs.d
curl -o ~/.tmux.conf https://gist.githubusercontent.com/cbilson/50c6bbbf71019af9c152/raw/b1bee8bf6515200d6e8e741fdfd9aaf689fda84d/.tmux.conf
curl -o ~/.zshrc https://gist.githubusercontent.com/cbilson/50c6bbbf71019af9c152/raw/527a2eaf3b052a2da8a12481f372376285870306/.zshrc
portsnap fetch
portsnap extract
pushd /usr/ports/lang/dmd2* && make install && make clean
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment