Skip to content

Instantly share code, notes, and snippets.

@rogerhub
Created May 20, 2015 05:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogerhub/18d21199cde8e1fa2214 to your computer and use it in GitHub Desktop.
Save rogerhub/18d21199cde8e1fa2214 to your computer and use it in GitHub Desktop.
Dot files
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# set window split
bind-key | split-window -h
bind-key - split-window
set-option -g prefix C-a
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
set-option -g pane-border-fg default
set-option -g pane-active-border-bg default
set-option -g pane-active-border-fg default
set-option -g default-terminal "screen-256color"
set -g -x fish_greeting
function fish_title
echo -n "Terminal"
end
set COLOR_NONE (set_color normal)
set COLOR_DATE (set_color cyan)
set COLOR_PWD (set_color green)
set COLOR_ERROR (set_color red)
function fish_prompt
set -l prompt_status $status
printf "%s%s%s %s%s%s " "$COLOR_DATE" (date '+%H:%M:%S') "$COLOR_NONE" "$COLOR_PWD" (basename (prompt_pwd)) "$COLOR_NONE"
if test "0" != "$prompt_status"
printf "%s%s%s " "$COLOR_ERROR" $prompt_status "$COLOR_NONE"
end
end
set -g fish_color_search_match ""
set -g fish_color_param "cyan"
set -g fish_color_operator "cyan"
if test -e /opt/boxen
function fish_right_prompt
printf "\033]7;file://localhost%s\a" (echo "$PWD" | sed -e 's/ /%20/g')
end
end
set -x SVN_EDITOR vim
set -x EDITOR vim
# Colored man pages
set -x LESS_TERMCAP_mb (printf "\e[01;31m")
set -x LESS_TERMCAP_md (printf "\e[01;31m")
set -x LESS_TERMCAP_me (printf "\e[0m")
set -x LESS_TERMCAP_se (printf "\e[0m")
set -x LESS_TERMCAP_so (printf "\e[01;44;33m")
set -x LESS_TERMCAP_ue (printf "\e[0m")
set -x LESS_TERMCAP_us (printf "\e[01;32m")
function alf
sudo /usr/libexec/ApplicationFirewall/socketfilterfw $argv
end
function g
goto $argv
end
function goto
if test -z "$argv"
if test -z "$_GOTO_INDEX"
set -g _GOTO_INDEX 1
else
set -g _GOTO_INDEX (echo "1+$_GOTO_INDEX" | env BC_ENV_ARGS= bc)
end
set QUERY "$_GOTO_LAST_QUERY"
else
set -g _GOTO_INDEX 1
set -g _GOTO_LAST_QUERY "$argv"
set QUERY "$argv"
end
set TARGET (grep (echo "$QUERY" | sed -e "s/./&.*/g") ~/.fileindex | head -n $_GOTO_INDEX | tail -n 1)
if test -z "$TARGET"
echo "No matches found."
else
set_color blue
echo "$TARGET"
set_color normal
cd ~/"$TARGET"
end
set -u TARGET
end
function gt
git status
end
function gt
git status
end
function mirror
wget --no-parent --mirror $argv
end
function mkcd
mkdir -p "$argv" ; and cd "$argv"
end
function o
if test -e /usr/bin/open
open $argv
else
xdg-open "$argv" >/dev/null 2>/dev/null
end
end
function reindex
rm ~/.fileindex
# Janky BFS ordering
cd
for depth in 0 1 2 3 4 5
find {Configuration,Development,Downloads,Dropbox} -type d -mindepth $depth -maxdepth $depth | grep -vE "/\." >> ~/.fileindex
end
end
function rrsync
rsync -vazh --checksum --progress --delete --exclude=.git --exclude=.gitignore --exclude=.DS_Store $argv
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment