mirror of
https://github.com/balkian/dotfiles.git
synced 2024-11-24 21:22:29 +00:00
Tmux on zsh start
This commit is contained in:
parent
55e0da205a
commit
68b0320df7
73
not_dots/zshrc.orig
Normal file
73
not_dots/zshrc.orig
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Lines configured by zsh-newuser-install
|
||||||
|
HISTFILE=~/.histfile
|
||||||
|
HISTSIZE=1000
|
||||||
|
SAVEHIST=1000
|
||||||
|
setopt appendhistory autocd extendedglob nomatch notify share_history
|
||||||
|
bindkey -v
|
||||||
|
# End of lines configured by zsh-newuser-install
|
||||||
|
# The following lines were added by compinstall
|
||||||
|
zstyle :compinstall filename '/home/balkian/.zshrc'
|
||||||
|
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
|
# End of lines added by compinstall
|
||||||
|
|
||||||
|
autoload -U colors
|
||||||
|
colors
|
||||||
|
setopt prompt_subst
|
||||||
|
|
||||||
|
local smiley="%B%(?,%{$fg[green]%}☠%{$reset_color%},%{$fg[red]%}☠%{$reset_color%})%b"
|
||||||
|
PS0='${debian_chroot:+($debian_chroot)}%n@%M'
|
||||||
|
|
||||||
|
parse_git_branch()
|
||||||
|
{
|
||||||
|
git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)#(git::\1)#'
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( dircolors --help && ls --color ) &> /dev/null; then
|
||||||
|
# For some reason, the unixs machines need me to use $HOME instead of ~
|
||||||
|
# List files from highest priority to lowest. As soon as the loop finds one that works, it will exit.
|
||||||
|
function precmd {
|
||||||
|
PROMPT="$PS0:%~ %{$fg[green]%}%B$(parse_git_branch)%b%{$reset_color%}
|
||||||
|
${smiley} ";
|
||||||
|
RPROMPT="%T";
|
||||||
|
}
|
||||||
|
|
||||||
|
for POSSIBLE_DIR_COLORS in "$HOME/.dir_colors" "/etc/DIR_COLORS"; do
|
||||||
|
[[ -f "$POSSIBLE_DIR_COLORS" ]] && [[ -r "$POSSIBLE_DIR_COLORS" ]] && eval `dircolors -b "$POSSIBLE_DIR_COLORS"` && break
|
||||||
|
done
|
||||||
|
|
||||||
|
alias ls="ls --color=auto"
|
||||||
|
alias ll="ls --color=auto -l"
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
else
|
||||||
|
# No color, so put a slash at the end of directory names, etc. to differentiate.
|
||||||
|
alias ll="ls -lF"
|
||||||
|
fi
|
||||||
|
## Completions
|
||||||
|
#autoload -U compinit
|
||||||
|
#compinit -C
|
||||||
|
#
|
||||||
|
### case-insensitive (all),partial-word and then substring completion
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' \
|
||||||
|
'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
|
|
||||||
|
bindkey -M vicmd 'r' history-incremental-search-backward
|
||||||
|
|
||||||
|
export PATH=$PATH:"/home/balkian/code/personal-scripts/"
|
||||||
|
#export CDPATH=$CDPATH:"/media/Data/"
|
||||||
|
|
||||||
|
# TMUX
|
||||||
|
# if [[ -z "$KONSOLE_DBUS_SERVICE" & `which tmux` ]]; then
|
||||||
|
# if no session is started, start a new session
|
||||||
|
if [[ -z "$KONSOLE_DBUS_SERVICE" && -n $(which tmux) ]]; then
|
||||||
|
stty -ixon
|
||||||
|
test -z ${TMUX} && tmux attach
|
||||||
|
# when quitting tmux, try to attach
|
||||||
|
if [[ -z ${TMUX} ]]; then
|
||||||
|
exit;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
73
not_dots/zshrc.pre-oh-my-zsh
Normal file
73
not_dots/zshrc.pre-oh-my-zsh
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Lines configured by zsh-newuser-install
|
||||||
|
HISTFILE=~/.histfile
|
||||||
|
HISTSIZE=1000
|
||||||
|
SAVEHIST=1000
|
||||||
|
setopt appendhistory autocd extendedglob nomatch notify share_history
|
||||||
|
bindkey -v
|
||||||
|
# End of lines configured by zsh-newuser-install
|
||||||
|
# The following lines were added by compinstall
|
||||||
|
zstyle :compinstall filename '/home/balkian/.zshrc'
|
||||||
|
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
|
# End of lines added by compinstall
|
||||||
|
|
||||||
|
autoload -U colors
|
||||||
|
colors
|
||||||
|
setopt prompt_subst
|
||||||
|
|
||||||
|
local smiley="%B%(?,%{$fg[green]%}☠%{$reset_color%},%{$fg[red]%}☠%{$reset_color%})%b"
|
||||||
|
PS0='${debian_chroot:+($debian_chroot)}%n@%M'
|
||||||
|
|
||||||
|
parse_git_branch()
|
||||||
|
{
|
||||||
|
git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)#(git::\1)#'
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( dircolors --help && ls --color ) &> /dev/null; then
|
||||||
|
# For some reason, the unixs machines need me to use $HOME instead of ~
|
||||||
|
# List files from highest priority to lowest. As soon as the loop finds one that works, it will exit.
|
||||||
|
function precmd {
|
||||||
|
PROMPT="$PS0:%~ %{$fg[green]%}%B$(parse_git_branch)%b%{$reset_color%}
|
||||||
|
${smiley} ";
|
||||||
|
RPROMPT="%T";
|
||||||
|
}
|
||||||
|
|
||||||
|
for POSSIBLE_DIR_COLORS in "$HOME/.dir_colors" "/etc/DIR_COLORS"; do
|
||||||
|
[[ -f "$POSSIBLE_DIR_COLORS" ]] && [[ -r "$POSSIBLE_DIR_COLORS" ]] && eval `dircolors -b "$POSSIBLE_DIR_COLORS"` && break
|
||||||
|
done
|
||||||
|
|
||||||
|
alias ls="ls --color=auto"
|
||||||
|
alias ll="ls --color=auto -l"
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
else
|
||||||
|
# No color, so put a slash at the end of directory names, etc. to differentiate.
|
||||||
|
alias ll="ls -lF"
|
||||||
|
fi
|
||||||
|
## Completions
|
||||||
|
#autoload -U compinit
|
||||||
|
#compinit -C
|
||||||
|
#
|
||||||
|
### case-insensitive (all),partial-word and then substring completion
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' \
|
||||||
|
'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
|
|
||||||
|
bindkey -M vicmd 'r' history-incremental-search-backward
|
||||||
|
|
||||||
|
export PATH=$PATH:"/home/balkian/code/personal-scripts/"
|
||||||
|
#export CDPATH=$CDPATH:"/media/Data/"
|
||||||
|
|
||||||
|
# TMUX
|
||||||
|
# if [[ -z "$KONSOLE_DBUS_SERVICE" & `which tmux` ]]; then
|
||||||
|
# if no session is started, start a new session
|
||||||
|
if [[ -z "$KONSOLE_DBUS_SERVICE" && -n $(which tmux) ]]; then
|
||||||
|
stty -ixon
|
||||||
|
test -z ${TMUX} && tmux attach
|
||||||
|
# when quitting tmux, try to attach
|
||||||
|
if [[ -z ${TMUX} ]]; then
|
||||||
|
exit;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
@ -86,3 +86,8 @@ bind-key -t vi-copy 'y' copy-selection
|
|||||||
unbind C-s
|
unbind C-s
|
||||||
# copy tmux buffer to clipboard
|
# copy tmux buffer to clipboard
|
||||||
#bind-key Y save-buffer ~/.tmux/buffer \; run-shell "xsel -i -p <~/.tmux/buffer && rm ~/.tmux/buffer"
|
#bind-key Y save-buffer ~/.tmux/buffer \; run-shell "xsel -i -p <~/.tmux/buffer && rm ~/.tmux/buffer"
|
||||||
|
#
|
||||||
|
|
||||||
|
# Look better
|
||||||
|
# look good
|
||||||
|
set -g default-terminal "screen-256color"
|
||||||
|
4
vimrc
4
vimrc
@ -117,7 +117,9 @@ nmap SO :so ~/.vim/Session.vim<CR>
|
|||||||
":tab sball
|
":tab sball
|
||||||
|
|
||||||
" Color and shit
|
" Color and shit
|
||||||
"colo vividchalk
|
colo vividchalk
|
||||||
|
set background=dark
|
||||||
|
hi SpellBad ctermbg=Red ctermfg=White
|
||||||
|
|
||||||
"Statusline
|
"Statusline
|
||||||
|
|
||||||
|
100
zshrc
100
zshrc
@ -1,70 +1,52 @@
|
|||||||
# Lines configured by zsh-newuser-install
|
# Path to your oh-my-zsh configuration.
|
||||||
HISTFILE=~/.histfile
|
ZSH=$HOME/.oh-my-zsh
|
||||||
HISTSIZE=1000
|
|
||||||
SAVEHIST=1000
|
|
||||||
setopt appendhistory autocd extendedglob nomatch notify share_history
|
|
||||||
bindkey -v
|
|
||||||
# End of lines configured by zsh-newuser-install
|
|
||||||
# The following lines were added by compinstall
|
|
||||||
zstyle :compinstall filename '/home/balkian/.zshrc'
|
|
||||||
|
|
||||||
autoload -Uz compinit
|
# Set name of the theme to load.
|
||||||
compinit
|
# Look in ~/.oh-my-zsh/themes/
|
||||||
# End of lines added by compinstall
|
# Optionally, if you set this to "random", it'll load a random theme each
|
||||||
|
# time that oh-my-zsh is loaded.
|
||||||
|
ZSH_THEME="balkian"
|
||||||
|
|
||||||
autoload -U colors
|
# Example aliases
|
||||||
colors
|
# alias zshconfig="mate ~/.zshrc"
|
||||||
setopt prompt_subst
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||||
|
|
||||||
local smiley="%B%(?,%{$fg[green]%}☠%{$reset_color%},%{$fg[red]%}☠%{$reset_color%})%b"
|
# Set to this to use case-sensitive completion
|
||||||
PS0='${debian_chroot:+($debian_chroot)}%n@%M'
|
# CASE_SENSITIVE="true"
|
||||||
|
|
||||||
parse_git_branch()
|
# Comment this out to disable weekly auto-update checks
|
||||||
{
|
# DISABLE_AUTO_UPDATE="true"
|
||||||
git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)#(git::\1)#'
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( dircolors --help && ls --color ) &> /dev/null; then
|
# Change this value to set how frequently ZSH updates¬
|
||||||
# For some reason, the unixs machines need me to use $HOME instead of ~
|
export UPDATE_ZSH_DAYS=13
|
||||||
# List files from highest priority to lowest. As soon as the loop finds one that works, it will exit.
|
|
||||||
function precmd {
|
|
||||||
PROMPT="%~ %{$fg[green]%}%B$(parse_git_branch)%b%{$reset_color%}
|
|
||||||
${smiley} $PS0: ";
|
|
||||||
RPROMPT="%T";
|
|
||||||
}
|
|
||||||
|
|
||||||
for POSSIBLE_DIR_COLORS in "$HOME/.dir_colors" "/etc/DIR_COLORS"; do
|
# Uncomment following line if you want to disable colors in ls
|
||||||
[[ -f "$POSSIBLE_DIR_COLORS" ]] && [[ -r "$POSSIBLE_DIR_COLORS" ]] && eval `dircolors -b "$POSSIBLE_DIR_COLORS"` && break
|
# DISABLE_LS_COLORS="true"
|
||||||
done
|
|
||||||
|
|
||||||
alias ls="ls --color=auto"
|
# Uncomment following line if you want to disable autosetting terminal title.
|
||||||
alias ll="ls --color=auto -l"
|
# DISABLE_AUTO_TITLE="true"
|
||||||
alias grep='grep --color=auto'
|
|
||||||
alias fgrep='fgrep --color=auto'
|
|
||||||
alias egrep='egrep --color=auto'
|
|
||||||
else
|
|
||||||
# No color, so put a slash at the end of directory names, etc. to differentiate.
|
|
||||||
alias ll="ls -lF"
|
|
||||||
fi
|
|
||||||
## Completions
|
|
||||||
#autoload -U compinit
|
|
||||||
#compinit -C
|
|
||||||
#
|
|
||||||
### case-insensitive (all),partial-word and then substring completion
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' \
|
|
||||||
'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
|
||||||
|
|
||||||
bindkey -M vicmd 'r' history-incremental-search-backward
|
# Uncomment following line if you want red dots to be displayed while waiting for completion
|
||||||
|
# COMPLETION_WAITING_DOTS="true"
|
||||||
|
|
||||||
|
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||||
|
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||||
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
|
plugins=(git vi-mode)
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# Customize to your needs...
|
||||||
|
export PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/balkian/code/personal-scripts/
|
||||||
|
|
||||||
# TMUX
|
# TMUX
|
||||||
# if [[ -z "$KONSOLE_DBUS_SERVICE" & `which tmux` ]]; then
|
# if [[ -z "$KONSOLE_DBUS_SERVICE" & `which tmux` ]]; then
|
||||||
# if no session is started, start a new session
|
# if no session is started, start a new session
|
||||||
if [[ -z "$KONSOLE_DBUS_SERVICE" && -n $(which tmux) ]]; then
|
if [[ -z "$KONSOLE_DBUS_SERVICE" && -n $(which tmux) ]]; then
|
||||||
stty -ixon
|
stty -ixon
|
||||||
test -z ${TMUX} && tmux attach
|
test -z ${TMUX} && tmux attach
|
||||||
# when quitting tmux, try to attach
|
# when quitting tmux, try to attach
|
||||||
if [[ -z ${TMUX} ]]; then
|
if [[ -z ${TMUX} ]]; then
|
||||||
exit;
|
exit;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user