work on dotfiles

This commit is contained in:
Daniel Flanagan 2016-04-20 16:09:02 -05:00
parent 982401d97a
commit 455e2a07bb
9 changed files with 61 additions and 89 deletions

View file

@ -21,3 +21,5 @@ cd "$REPOSITORY_PATH/pacaur"
makepkg -i --noconfirm
cd -
pacuar -S cower pacaur

View file

@ -47,6 +47,9 @@ alias p="ping 8.8.8.8"
# emacs aliases
alias emacs="emacs -nw"
# arch aliases
alias archupdate="pacaur -Syyu --noconfirm --noedit"
export EDITOR="vim"
if command -v nvim >/dev/null 2>&1; then
alias vim="nvim"
@ -90,6 +93,9 @@ vman() {
alias _man="man"
alias man="vman"
complete -cf sudo
complete -cf man
# allow a per-device script that is pulled in
if [ -a "$HOME/.bashrc_env" ]; then
. "$HOME/.bashrc_env"

2
sh/inputrc Normal file
View file

@ -0,0 +1,2 @@
"\eOd": backward-word
"\eOc": forward-word

10
sh/layout_dev.tmux Normal file
View file

@ -0,0 +1,10 @@
splitw -h -p 50
splitw -v -p 50
splitw -v -p 50
selectp -U
selectp -U
splitw -v -p 50
resize-pane -x 100
selectp -L
splitw -h -p 50
selectp -L

View file

@ -3,12 +3,18 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source $DIR/variables.bash
rm "$HOME/.bashrc"
rm "$HOME/.bash_profile"
rm "$HOME/.tmux.conf"
mkdir -p "$HOME/.tmux/layouts"
rm -f "$HOME/.bashrc"
rm -f "$HOME/.bash_profile"
rm -f "$HOME/.tmux.conf"
rm -f "$HOME/.tmux/layouts/dev.tmux"
rm -f "$HOME/.inputrc"
ln -s "$DOTFILES_PATH/sh/bashrc" "$HOME/.bashrc"
ln -s "$DOTFILES_PATH/sh/bash_profile" "$HOME/.bash_profile"
ln -s "$DOTFILES_PATH/sh/tmux.conf" "$HOME/.tmux.conf"
ln -s "$DOTFILES_PATH/sh/layout_dev.tmux" "$HOME/.tmux/layouts/dev.tmux"
ln -s "$DOTFILES_PATH/sh/inputrc" "$HOME/.inputrc"
sed -i "/export DOTFILES_PATH/c export DOTFILES_PATH=\"$DIR\"" "$HOME/.bashrc"

View file

@ -3,101 +3,36 @@ unbind C-b
set -g prefix C-s
bind-key s send-prefix
# statusbar on top
set-option -g status-position top
# statusbar on bottom
set-option -g status-position bottom
# better resizing
setw -g aggressive-resize on
setw -g monitor-activity on
set -s escape-time 1
set -g status off
# terminal
set -g default-terminal "screen-256color"
set-window-option -g utf8 on
set-window-option -g xterm-keys on
set-window-option -g mode-keys vi
set-window-option -g monitor-activity on
# status bar
set -g status-interval 5
set -g status-utf8 on
setw -g mode-bg black
set-option -g status-bg default
set-option -g status-fg default
set-option -g status-attr default
set-option -g message-bg default
set-option -g message-fg yellow
set -g status-left '#[fg=green]#(whoami)@#24h > #12S #[fg=default]| '
set -g status-left-length 64
set -g status-right '#[fg=blue]%b %d %H:%M'
set -g window-status-current-format '#[fg=blue]#I #W '
set -g window-status-format '#I #W '
set -g status
bind-key W resize-pane -x 100
# splitting
bind-key v split-window -h
bind-key b split-window
# iterating
bind-key H set status
# pane switching
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# pane resizing
bind-key -r M-k resize-pane -U 5
bind-key -r M-j resize-pane -D 5
bind-key -r M-h resize-pane -L 5
bind-key -r M-l resize-pane -R 5
bind-key -r C-k resize-pane -U
bind-key -r C-j resize-pane -D
bind-key -r C-h resize-pane -L
bind-key -r C-l resize-pane -R
bind r source-file ~/.tmux.conf
# vim copying
setw -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# Similar to 'C-w j' to navigate windows in Vim
unbind-key j
bind-key j select-pane -D
unbind-key k
bind-key k select-pane -U
unbind-key h
bind-key h select-pane -L
unbind-key l
bind-key l select-pane -R
# Enable mouse support (works in iTerm)
# set-window-option -g mode-mouse on
# set-option -g mouse-select-pane on
# set-option -g mouse-resize-pane on
set -g mouse on
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
# If we want Vim to be told about focus: http://git.io/2UqSgQ
set -g focus-events on
# Use tmux-resurrect to manage saving/restoring sessions
# use tmux-resurrect to manage saving/restoring sessions
set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'
# fix pbcopy/pbpaste
if 'command -v reattach-to-user-namespace >/dev/null' \
'set -gq @osx-pasteboard true'
if 'tmux show -gv @osx-clipboard' \
'set -g default-command "reattach-to-user-namespace -l $SHELL"'
# Copy top of tmux paste buffer stack to OS clipboard.
# Alternatively, this will always immediately copy to system pasteboard:
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
if 'tmux show -gv @osx-clipboard' \
'bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
bind M-l source-file ~/.tmux/layouts/dev.tmux
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
@ -111,11 +46,15 @@ bind-key u capture-pane \;\
save-buffer /tmp/tmux-buffer \;\
split-window -l 10 "urlview /tmp/tmux-buffer"
# List of plugins
# list of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-sessionist'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

View file

@ -5,8 +5,8 @@
export DOTFILES_PATH="$HOME/.dotfiles"
export REPOSITORY_PATH="$HOME/Documents/Repositories"
export WINDOW_GAP=20
export BORDER_WIDTH=2
export WINDOW_GAP=0
export BORDER_WIDTH=0
source "$DOTFILES_PATH/scripts/get_x_fonts.sh"
source "$DOTFILES_PATH/scripts/get_color.sh"
@ -15,8 +15,8 @@ export BAR_ON_XINIT=0
export BAR_FIFO="$DOTFILES_PATH/wm_bar_fifo.lock"
export BAR_TOP=1
export BAR_MARGIN=$WINDOW_GAP
export BAR_HEIGHT=28
export BAR_BORDER_WIDTH=2
export BAR_HEIGHT=20
export BAR_BORDER_WIDTH=1
export BAR_FONT_FAMILY="$PRIMARY_FONT_FAMILY_WITH_SIZE"
export BAR_UNDERLINE=1

View file

@ -4,10 +4,15 @@ source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/scripts/get_color.sh"
source "$DOTFILES_PATH/scripts/get_x_fonts.sh"
bspc config normal_border_color "#$(get_color 05)"
bspc config focused_border_color "#$(get_color 0D)"
bspc config active_border_color "#$(get_color 0D)"
bspc config presel_feedback_color "#$(get_color 0D)"
# bspc config normal_border_color "#$(get_color 05)"
# bspc config focused_border_color "#$(get_color 0D)"
# bspc config active_border_color "#$(get_color 0D)"
# bspc config presel_feedback_color "#$(get_color 0D)"
bspc config normal_border_color "#$(get_color 00)"
bspc config focused_border_color "#$(get_color 00)"
bspc config active_border_color "#$(get_color 00)"
bspc config presel_feedback_color "#$(get_color 00)"
bspc config border_width "$BORDER_WIDTH"
bspc config split_ratio 0.50
bspc config borderless_monocle true

View file

@ -20,5 +20,7 @@ emacs.font: emacspfont
*depth: 32
URxvt.internalBorder: 10
URxvt.internalBorder: 5
Xcursor.theme: human