Compare commits
27 Commits
8102f42c40
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6aec149865 | |||
| 21030a8604 | |||
| 3c96f8af47 | |||
| d3e2a923ad | |||
| fc1487fc8b | |||
| 818e1a97d8 | |||
| 959e419e5c | |||
| d86ef98487 | |||
| 68d222153b | |||
| 901863c9ff | |||
| 4b36f51801 | |||
| 38c42756b1 | |||
| 9e52b94bdf | |||
| cd6f720537 | |||
| f298fbd95e | |||
| 75de483d0e | |||
| 816bad0294 | |||
| 68ed7609b0 | |||
| 37f39c2769 | |||
| bc94fdbb4a | |||
| 5c812ad6f6 | |||
| 3d1bdcef7a | |||
| 67f6963c8e | |||
| 58591dc875 | |||
| e8d4db8ee4 | |||
| e481de8adf | |||
| 7ae3f3c6c7 |
1115
.ansible.cfg
Normal file
1115
.ansible.cfg
Normal file
File diff suppressed because it is too large
Load Diff
65
.bashrc
Normal file
65
.bashrc
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
alias ll='ls -alF'
|
||||||
|
alias la='ls -A'
|
||||||
|
alias l='ls -CF'
|
||||||
|
alias cd..='cd ..'
|
||||||
|
|
||||||
|
test -f ~/.git_completion/.git-completion.bash && . $_
|
||||||
|
|
||||||
|
# http://henrik.nyh.se/2008/12/git-dirty-prompt
|
||||||
|
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
|
||||||
|
# username@Machine ~/dev/dir[master]$ # clean working directory
|
||||||
|
# username@Machine ~/dev/dir[master*]$ # dirty working directory
|
||||||
|
|
||||||
|
function parse_git_dirty {
|
||||||
|
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
|
||||||
|
}
|
||||||
|
function parse_git_branch {
|
||||||
|
# git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
|
||||||
|
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
|
||||||
|
}
|
||||||
|
#export PS1='\u@\h \[\033[1;33m\]\w \[\033[0m\]$(parse_git_branch)$ '
|
||||||
|
export PS1='\[\033[1;31m\]\u@\h \[\033[1;34m\]\w \[\033[1;32m\]$(parse_git_branch)\[\033[0m\]$ '
|
||||||
|
|
||||||
|
# bind commands
|
||||||
|
bind '"\C-k"':kill-line # clear to end of line
|
||||||
|
|
||||||
|
# Local customized path and environment settings, etc.
|
||||||
|
if [ -f ~/.bashrc.local ]; then
|
||||||
|
. ~/.bashrc.local
|
||||||
|
fi
|
||||||
4
.bashrc.local
Normal file
4
.bashrc.local
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Activate Starship command prompt
|
||||||
|
if [ -f /usr/local/bin/starship ]; then
|
||||||
|
eval "$(starship init bash)"
|
||||||
|
fi
|
||||||
3546
.git_completion/git-completion.bash
Normal file
3546
.git_completion/git-completion.bash
Normal file
File diff suppressed because it is too large
Load Diff
126
.git_completion/git-completion.tcsh
Normal file
126
.git_completion/git-completion.tcsh
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
# tcsh completion support for core Git.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Marc Khouzam <marc.khouzam@gmail.com>
|
||||||
|
# Distributed under the GNU General Public License, version 2.0.
|
||||||
|
#
|
||||||
|
# When sourced, this script will generate a new script that uses
|
||||||
|
# the git-completion.bash script provided by core Git. This new
|
||||||
|
# script can be used by tcsh to perform git completion.
|
||||||
|
# The current script also issues the necessary tcsh 'complete'
|
||||||
|
# commands.
|
||||||
|
#
|
||||||
|
# To use this completion script:
|
||||||
|
#
|
||||||
|
# 0) You need tcsh 6.16.00 or newer.
|
||||||
|
# 1) Copy both this file and the bash completion script to ${HOME}.
|
||||||
|
# You _must_ use the name ${HOME}/.git-completion.bash for the
|
||||||
|
# bash script.
|
||||||
|
# (e.g. ~/.git-completion.tcsh and ~/.git-completion.bash).
|
||||||
|
# 2) Add the following line to your .tcshrc/.cshrc:
|
||||||
|
# source ~/.git-completion.tcsh
|
||||||
|
# 3) For completion similar to bash, it is recommended to also
|
||||||
|
# add the following line to your .tcshrc/.cshrc:
|
||||||
|
# set autolist=ambiguous
|
||||||
|
# It will tell tcsh to list the possible completion choices.
|
||||||
|
|
||||||
|
set __git_tcsh_completion_version = `\echo ${tcsh} | \sed 's/\./ /g'`
|
||||||
|
if ( ${__git_tcsh_completion_version[1]} < 6 || \
|
||||||
|
( ${__git_tcsh_completion_version[1]} == 6 && \
|
||||||
|
${__git_tcsh_completion_version[2]} < 16 ) ) then
|
||||||
|
echo "git-completion.tcsh: Your version of tcsh is too old, you need version 6.16.00 or newer. Git completion will not work."
|
||||||
|
exit
|
||||||
|
endif
|
||||||
|
unset __git_tcsh_completion_version
|
||||||
|
|
||||||
|
set __git_tcsh_completion_original_script = ${HOME}/.git-completion.bash
|
||||||
|
set __git_tcsh_completion_script = ${HOME}/.git-completion.tcsh.bash
|
||||||
|
|
||||||
|
# Check that the user put the script in the right place
|
||||||
|
if ( ! -e ${__git_tcsh_completion_original_script} ) then
|
||||||
|
echo "git-completion.tcsh: Cannot find: ${__git_tcsh_completion_original_script}. Git completion will not work."
|
||||||
|
exit
|
||||||
|
endif
|
||||||
|
|
||||||
|
cat << EOF >! ${__git_tcsh_completion_script}
|
||||||
|
#!bash
|
||||||
|
#
|
||||||
|
# This script is GENERATED and will be overwritten automatically.
|
||||||
|
# Do not modify it directly. Instead, modify git-completion.tcsh
|
||||||
|
# and source it again.
|
||||||
|
|
||||||
|
source ${__git_tcsh_completion_original_script}
|
||||||
|
|
||||||
|
# Remove the colon as a completion separator because tcsh cannot handle it
|
||||||
|
COMP_WORDBREAKS=\${COMP_WORDBREAKS//:}
|
||||||
|
|
||||||
|
# For file completion, tcsh needs the '/' to be appended to directories.
|
||||||
|
# By default, the bash script does not do that.
|
||||||
|
# We can achieve this by using the below compatibility
|
||||||
|
# method of the git-completion.bash script.
|
||||||
|
__git_index_file_list_filter ()
|
||||||
|
{
|
||||||
|
__git_index_file_list_filter_compat
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set COMP_WORDS in a way that can be handled by the bash script.
|
||||||
|
COMP_WORDS=(\$2)
|
||||||
|
|
||||||
|
# The cursor is at the end of parameter #1.
|
||||||
|
# We must check for a space as the last character which will
|
||||||
|
# tell us that the previous word is complete and the cursor
|
||||||
|
# is on the next word.
|
||||||
|
if [ "\${2: -1}" == " " ]; then
|
||||||
|
# The last character is a space, so our location is at the end
|
||||||
|
# of the command-line array
|
||||||
|
COMP_CWORD=\${#COMP_WORDS[@]}
|
||||||
|
else
|
||||||
|
# The last character is not a space, so our location is on the
|
||||||
|
# last word of the command-line array, so we must decrement the
|
||||||
|
# count by 1
|
||||||
|
COMP_CWORD=\$((\${#COMP_WORDS[@]}-1))
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Call _git() or _gitk() of the bash script, based on the first argument
|
||||||
|
_\${1}
|
||||||
|
|
||||||
|
IFS=\$'\n'
|
||||||
|
if [ \${#COMPREPLY[*]} -eq 0 ]; then
|
||||||
|
# No completions suggested. In this case, we want tcsh to perform
|
||||||
|
# standard file completion. However, there does not seem to be way
|
||||||
|
# to tell tcsh to do that. To help the user, we try to simulate
|
||||||
|
# file completion directly in this script.
|
||||||
|
#
|
||||||
|
# Known issues:
|
||||||
|
# - Possible completions are shown with their directory prefix.
|
||||||
|
# - Completions containing shell variables are not handled.
|
||||||
|
# - Completions with ~ as the first character are not handled.
|
||||||
|
|
||||||
|
# No file completion should be done unless we are completing beyond
|
||||||
|
# the git sub-command. An improvement on the bash completion :)
|
||||||
|
if [ \${COMP_CWORD} -gt 1 ]; then
|
||||||
|
TO_COMPLETE="\${COMP_WORDS[\${COMP_CWORD}]}"
|
||||||
|
|
||||||
|
# We don't support ~ expansion: too tricky.
|
||||||
|
if [ "\${TO_COMPLETE:0:1}" != "~" ]; then
|
||||||
|
# Use ls so as to add the '/' at the end of directories.
|
||||||
|
COMPREPLY=(\`ls -dp \${TO_COMPLETE}* 2> /dev/null\`)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# tcsh does not automatically remove duplicates, so we do it ourselves
|
||||||
|
echo "\${COMPREPLY[*]}" | sort | uniq
|
||||||
|
|
||||||
|
# If there is a single completion and it is a directory, we output it
|
||||||
|
# a second time to trick tcsh into not adding a space after it.
|
||||||
|
if [ \${#COMPREPLY[*]} -eq 1 ] && [ "\${COMPREPLY[0]: -1}" == "/" ]; then
|
||||||
|
echo "\${COMPREPLY[*]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Don't need this variable anymore, so don't pollute the users environment
|
||||||
|
unset __git_tcsh_completion_original_script
|
||||||
|
|
||||||
|
complete git 'p,*,`bash ${__git_tcsh_completion_script} git "${COMMAND_LINE}"`,'
|
||||||
|
complete gitk 'p,*,`bash ${__git_tcsh_completion_script} gitk "${COMMAND_LINE}"`,'
|
||||||
294
.git_completion/git-completion.zsh
Normal file
294
.git_completion/git-completion.zsh
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
#compdef git gitk
|
||||||
|
|
||||||
|
# zsh completion wrapper for git
|
||||||
|
#
|
||||||
|
# Copyright (c) 2012-2020 Felipe Contreras <felipe.contreras@gmail.com>
|
||||||
|
#
|
||||||
|
# The recommended way to install this script is to make a copy of it as a
|
||||||
|
# file named '_git' inside any directory in your fpath.
|
||||||
|
#
|
||||||
|
# For example, create a directory '~/.zsh/', copy this file to '~/.zsh/_git',
|
||||||
|
# and then add the following to your ~/.zshrc file:
|
||||||
|
#
|
||||||
|
# fpath=(~/.zsh $fpath)
|
||||||
|
#
|
||||||
|
# You need git's bash completion script installed. By default bash-completion's
|
||||||
|
# location will be used (e.g. pkg-config --variable=completionsdir bash-completion).
|
||||||
|
#
|
||||||
|
# If your bash completion script is somewhere else, you can specify the
|
||||||
|
# location in your ~/.zshrc:
|
||||||
|
#
|
||||||
|
# zstyle ':completion:*:*:git:*' script ~/.git-completion.bash
|
||||||
|
#
|
||||||
|
|
||||||
|
zstyle -T ':completion:*:*:git:*' tag-order && \
|
||||||
|
zstyle ':completion:*:*:git:*' tag-order 'common-commands'
|
||||||
|
|
||||||
|
zstyle -s ":completion:*:*:git:*" script script
|
||||||
|
if [ -z "$script" ]; then
|
||||||
|
local -a locations
|
||||||
|
local e bash_completion
|
||||||
|
|
||||||
|
bash_completion=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null) ||
|
||||||
|
bash_completion='/usr/share/bash-completion/completions/'
|
||||||
|
|
||||||
|
locations=(
|
||||||
|
"$(dirname ${funcsourcetrace[1]%:*})"/git-completion.bash
|
||||||
|
"$HOME/.local/share/bash-completion/completions/git"
|
||||||
|
"$bash_completion/git"
|
||||||
|
'/etc/bash_completion.d/git' # old debian
|
||||||
|
)
|
||||||
|
for e in $locations; do
|
||||||
|
test -f $e && script="$e" && break
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
local old_complete="$functions[complete]"
|
||||||
|
functions[complete]=:
|
||||||
|
GIT_SOURCING_ZSH_COMPLETION=y . "$script"
|
||||||
|
functions[complete]="$old_complete"
|
||||||
|
|
||||||
|
__gitcomp ()
|
||||||
|
{
|
||||||
|
emulate -L zsh
|
||||||
|
|
||||||
|
local cur_="${3-$cur}"
|
||||||
|
|
||||||
|
case "$cur_" in
|
||||||
|
--*=)
|
||||||
|
;;
|
||||||
|
--no-*)
|
||||||
|
local c IFS=$' \t\n'
|
||||||
|
local -a array
|
||||||
|
for c in ${=1}; do
|
||||||
|
if [[ $c == "--" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
c="$c${4-}"
|
||||||
|
case $c in
|
||||||
|
--*=|*.) ;;
|
||||||
|
*) c="$c " ;;
|
||||||
|
esac
|
||||||
|
array+=("$c")
|
||||||
|
done
|
||||||
|
compset -P '*[=:]'
|
||||||
|
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
local c IFS=$' \t\n'
|
||||||
|
local -a array
|
||||||
|
for c in ${=1}; do
|
||||||
|
if [[ $c == "--" ]]; then
|
||||||
|
c="--no-...${4-}"
|
||||||
|
array+=("$c ")
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
c="$c${4-}"
|
||||||
|
case $c in
|
||||||
|
--*=|*.) ;;
|
||||||
|
*) c="$c " ;;
|
||||||
|
esac
|
||||||
|
array+=("$c")
|
||||||
|
done
|
||||||
|
compset -P '*[=:]'
|
||||||
|
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_direct ()
|
||||||
|
{
|
||||||
|
emulate -L zsh
|
||||||
|
|
||||||
|
compset -P '*[=:]'
|
||||||
|
compadd -Q -S '' -- ${(f)1} && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_nl ()
|
||||||
|
{
|
||||||
|
emulate -L zsh
|
||||||
|
|
||||||
|
compset -P '*[=:]'
|
||||||
|
compadd -Q -S "${4- }" -p "${2-}" -- ${(f)1} && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_file ()
|
||||||
|
{
|
||||||
|
emulate -L zsh
|
||||||
|
|
||||||
|
compset -P '*[=:]'
|
||||||
|
compadd -f -p "${2-}" -- ${(f)1} && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_direct_append ()
|
||||||
|
{
|
||||||
|
__gitcomp_direct "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_nl_append ()
|
||||||
|
{
|
||||||
|
__gitcomp_nl "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
__gitcomp_file_direct ()
|
||||||
|
{
|
||||||
|
__gitcomp_file "$1" ""
|
||||||
|
}
|
||||||
|
|
||||||
|
_git_zsh ()
|
||||||
|
{
|
||||||
|
__gitcomp "v1.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_complete_command ()
|
||||||
|
{
|
||||||
|
emulate -L zsh
|
||||||
|
|
||||||
|
local command="$1"
|
||||||
|
local completion_func="_git_${command//-/_}"
|
||||||
|
if (( $+functions[$completion_func] )); then
|
||||||
|
emulate ksh -c $completion_func
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_zsh_bash_func ()
|
||||||
|
{
|
||||||
|
emulate -L ksh
|
||||||
|
|
||||||
|
local command=$1
|
||||||
|
|
||||||
|
__git_complete_command "$command" && return
|
||||||
|
|
||||||
|
local expansion=$(__git_aliased_command "$command")
|
||||||
|
if [ -n "$expansion" ]; then
|
||||||
|
words[1]=$expansion
|
||||||
|
__git_complete_command "$expansion"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_zsh_cmd_common ()
|
||||||
|
{
|
||||||
|
local -a list
|
||||||
|
list=(
|
||||||
|
add:'add file contents to the index'
|
||||||
|
bisect:'find by binary search the change that introduced a bug'
|
||||||
|
branch:'list, create, or delete branches'
|
||||||
|
checkout:'checkout a branch or paths to the working tree'
|
||||||
|
clone:'clone a repository into a new directory'
|
||||||
|
commit:'record changes to the repository'
|
||||||
|
diff:'show changes between commits, commit and working tree, etc'
|
||||||
|
fetch:'download objects and refs from another repository'
|
||||||
|
grep:'print lines matching a pattern'
|
||||||
|
init:'create an empty Git repository or reinitialize an existing one'
|
||||||
|
log:'show commit logs'
|
||||||
|
merge:'join two or more development histories together'
|
||||||
|
mv:'move or rename a file, a directory, or a symlink'
|
||||||
|
pull:'fetch from and merge with another repository or a local branch'
|
||||||
|
push:'update remote refs along with associated objects'
|
||||||
|
rebase:'forward-port local commits to the updated upstream head'
|
||||||
|
reset:'reset current HEAD to the specified state'
|
||||||
|
restore:'restore working tree files'
|
||||||
|
rm:'remove files from the working tree and from the index'
|
||||||
|
show:'show various types of objects'
|
||||||
|
status:'show the working tree status'
|
||||||
|
switch:'switch branches'
|
||||||
|
tag:'create, list, delete or verify a tag object signed with GPG')
|
||||||
|
_describe -t common-commands 'common commands' list && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_zsh_cmd_alias ()
|
||||||
|
{
|
||||||
|
local -a list
|
||||||
|
list=(${${(0)"$(git config -z --get-regexp '^alias\.*')"}#alias.})
|
||||||
|
list=(${(f)"$(printf "%s:alias for '%s'\n" ${(f@)list})"})
|
||||||
|
_describe -t alias-commands 'aliases' list && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_zsh_cmd_all ()
|
||||||
|
{
|
||||||
|
local -a list
|
||||||
|
emulate ksh -c __git_compute_all_commands
|
||||||
|
list=( ${=__git_all_commands} )
|
||||||
|
_describe -t all-commands 'all commands' list && _ret=0
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_zsh_main ()
|
||||||
|
{
|
||||||
|
local curcontext="$curcontext" state state_descr line
|
||||||
|
typeset -A opt_args
|
||||||
|
local -a orig_words
|
||||||
|
|
||||||
|
orig_words=( ${words[@]} )
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
'(-p --paginate --no-pager)'{-p,--paginate}'[pipe all output into ''less'']' \
|
||||||
|
'(-p --paginate)--no-pager[do not pipe git output into a pager]' \
|
||||||
|
'--git-dir=-[set the path to the repository]: :_directories' \
|
||||||
|
'--bare[treat the repository as a bare repository]' \
|
||||||
|
'(- :)--version[prints the git suite version]' \
|
||||||
|
'--exec-path=-[path to where your core git programs are installed]:: :_directories' \
|
||||||
|
'--html-path[print the path where git''s HTML documentation is installed]' \
|
||||||
|
'--info-path[print the path where the Info files are installed]' \
|
||||||
|
'--man-path[print the manpath (see `man(1)`) for the man pages]' \
|
||||||
|
'--work-tree=-[set the path to the working tree]: :_directories' \
|
||||||
|
'--namespace=-[set the git namespace]' \
|
||||||
|
'--no-replace-objects[do not use replacement refs to replace git objects]' \
|
||||||
|
'(- :)--help[prints the synopsis and a list of the most commonly used commands]: :->arg' \
|
||||||
|
'(-): :->command' \
|
||||||
|
'(-)*:: :->arg' && return
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(command)
|
||||||
|
_tags common-commands alias-commands all-commands
|
||||||
|
while _tags; do
|
||||||
|
_requested common-commands && __git_zsh_cmd_common
|
||||||
|
_requested alias-commands && __git_zsh_cmd_alias
|
||||||
|
_requested all-commands && __git_zsh_cmd_all
|
||||||
|
let _ret || break
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
(arg)
|
||||||
|
local command="${words[1]}" __git_dir
|
||||||
|
|
||||||
|
if (( $+opt_args[--bare] )); then
|
||||||
|
__git_dir='.'
|
||||||
|
else
|
||||||
|
__git_dir=${opt_args[--git-dir]}
|
||||||
|
fi
|
||||||
|
|
||||||
|
(( $+opt_args[--help] )) && command='help'
|
||||||
|
|
||||||
|
words=( ${orig_words[@]} )
|
||||||
|
|
||||||
|
__git_zsh_bash_func $command
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
_git ()
|
||||||
|
{
|
||||||
|
local _ret=1
|
||||||
|
local cur cword prev
|
||||||
|
|
||||||
|
cur=${words[CURRENT]}
|
||||||
|
prev=${words[CURRENT-1]}
|
||||||
|
let cword=CURRENT-1
|
||||||
|
|
||||||
|
if (( $+functions[__${service}_zsh_main] )); then
|
||||||
|
__${service}_zsh_main
|
||||||
|
elif (( $+functions[__${service}_main] )); then
|
||||||
|
emulate ksh -c __${service}_main
|
||||||
|
elif (( $+functions[_${service}] )); then
|
||||||
|
emulate ksh -c _${service}
|
||||||
|
elif (( $+functions[_${service//-/_}] )); then
|
||||||
|
emulate ksh -c _${service//-/_}
|
||||||
|
fi
|
||||||
|
|
||||||
|
let _ret && _default && _ret=0
|
||||||
|
return _ret
|
||||||
|
}
|
||||||
|
|
||||||
|
_git
|
||||||
586
.git_completion/git-prompt.sh
Executable file
586
.git_completion/git-prompt.sh
Executable file
@ -0,0 +1,586 @@
|
|||||||
|
# bash/zsh git prompt support
|
||||||
|
#
|
||||||
|
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
|
||||||
|
# Distributed under the GNU General Public License, version 2.0.
|
||||||
|
#
|
||||||
|
# This script allows you to see repository status in your prompt.
|
||||||
|
#
|
||||||
|
# To enable:
|
||||||
|
#
|
||||||
|
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
|
||||||
|
# 2) Add the following line to your .bashrc/.zshrc:
|
||||||
|
# source ~/.git-prompt.sh
|
||||||
|
# 3a) Change your PS1 to call __git_ps1 as
|
||||||
|
# command-substitution:
|
||||||
|
# Bash: PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
|
||||||
|
# ZSH: setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ '
|
||||||
|
# the optional argument will be used as format string.
|
||||||
|
# 3b) Alternatively, for a slightly faster prompt, __git_ps1 can
|
||||||
|
# be used for PROMPT_COMMAND in Bash or for precmd() in Zsh
|
||||||
|
# with two parameters, <pre> and <post>, which are strings
|
||||||
|
# you would put in $PS1 before and after the status string
|
||||||
|
# generated by the git-prompt machinery. e.g.
|
||||||
|
# Bash: PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
|
||||||
|
# will show username, at-sign, host, colon, cwd, then
|
||||||
|
# various status string, followed by dollar and SP, as
|
||||||
|
# your prompt.
|
||||||
|
# ZSH: precmd () { __git_ps1 "%n" ":%~$ " "|%s" }
|
||||||
|
# will show username, pipe, then various status string,
|
||||||
|
# followed by colon, cwd, dollar and SP, as your prompt.
|
||||||
|
# Optionally, you can supply a third argument with a printf
|
||||||
|
# format string to finetune the output of the branch status
|
||||||
|
#
|
||||||
|
# The repository status will be displayed only if you are currently in a
|
||||||
|
# git repository. The %s token is the placeholder for the shown status.
|
||||||
|
#
|
||||||
|
# The prompt status always includes the current branch name.
|
||||||
|
#
|
||||||
|
# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,
|
||||||
|
# unstaged (*) and staged (+) changes will be shown next to the branch
|
||||||
|
# name. You can configure this per-repository with the
|
||||||
|
# bash.showDirtyState variable, which defaults to true once
|
||||||
|
# GIT_PS1_SHOWDIRTYSTATE is enabled.
|
||||||
|
#
|
||||||
|
# You can also see if currently something is stashed, by setting
|
||||||
|
# GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed,
|
||||||
|
# then a '$' will be shown next to the branch name.
|
||||||
|
#
|
||||||
|
# If you would like to see if there're untracked files, then you can set
|
||||||
|
# GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're untracked
|
||||||
|
# files, then a '%' will be shown next to the branch name. You can
|
||||||
|
# configure this per-repository with the bash.showUntrackedFiles
|
||||||
|
# variable, which defaults to true once GIT_PS1_SHOWUNTRACKEDFILES is
|
||||||
|
# enabled.
|
||||||
|
#
|
||||||
|
# If you would like to see the difference between HEAD and its upstream,
|
||||||
|
# set GIT_PS1_SHOWUPSTREAM="auto". A "<" indicates you are behind, ">"
|
||||||
|
# indicates you are ahead, "<>" indicates you have diverged and "="
|
||||||
|
# indicates that there is no difference. You can further control
|
||||||
|
# behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated list
|
||||||
|
# of values:
|
||||||
|
#
|
||||||
|
# verbose show number of commits ahead/behind (+/-) upstream
|
||||||
|
# name if verbose, then also show the upstream abbrev name
|
||||||
|
# legacy don't use the '--count' option available in recent
|
||||||
|
# versions of git-rev-list
|
||||||
|
# git always compare HEAD to @{upstream}
|
||||||
|
# svn always compare HEAD to your SVN upstream
|
||||||
|
#
|
||||||
|
# You can change the separator between the branch name and the above
|
||||||
|
# state symbols by setting GIT_PS1_STATESEPARATOR. The default separator
|
||||||
|
# is SP.
|
||||||
|
#
|
||||||
|
# When there is an in-progress operation such as a merge, rebase,
|
||||||
|
# revert, cherry-pick, or bisect, the prompt will include information
|
||||||
|
# related to the operation, often in the form "|<OPERATION-NAME>".
|
||||||
|
#
|
||||||
|
# When the repository has a sparse-checkout, a notification of the form
|
||||||
|
# "|SPARSE" will be included in the prompt. This can be shortened to a
|
||||||
|
# single '?' character by setting GIT_PS1_COMPRESSSPARSESTATE, or omitted
|
||||||
|
# by setting GIT_PS1_OMITSPARSESTATE.
|
||||||
|
#
|
||||||
|
# By default, __git_ps1 will compare HEAD to your SVN upstream if it can
|
||||||
|
# find one, or @{upstream} otherwise. Once you have set
|
||||||
|
# GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by
|
||||||
|
# setting the bash.showUpstream config variable.
|
||||||
|
#
|
||||||
|
# If you would like to see more information about the identity of
|
||||||
|
# commits checked out as a detached HEAD, set GIT_PS1_DESCRIBE_STYLE
|
||||||
|
# to one of these values:
|
||||||
|
#
|
||||||
|
# contains relative to newer annotated tag (v1.6.3.2~35)
|
||||||
|
# branch relative to newer tag or branch (master~4)
|
||||||
|
# describe relative to older annotated tag (v1.6.3.1-13-gdd42c2f)
|
||||||
|
# tag relative to any older tag (v1.6.3.1-13-gdd42c2f)
|
||||||
|
# default exactly matching tag
|
||||||
|
#
|
||||||
|
# If you would like a colored hint about the current dirty state, set
|
||||||
|
# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on
|
||||||
|
# the colored output of "git status -sb" and are available only when
|
||||||
|
# using __git_ps1 for PROMPT_COMMAND or precmd in Bash,
|
||||||
|
# but always available in Zsh.
|
||||||
|
#
|
||||||
|
# If you would like __git_ps1 to do nothing in the case when the current
|
||||||
|
# directory is set up to be ignored by git, then set
|
||||||
|
# GIT_PS1_HIDE_IF_PWD_IGNORED to a nonempty value. Override this on the
|
||||||
|
# repository level by setting bash.hideIfPwdIgnored to "false".
|
||||||
|
|
||||||
|
# check whether printf supports -v
|
||||||
|
__git_printf_supports_v=
|
||||||
|
printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1
|
||||||
|
|
||||||
|
# stores the divergence from upstream in $p
|
||||||
|
# used by GIT_PS1_SHOWUPSTREAM
|
||||||
|
__git_ps1_show_upstream ()
|
||||||
|
{
|
||||||
|
local key value
|
||||||
|
local svn_remote svn_url_pattern count n
|
||||||
|
local upstream=git legacy="" verbose="" name=""
|
||||||
|
|
||||||
|
svn_remote=()
|
||||||
|
# get some config options from git-config
|
||||||
|
local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
|
||||||
|
while read -r key value; do
|
||||||
|
case "$key" in
|
||||||
|
bash.showupstream)
|
||||||
|
GIT_PS1_SHOWUPSTREAM="$value"
|
||||||
|
if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then
|
||||||
|
p=""
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
svn-remote.*.url)
|
||||||
|
svn_remote[$((${#svn_remote[@]} + 1))]="$value"
|
||||||
|
svn_url_pattern="$svn_url_pattern\\|$value"
|
||||||
|
upstream=svn+git # default upstream is SVN if available, else git
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done <<< "$output"
|
||||||
|
|
||||||
|
# parse configuration values
|
||||||
|
local option
|
||||||
|
for option in ${GIT_PS1_SHOWUPSTREAM}; do
|
||||||
|
case "$option" in
|
||||||
|
git|svn) upstream="$option" ;;
|
||||||
|
verbose) verbose=1 ;;
|
||||||
|
legacy) legacy=1 ;;
|
||||||
|
name) name=1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Find our upstream
|
||||||
|
case "$upstream" in
|
||||||
|
git) upstream="@{upstream}" ;;
|
||||||
|
svn*)
|
||||||
|
# get the upstream from the "git-svn-id: ..." in a commit message
|
||||||
|
# (git-svn uses essentially the same procedure internally)
|
||||||
|
local -a svn_upstream
|
||||||
|
svn_upstream=($(git log --first-parent -1 \
|
||||||
|
--grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null))
|
||||||
|
if [[ 0 -ne ${#svn_upstream[@]} ]]; then
|
||||||
|
svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]}
|
||||||
|
svn_upstream=${svn_upstream%@*}
|
||||||
|
local n_stop="${#svn_remote[@]}"
|
||||||
|
for ((n=1; n <= n_stop; n++)); do
|
||||||
|
svn_upstream=${svn_upstream#${svn_remote[$n]}}
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -z "$svn_upstream" ]]; then
|
||||||
|
# default branch name for checkouts with no layout:
|
||||||
|
upstream=${GIT_SVN_ID:-git-svn}
|
||||||
|
else
|
||||||
|
upstream=${svn_upstream#/}
|
||||||
|
fi
|
||||||
|
elif [[ "svn+git" = "$upstream" ]]; then
|
||||||
|
upstream="@{upstream}"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Find how many commits we are ahead/behind our upstream
|
||||||
|
if [[ -z "$legacy" ]]; then
|
||||||
|
count="$(git rev-list --count --left-right \
|
||||||
|
"$upstream"...HEAD 2>/dev/null)"
|
||||||
|
else
|
||||||
|
# produce equivalent output to --count for older versions of git
|
||||||
|
local commits
|
||||||
|
if commits="$(git rev-list --left-right "$upstream"...HEAD 2>/dev/null)"
|
||||||
|
then
|
||||||
|
local commit behind=0 ahead=0
|
||||||
|
for commit in $commits
|
||||||
|
do
|
||||||
|
case "$commit" in
|
||||||
|
"<"*) ((behind++)) ;;
|
||||||
|
*) ((ahead++)) ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
count="$behind $ahead"
|
||||||
|
else
|
||||||
|
count=""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# calculate the result
|
||||||
|
if [[ -z "$verbose" ]]; then
|
||||||
|
case "$count" in
|
||||||
|
"") # no upstream
|
||||||
|
p="" ;;
|
||||||
|
"0 0") # equal to upstream
|
||||||
|
p="=" ;;
|
||||||
|
"0 "*) # ahead of upstream
|
||||||
|
p=">" ;;
|
||||||
|
*" 0") # behind upstream
|
||||||
|
p="<" ;;
|
||||||
|
*) # diverged from upstream
|
||||||
|
p="<>" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
case "$count" in
|
||||||
|
"") # no upstream
|
||||||
|
p="" ;;
|
||||||
|
"0 0") # equal to upstream
|
||||||
|
p=" u=" ;;
|
||||||
|
"0 "*) # ahead of upstream
|
||||||
|
p=" u+${count#0 }" ;;
|
||||||
|
*" 0") # behind upstream
|
||||||
|
p=" u-${count% 0}" ;;
|
||||||
|
*) # diverged from upstream
|
||||||
|
p=" u+${count#* }-${count% *}" ;;
|
||||||
|
esac
|
||||||
|
if [[ -n "$count" && -n "$name" ]]; then
|
||||||
|
__git_ps1_upstream_name=$(git rev-parse \
|
||||||
|
--abbrev-ref "$upstream" 2>/dev/null)
|
||||||
|
if [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then
|
||||||
|
p="$p \${__git_ps1_upstream_name}"
|
||||||
|
else
|
||||||
|
p="$p ${__git_ps1_upstream_name}"
|
||||||
|
# not needed anymore; keep user's
|
||||||
|
# environment clean
|
||||||
|
unset __git_ps1_upstream_name
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Helper function that is meant to be called from __git_ps1. It
|
||||||
|
# injects color codes into the appropriate gitstring variables used
|
||||||
|
# to build a gitstring.
|
||||||
|
__git_ps1_colorize_gitstring ()
|
||||||
|
{
|
||||||
|
if [[ -n ${ZSH_VERSION-} ]]; then
|
||||||
|
local c_red='%F{red}'
|
||||||
|
local c_green='%F{green}'
|
||||||
|
local c_lblue='%F{blue}'
|
||||||
|
local c_clear='%f'
|
||||||
|
else
|
||||||
|
# Using \[ and \] around colors is necessary to prevent
|
||||||
|
# issues with command line editing/browsing/completion!
|
||||||
|
local c_red='\[\e[31m\]'
|
||||||
|
local c_green='\[\e[32m\]'
|
||||||
|
local c_lblue='\[\e[1;34m\]'
|
||||||
|
local c_clear='\[\e[0m\]'
|
||||||
|
fi
|
||||||
|
local bad_color=$c_red
|
||||||
|
local ok_color=$c_green
|
||||||
|
local flags_color="$c_lblue"
|
||||||
|
|
||||||
|
local branch_color=""
|
||||||
|
if [ $detached = no ]; then
|
||||||
|
branch_color="$ok_color"
|
||||||
|
else
|
||||||
|
branch_color="$bad_color"
|
||||||
|
fi
|
||||||
|
c="$branch_color$c"
|
||||||
|
|
||||||
|
z="$c_clear$z"
|
||||||
|
if [ "$w" = "*" ]; then
|
||||||
|
w="$bad_color$w"
|
||||||
|
fi
|
||||||
|
if [ -n "$i" ]; then
|
||||||
|
i="$ok_color$i"
|
||||||
|
fi
|
||||||
|
if [ -n "$s" ]; then
|
||||||
|
s="$flags_color$s"
|
||||||
|
fi
|
||||||
|
if [ -n "$u" ]; then
|
||||||
|
u="$bad_color$u"
|
||||||
|
fi
|
||||||
|
r="$c_clear$r"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Helper function to read the first line of a file into a variable.
|
||||||
|
# __git_eread requires 2 arguments, the file path and the name of the
|
||||||
|
# variable, in that order.
|
||||||
|
__git_eread ()
|
||||||
|
{
|
||||||
|
test -r "$1" && IFS=$'\r\n' read "$2" <"$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# see if a cherry-pick or revert is in progress, if the user has committed a
|
||||||
|
# conflict resolution with 'git commit' in the middle of a sequence of picks or
|
||||||
|
# reverts then CHERRY_PICK_HEAD/REVERT_HEAD will not exist so we have to read
|
||||||
|
# the todo file.
|
||||||
|
__git_sequencer_status ()
|
||||||
|
{
|
||||||
|
local todo
|
||||||
|
if test -f "$g/CHERRY_PICK_HEAD"
|
||||||
|
then
|
||||||
|
r="|CHERRY-PICKING"
|
||||||
|
return 0;
|
||||||
|
elif test -f "$g/REVERT_HEAD"
|
||||||
|
then
|
||||||
|
r="|REVERTING"
|
||||||
|
return 0;
|
||||||
|
elif __git_eread "$g/sequencer/todo" todo
|
||||||
|
then
|
||||||
|
case "$todo" in
|
||||||
|
p[\ \ ]|pick[\ \ ]*)
|
||||||
|
r="|CHERRY-PICKING"
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
revert[\ \ ]*)
|
||||||
|
r="|REVERTING"
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# __git_ps1 accepts 0 or 1 arguments (i.e., format string)
|
||||||
|
# when called from PS1 using command substitution
|
||||||
|
# in this mode it prints text to add to bash PS1 prompt (includes branch name)
|
||||||
|
#
|
||||||
|
# __git_ps1 requires 2 or 3 arguments when called from PROMPT_COMMAND (pc)
|
||||||
|
# in that case it _sets_ PS1. The arguments are parts of a PS1 string.
|
||||||
|
# when two arguments are given, the first is prepended and the second appended
|
||||||
|
# to the state string when assigned to PS1.
|
||||||
|
# The optional third parameter will be used as printf format string to further
|
||||||
|
# customize the output of the git-status string.
|
||||||
|
# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true
|
||||||
|
__git_ps1 ()
|
||||||
|
{
|
||||||
|
# preserve exit status
|
||||||
|
local exit=$?
|
||||||
|
local pcmode=no
|
||||||
|
local detached=no
|
||||||
|
local ps1pc_start='\u@\h:\w '
|
||||||
|
local ps1pc_end='\$ '
|
||||||
|
local printf_format=' (%s)'
|
||||||
|
|
||||||
|
case "$#" in
|
||||||
|
2|3) pcmode=yes
|
||||||
|
ps1pc_start="$1"
|
||||||
|
ps1pc_end="$2"
|
||||||
|
printf_format="${3:-$printf_format}"
|
||||||
|
# set PS1 to a plain prompt so that we can
|
||||||
|
# simply return early if the prompt should not
|
||||||
|
# be decorated
|
||||||
|
PS1="$ps1pc_start$ps1pc_end"
|
||||||
|
;;
|
||||||
|
0|1) printf_format="${1:-$printf_format}"
|
||||||
|
;;
|
||||||
|
*) return $exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# ps1_expanded: This variable is set to 'yes' if the shell
|
||||||
|
# subjects the value of PS1 to parameter expansion:
|
||||||
|
#
|
||||||
|
# * bash does unless the promptvars option is disabled
|
||||||
|
# * zsh does not unless the PROMPT_SUBST option is set
|
||||||
|
# * POSIX shells always do
|
||||||
|
#
|
||||||
|
# If the shell would expand the contents of PS1 when drawing
|
||||||
|
# the prompt, a raw ref name must not be included in PS1.
|
||||||
|
# This protects the user from arbitrary code execution via
|
||||||
|
# specially crafted ref names. For example, a ref named
|
||||||
|
# 'refs/heads/$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)' might cause the
|
||||||
|
# shell to execute 'sudo rm -rf /' when the prompt is drawn.
|
||||||
|
#
|
||||||
|
# Instead, the ref name should be placed in a separate global
|
||||||
|
# variable (in the __git_ps1_* namespace to avoid colliding
|
||||||
|
# with the user's environment) and that variable should be
|
||||||
|
# referenced from PS1. For example:
|
||||||
|
#
|
||||||
|
# __git_ps1_foo=$(do_something_to_get_ref_name)
|
||||||
|
# PS1="...stuff...\${__git_ps1_foo}...stuff..."
|
||||||
|
#
|
||||||
|
# If the shell does not expand the contents of PS1, the raw
|
||||||
|
# ref name must be included in PS1.
|
||||||
|
#
|
||||||
|
# The value of this variable is only relevant when in pcmode.
|
||||||
|
#
|
||||||
|
# Assume that the shell follows the POSIX specification and
|
||||||
|
# expands PS1 unless determined otherwise. (This is more
|
||||||
|
# likely to be correct if the user has a non-bash, non-zsh
|
||||||
|
# shell and safer than the alternative if the assumption is
|
||||||
|
# incorrect.)
|
||||||
|
#
|
||||||
|
local ps1_expanded=yes
|
||||||
|
[ -z "${ZSH_VERSION-}" ] || [[ -o PROMPT_SUBST ]] || ps1_expanded=no
|
||||||
|
[ -z "${BASH_VERSION-}" ] || shopt -q promptvars || ps1_expanded=no
|
||||||
|
|
||||||
|
local repo_info rev_parse_exit_code
|
||||||
|
repo_info="$(git rev-parse --git-dir --is-inside-git-dir \
|
||||||
|
--is-bare-repository --is-inside-work-tree \
|
||||||
|
--short HEAD 2>/dev/null)"
|
||||||
|
rev_parse_exit_code="$?"
|
||||||
|
|
||||||
|
if [ -z "$repo_info" ]; then
|
||||||
|
return $exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
local short_sha=""
|
||||||
|
if [ "$rev_parse_exit_code" = "0" ]; then
|
||||||
|
short_sha="${repo_info##*$'\n'}"
|
||||||
|
repo_info="${repo_info%$'\n'*}"
|
||||||
|
fi
|
||||||
|
local inside_worktree="${repo_info##*$'\n'}"
|
||||||
|
repo_info="${repo_info%$'\n'*}"
|
||||||
|
local bare_repo="${repo_info##*$'\n'}"
|
||||||
|
repo_info="${repo_info%$'\n'*}"
|
||||||
|
local inside_gitdir="${repo_info##*$'\n'}"
|
||||||
|
local g="${repo_info%$'\n'*}"
|
||||||
|
|
||||||
|
if [ "true" = "$inside_worktree" ] &&
|
||||||
|
[ -n "${GIT_PS1_HIDE_IF_PWD_IGNORED-}" ] &&
|
||||||
|
[ "$(git config --bool bash.hideIfPwdIgnored)" != "false" ] &&
|
||||||
|
git check-ignore -q .
|
||||||
|
then
|
||||||
|
return $exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
local sparse=""
|
||||||
|
if [ -z "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
|
||||||
|
[ -z "${GIT_PS1_OMITSPARSESTATE}" ] &&
|
||||||
|
[ "$(git config --bool core.sparseCheckout)" = "true" ]; then
|
||||||
|
sparse="|SPARSE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local r=""
|
||||||
|
local b=""
|
||||||
|
local step=""
|
||||||
|
local total=""
|
||||||
|
if [ -d "$g/rebase-merge" ]; then
|
||||||
|
__git_eread "$g/rebase-merge/head-name" b
|
||||||
|
__git_eread "$g/rebase-merge/msgnum" step
|
||||||
|
__git_eread "$g/rebase-merge/end" total
|
||||||
|
r="|REBASE"
|
||||||
|
else
|
||||||
|
if [ -d "$g/rebase-apply" ]; then
|
||||||
|
__git_eread "$g/rebase-apply/next" step
|
||||||
|
__git_eread "$g/rebase-apply/last" total
|
||||||
|
if [ -f "$g/rebase-apply/rebasing" ]; then
|
||||||
|
__git_eread "$g/rebase-apply/head-name" b
|
||||||
|
r="|REBASE"
|
||||||
|
elif [ -f "$g/rebase-apply/applying" ]; then
|
||||||
|
r="|AM"
|
||||||
|
else
|
||||||
|
r="|AM/REBASE"
|
||||||
|
fi
|
||||||
|
elif [ -f "$g/MERGE_HEAD" ]; then
|
||||||
|
r="|MERGING"
|
||||||
|
elif __git_sequencer_status; then
|
||||||
|
:
|
||||||
|
elif [ -f "$g/BISECT_LOG" ]; then
|
||||||
|
r="|BISECTING"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$b" ]; then
|
||||||
|
:
|
||||||
|
elif [ -h "$g/HEAD" ]; then
|
||||||
|
# symlink symbolic ref
|
||||||
|
b="$(git symbolic-ref HEAD 2>/dev/null)"
|
||||||
|
else
|
||||||
|
local head=""
|
||||||
|
if ! __git_eread "$g/HEAD" head; then
|
||||||
|
return $exit
|
||||||
|
fi
|
||||||
|
# is it a symbolic ref?
|
||||||
|
b="${head#ref: }"
|
||||||
|
if [ "$head" = "$b" ]; then
|
||||||
|
detached=yes
|
||||||
|
b="$(
|
||||||
|
case "${GIT_PS1_DESCRIBE_STYLE-}" in
|
||||||
|
(contains)
|
||||||
|
git describe --contains HEAD ;;
|
||||||
|
(branch)
|
||||||
|
git describe --contains --all HEAD ;;
|
||||||
|
(tag)
|
||||||
|
git describe --tags HEAD ;;
|
||||||
|
(describe)
|
||||||
|
git describe HEAD ;;
|
||||||
|
(* | default)
|
||||||
|
git describe --tags --exact-match HEAD ;;
|
||||||
|
esac 2>/dev/null)" ||
|
||||||
|
|
||||||
|
b="$short_sha..."
|
||||||
|
b="($b)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$step" ] && [ -n "$total" ]; then
|
||||||
|
r="$r $step/$total"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local w=""
|
||||||
|
local i=""
|
||||||
|
local s=""
|
||||||
|
local u=""
|
||||||
|
local h=""
|
||||||
|
local c=""
|
||||||
|
local p=""
|
||||||
|
|
||||||
|
if [ "true" = "$inside_gitdir" ]; then
|
||||||
|
if [ "true" = "$bare_repo" ]; then
|
||||||
|
c="BARE:"
|
||||||
|
else
|
||||||
|
b="GIT_DIR!"
|
||||||
|
fi
|
||||||
|
elif [ "true" = "$inside_worktree" ]; then
|
||||||
|
if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
|
||||||
|
[ "$(git config --bool bash.showDirtyState)" != "false" ]
|
||||||
|
then
|
||||||
|
git diff --no-ext-diff --quiet || w="*"
|
||||||
|
git diff --no-ext-diff --cached --quiet || i="+"
|
||||||
|
if [ -z "$short_sha" ] && [ -z "$i" ]; then
|
||||||
|
i="#"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
|
||||||
|
git rev-parse --verify --quiet refs/stash >/dev/null
|
||||||
|
then
|
||||||
|
s="$"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
|
||||||
|
[ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
|
||||||
|
git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>/dev/null
|
||||||
|
then
|
||||||
|
u="%${ZSH_VERSION+%}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
|
||||||
|
[ "$(git config --bool core.sparseCheckout)" = "true" ]; then
|
||||||
|
h="?"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then
|
||||||
|
__git_ps1_show_upstream
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
local z="${GIT_PS1_STATESEPARATOR-" "}"
|
||||||
|
|
||||||
|
# NO color option unless in PROMPT_COMMAND mode or it's Zsh
|
||||||
|
if [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
|
||||||
|
if [ $pcmode = yes ] || [ -n "${ZSH_VERSION-}" ]; then
|
||||||
|
__git_ps1_colorize_gitstring
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
b=${b##refs/heads/}
|
||||||
|
if [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then
|
||||||
|
__git_ps1_branch_name=$b
|
||||||
|
b="\${__git_ps1_branch_name}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local f="$h$w$i$s$u"
|
||||||
|
local gitstring="$c$b${f:+$z$f}${sparse}$r$p"
|
||||||
|
|
||||||
|
if [ $pcmode = yes ]; then
|
||||||
|
if [ "${__git_printf_supports_v-}" != yes ]; then
|
||||||
|
gitstring=$(printf -- "$printf_format" "$gitstring")
|
||||||
|
else
|
||||||
|
printf -v gitstring -- "$printf_format" "$gitstring"
|
||||||
|
fi
|
||||||
|
PS1="$ps1pc_start$gitstring$ps1pc_end"
|
||||||
|
else
|
||||||
|
printf -- "$printf_format" "$gitstring"
|
||||||
|
fi
|
||||||
|
|
||||||
|
return $exit
|
||||||
|
}
|
||||||
1132
.tmux.conf
1132
.tmux.conf
File diff suppressed because it is too large
Load Diff
333
.tmux.conf.local
333
.tmux.conf.local
@ -1,3 +1,4 @@
|
|||||||
|
# : << EOF
|
||||||
# https://github.com/gpakosz/.tmux
|
# https://github.com/gpakosz/.tmux
|
||||||
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
|
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
|
||||||
# without any warranty.
|
# without any warranty.
|
||||||
@ -23,7 +24,7 @@ bind-key -n C-S-Right swap-window -t +1
|
|||||||
|
|
||||||
# Use Alt-vim keys without prefix key to switch panes
|
# Use Alt-vim keys without prefix key to switch panes
|
||||||
bind -n M-h select-pane -L
|
bind -n M-h select-pane -L
|
||||||
bind -n M-j select-pane -D
|
bind -n M-j select-pane -D
|
||||||
bind -n M-k select-pane -U
|
bind -n M-k select-pane -U
|
||||||
bind -n M-l select-pane -R
|
bind -n M-l select-pane -R
|
||||||
|
|
||||||
@ -76,11 +77,49 @@ tmux_conf_new_session_prompt=false
|
|||||||
# RGB 24-bit colour support (tmux >= 2.2), possible values are:
|
# RGB 24-bit colour support (tmux >= 2.2), possible values are:
|
||||||
# - true
|
# - true
|
||||||
# - false (default)
|
# - false (default)
|
||||||
tmux_conf_theme_24b_colour=false
|
tmux_conf_24b_colour=false
|
||||||
|
|
||||||
|
# default theme
|
||||||
|
tmux_conf_theme_colour_1="#080808" # dark gray
|
||||||
|
tmux_conf_theme_colour_2="#303030" # gray
|
||||||
|
tmux_conf_theme_colour_3="#8a8a8a" # light gray
|
||||||
|
tmux_conf_theme_colour_4="#00afff" # light blue
|
||||||
|
tmux_conf_theme_colour_5="#ffff00" # yellow
|
||||||
|
tmux_conf_theme_colour_6="#080808" # dark gray
|
||||||
|
tmux_conf_theme_colour_7="#e4e4e4" # white
|
||||||
|
tmux_conf_theme_colour_8="#080808" # dark gray
|
||||||
|
tmux_conf_theme_colour_9="#ffff00" # yellow
|
||||||
|
tmux_conf_theme_colour_10="#ff00af" # pink
|
||||||
|
tmux_conf_theme_colour_11="#5fff00" # green
|
||||||
|
tmux_conf_theme_colour_12="#8a8a8a" # light gray
|
||||||
|
tmux_conf_theme_colour_13="#e4e4e4" # white
|
||||||
|
tmux_conf_theme_colour_14="#080808" # dark gray
|
||||||
|
tmux_conf_theme_colour_15="#080808" # dark gray
|
||||||
|
tmux_conf_theme_colour_16="#d70000" # red
|
||||||
|
tmux_conf_theme_colour_17="#e4e4e4" # white
|
||||||
|
|
||||||
|
# default theme (ansi)
|
||||||
|
#tmux_conf_theme_colour_1="colour0"
|
||||||
|
#tmux_conf_theme_colour_2="colour8"
|
||||||
|
#tmux_conf_theme_colour_3="colour8"
|
||||||
|
#tmux_conf_theme_colour_4="colour14"
|
||||||
|
#tmux_conf_theme_colour_5="colour11"
|
||||||
|
#tmux_conf_theme_colour_6="colour0"
|
||||||
|
#tmux_conf_theme_colour_7="colour15"
|
||||||
|
#tmux_conf_theme_colour_8="colour0"
|
||||||
|
#tmux_conf_theme_colour_9="colour11"
|
||||||
|
#tmux_conf_theme_colour_10="colour13"
|
||||||
|
#tmux_conf_theme_colour_11="colour10"
|
||||||
|
#tmux_conf_theme_colour_12="colour8"
|
||||||
|
#tmux_conf_theme_colour_13="colour15"
|
||||||
|
#tmux_conf_theme_colour_14="colour0"
|
||||||
|
#tmux_conf_theme_colour_15="colour0"
|
||||||
|
#tmux_conf_theme_colour_16="colour1"
|
||||||
|
#tmux_conf_theme_colour_17="colour15"
|
||||||
|
|
||||||
# window style
|
# window style
|
||||||
tmux_conf_theme_window_fg='default'
|
tmux_conf_theme_window_fg="default"
|
||||||
tmux_conf_theme_window_bg='default'
|
tmux_conf_theme_window_bg="default"
|
||||||
|
|
||||||
# highlight focused pane (tmux >= 2.1), possible values are:
|
# highlight focused pane (tmux >= 2.1), possible values are:
|
||||||
# - true
|
# - true
|
||||||
@ -88,8 +127,7 @@ tmux_conf_theme_window_bg='default'
|
|||||||
tmux_conf_theme_highlight_focused_pane=false
|
tmux_conf_theme_highlight_focused_pane=false
|
||||||
|
|
||||||
# focused pane colours:
|
# focused pane colours:
|
||||||
tmux_conf_theme_focused_pane_fg='default'
|
tmux_conf_theme_focused_pane_bg="$tmux_conf_theme_colour_2"
|
||||||
tmux_conf_theme_focused_pane_bg='#0087d7' # light blue
|
|
||||||
|
|
||||||
# pane border style, possible values are:
|
# pane border style, possible values are:
|
||||||
# - thin (default)
|
# - thin (default)
|
||||||
@ -97,81 +135,107 @@ tmux_conf_theme_focused_pane_bg='#0087d7' # light blue
|
|||||||
tmux_conf_theme_pane_border_style=thin
|
tmux_conf_theme_pane_border_style=thin
|
||||||
|
|
||||||
# pane borders colours:
|
# pane borders colours:
|
||||||
tmux_conf_theme_pane_border='#444444' # gray
|
tmux_conf_theme_pane_border="$tmux_conf_theme_colour_2"
|
||||||
tmux_conf_theme_pane_active_border='#00afff' # light blue
|
tmux_conf_theme_pane_active_border="$tmux_conf_theme_colour_4"
|
||||||
|
|
||||||
# pane indicator colours
|
# pane indicator colours (when you hit <prefix> + q)
|
||||||
tmux_conf_theme_pane_indicator='#00afff' # light blue
|
tmux_conf_theme_pane_indicator="$tmux_conf_theme_colour_4"
|
||||||
tmux_conf_theme_pane_active_indicator='#00afff' # light blue
|
tmux_conf_theme_pane_active_indicator="$tmux_conf_theme_colour_4"
|
||||||
|
|
||||||
# status line style
|
# status line style
|
||||||
tmux_conf_theme_message_fg='#000000' # black
|
tmux_conf_theme_message_fg="$tmux_conf_theme_colour_1"
|
||||||
tmux_conf_theme_message_bg='#ffff00' # yellow
|
tmux_conf_theme_message_bg="$tmux_conf_theme_colour_5"
|
||||||
tmux_conf_theme_message_attr='bold'
|
tmux_conf_theme_message_attr="bold"
|
||||||
|
|
||||||
# status line command style (<prefix> : Escape)
|
# status line command style (<prefix> : Escape)
|
||||||
tmux_conf_theme_message_command_fg='#ffff00' # yellow
|
tmux_conf_theme_message_command_fg="$tmux_conf_theme_colour_5"
|
||||||
tmux_conf_theme_message_command_bg='#000000' # black
|
tmux_conf_theme_message_command_bg="$tmux_conf_theme_colour_1"
|
||||||
tmux_conf_theme_message_command_attr='bold'
|
tmux_conf_theme_message_command_attr="bold"
|
||||||
|
|
||||||
# window modes style
|
# window modes style
|
||||||
tmux_conf_theme_mode_fg='#000000' # black
|
tmux_conf_theme_mode_fg="$tmux_conf_theme_colour_1"
|
||||||
tmux_conf_theme_mode_bg='#ffff00' # yellow
|
tmux_conf_theme_mode_bg="$tmux_conf_theme_colour_5"
|
||||||
tmux_conf_theme_mode_attr='bold'
|
tmux_conf_theme_mode_attr="bold"
|
||||||
|
|
||||||
# status line style
|
# status line style
|
||||||
tmux_conf_theme_status_fg='#8a8a8a' # light gray
|
tmux_conf_theme_status_fg="$tmux_conf_theme_colour_3"
|
||||||
tmux_conf_theme_status_bg='#080808' # dark gray
|
tmux_conf_theme_status_bg="$tmux_conf_theme_colour_1"
|
||||||
tmux_conf_theme_status_attr='none'
|
tmux_conf_theme_status_attr="none"
|
||||||
|
|
||||||
|
# terminal title
|
||||||
|
# - built-in variables are:
|
||||||
|
# - #{circled_window_index}
|
||||||
|
# - #{circled_session_name}
|
||||||
|
# - #{hostname}
|
||||||
|
# - #{hostname_ssh}
|
||||||
|
# - #{hostname_full}
|
||||||
|
# - #{hostname_full_ssh}
|
||||||
|
# - #{username}
|
||||||
|
# - #{username_ssh}
|
||||||
|
tmux_conf_theme_terminal_title="#h ❐ #S ● #I #W"
|
||||||
|
|
||||||
# window status style
|
# window status style
|
||||||
# - built-in variables are:
|
# - built-in variables are:
|
||||||
# - #{circled_window_index}
|
# - #{circled_window_index}
|
||||||
tmux_conf_theme_window_status_fg='#8a8a8a' # light gray
|
# - #{circled_session_name}
|
||||||
tmux_conf_theme_window_status_bg='#080808' # dark gray
|
# - #{hostname}
|
||||||
tmux_conf_theme_window_status_attr='none'
|
# - #{hostname_ssh}
|
||||||
tmux_conf_theme_window_status_format='#I #W'
|
# - #{hostname_full}
|
||||||
#tmux_conf_theme_window_status_format='#{circled_window_index} #W'
|
# - #{hostname_full_ssh}
|
||||||
#tmux_conf_theme_window_status_format='#I #W#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}'
|
# - #{username}
|
||||||
|
# - #{username_ssh}
|
||||||
|
tmux_conf_theme_window_status_fg="$tmux_conf_theme_colour_3"
|
||||||
|
tmux_conf_theme_window_status_bg="$tmux_conf_theme_colour_1"
|
||||||
|
tmux_conf_theme_window_status_attr="none"
|
||||||
|
tmux_conf_theme_window_status_format="#I #W"
|
||||||
|
#tmux_conf_theme_window_status_format="#{circled_window_index} #W"
|
||||||
|
#tmux_conf_theme_window_status_format="#I #W#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}"
|
||||||
|
|
||||||
# window current status style
|
# window current status style
|
||||||
# - built-in variables are:
|
# - built-in variables are:
|
||||||
# - #{circled_window_index}
|
# - #{circled_window_index}
|
||||||
tmux_conf_theme_window_status_current_fg='#000000' # black
|
# - #{circled_session_name}
|
||||||
tmux_conf_theme_window_status_current_bg='#00afff' # light blue
|
# - #{hostname}
|
||||||
tmux_conf_theme_window_status_current_attr='bold'
|
# - #{hostname_ssh}
|
||||||
tmux_conf_theme_window_status_current_format='#I #W'
|
# - #{hostname_full}
|
||||||
#tmux_conf_theme_window_status_current_format='#{circled_window_index} #W'
|
# - #{hostname_full_ssh}
|
||||||
#tmux_conf_theme_window_status_current_format='#I #W#{?window_zoomed_flag,🔍,}'
|
# - #{username}
|
||||||
|
# - #{username_ssh}
|
||||||
|
tmux_conf_theme_window_status_current_fg="$tmux_conf_theme_colour_1"
|
||||||
|
tmux_conf_theme_window_status_current_bg="$tmux_conf_theme_colour_4"
|
||||||
|
tmux_conf_theme_window_status_current_attr="bold"
|
||||||
|
tmux_conf_theme_window_status_current_format="#I #W"
|
||||||
|
#tmux_conf_theme_window_status_current_format="#{circled_window_index} #W"
|
||||||
|
#tmux_conf_theme_window_status_current_format="#I #W#{?window_zoomed_flag,🔍,}"
|
||||||
|
|
||||||
# window activity status style
|
# window activity status style
|
||||||
tmux_conf_theme_window_status_activity_fg='default'
|
tmux_conf_theme_window_status_activity_fg="default"
|
||||||
tmux_conf_theme_window_status_activity_bg='default'
|
tmux_conf_theme_window_status_activity_bg="default"
|
||||||
tmux_conf_theme_window_status_activity_attr='underscore'
|
tmux_conf_theme_window_status_activity_attr="underscore"
|
||||||
|
|
||||||
# window bell status style
|
# window bell status style
|
||||||
tmux_conf_theme_window_status_bell_fg='#ffff00' # yellow
|
tmux_conf_theme_window_status_bell_fg="$tmux_conf_theme_colour_5"
|
||||||
tmux_conf_theme_window_status_bell_bg='default'
|
tmux_conf_theme_window_status_bell_bg="default"
|
||||||
tmux_conf_theme_window_status_bell_attr='blink,bold'
|
tmux_conf_theme_window_status_bell_attr="blink,bold"
|
||||||
|
|
||||||
# window last status style
|
# window last status style
|
||||||
tmux_conf_theme_window_status_last_fg='#00afff' # light blue
|
tmux_conf_theme_window_status_last_fg="$tmux_conf_theme_colour_4"
|
||||||
tmux_conf_theme_window_status_last_bg='default'
|
tmux_conf_theme_window_status_last_bg="$tmux_conf_theme_colour_2"
|
||||||
tmux_conf_theme_window_status_last_attr='none'
|
tmux_conf_theme_window_status_last_attr="none"
|
||||||
|
|
||||||
# status left/right sections separators
|
# status left/right sections separators
|
||||||
tmux_conf_theme_left_separator_main=''
|
#tmux_conf_theme_left_separator_main=""
|
||||||
tmux_conf_theme_left_separator_sub='|'
|
#tmux_conf_theme_left_separator_sub="|"
|
||||||
tmux_conf_theme_right_separator_main=''
|
#tmux_conf_theme_right_separator_main=""
|
||||||
tmux_conf_theme_right_separator_sub='|'
|
#tmux_conf_theme_right_separator_sub="|"
|
||||||
#tmux_conf_theme_left_separator_main='' # /!\ you don't need to install Powerline
|
tmux_conf_theme_left_separator_main="\uE0B0" # /!\ you don't need to install Powerline
|
||||||
#tmux_conf_theme_left_separator_sub='' # you only need fonts patched with
|
tmux_conf_theme_left_separator_sub="\uE0B1" # you only need fonts patched with
|
||||||
#tmux_conf_theme_right_separator_main='' # Powerline symbols or the standalone
|
tmux_conf_theme_right_separator_main="\uE0B2" # Powerline symbols or the standalone
|
||||||
#tmux_conf_theme_right_separator_sub='' # PowerlineSymbols.otf font
|
mux_conf_theme_right_separator_sub="\uE0B3" # PowerlineSymbols.otf font, see README.md
|
||||||
|
|
||||||
# status left/right content:
|
# status left/right content:
|
||||||
# - separate main sections with '|'
|
# - separate main sections with "|"
|
||||||
# - separate subsections with ','
|
# - separate subsections with ","
|
||||||
# - built-in variables are:
|
# - built-in variables are:
|
||||||
# - #{battery_bar}
|
# - #{battery_bar}
|
||||||
# - #{battery_hbar}
|
# - #{battery_hbar}
|
||||||
@ -181,89 +245,106 @@ tmux_conf_theme_right_separator_sub='|'
|
|||||||
# - #{circled_session_name}
|
# - #{circled_session_name}
|
||||||
# - #{hostname_ssh}
|
# - #{hostname_ssh}
|
||||||
# - #{hostname}
|
# - #{hostname}
|
||||||
|
# - #{hostname_full}
|
||||||
|
# - #{hostname_full_ssh}
|
||||||
# - #{loadavg}
|
# - #{loadavg}
|
||||||
|
# - #{mouse}
|
||||||
# - #{pairing}
|
# - #{pairing}
|
||||||
# - #{prefix}
|
# - #{prefix}
|
||||||
# - #{root}
|
# - #{root}
|
||||||
# - #{uptime_d}
|
# - #{synchronized}
|
||||||
|
# - #{uptime_y}
|
||||||
|
# - #{uptime_d} (modulo 365 when #{uptime_y} is used)
|
||||||
# - #{uptime_h}
|
# - #{uptime_h}
|
||||||
# - #{uptime_m}
|
# - #{uptime_m}
|
||||||
# - #{uptime_s}
|
# - #{uptime_s}
|
||||||
# - #{username}
|
# - #{username}
|
||||||
# - #{username_ssh}
|
# - #{username_ssh}
|
||||||
tmux_conf_theme_status_left=' ❐ #S | ↑#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '
|
tmux_conf_theme_status_left=" ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} "
|
||||||
tmux_conf_theme_status_right='#{prefix}#{pairing} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '
|
tmux_conf_theme_status_right=" #{prefix}#{mouse}#{pairing}#{synchronized} #(curl #{?battery_status,#{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} "
|
||||||
|
|
||||||
# status left style
|
# status left style
|
||||||
tmux_conf_theme_status_left_fg='#000000,#e4e4e4,#e4e4e4' # black, white , white
|
tmux_conf_theme_status_left_fg="$tmux_conf_theme_colour_6,$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_8"
|
||||||
tmux_conf_theme_status_left_bg='#ffff00,#ff00af,#00afff' # yellow, pink, white blue
|
tmux_conf_theme_status_left_bg="$tmux_conf_theme_colour_9,$tmux_conf_theme_colour_10,$tmux_conf_theme_colour_11"
|
||||||
tmux_conf_theme_status_left_attr='bold,none,none'
|
tmux_conf_theme_status_left_attr="bold,none,none"
|
||||||
|
|
||||||
# status right style
|
# status right style
|
||||||
tmux_conf_theme_status_right_fg='#8a8a8a,#e4e4e4,#000000' # light gray, white, black
|
tmux_conf_theme_status_right_fg="$tmux_conf_theme_colour_12,$tmux_conf_theme_colour_13,$tmux_conf_theme_colour_14"
|
||||||
tmux_conf_theme_status_right_bg='#080808,#d70000,#e4e4e4' # dark gray, red, white
|
tmux_conf_theme_status_right_bg="$tmux_conf_theme_colour_15,$tmux_conf_theme_colour_16,$tmux_conf_theme_colour_17"
|
||||||
tmux_conf_theme_status_right_attr='none,none,bold'
|
tmux_conf_theme_status_right_attr="none,none,bold"
|
||||||
|
|
||||||
# pairing indicator
|
# pairing indicator
|
||||||
tmux_conf_theme_pairing='👓 ' # U+1F453
|
tmux_conf_theme_pairing="⚇" # U+2687
|
||||||
tmux_conf_theme_pairing_fg='none'
|
tmux_conf_theme_pairing_fg="none"
|
||||||
tmux_conf_theme_pairing_bg='none'
|
tmux_conf_theme_pairing_bg="none"
|
||||||
tmux_conf_theme_pairing_attr='none'
|
tmux_conf_theme_pairing_attr="none"
|
||||||
|
|
||||||
# prefix indicator
|
# prefix indicator
|
||||||
tmux_conf_theme_prefix='⌨ ' # U+2328
|
tmux_conf_theme_prefix="⌨" # U+2328
|
||||||
tmux_conf_theme_prefix_fg='none'
|
tmux_conf_theme_prefix_fg="none"
|
||||||
tmux_conf_theme_prefix_bg='none'
|
tmux_conf_theme_prefix_bg="none"
|
||||||
tmux_conf_theme_prefix_attr='none'
|
tmux_conf_theme_prefix_attr="none"
|
||||||
|
|
||||||
|
# mouse indicator
|
||||||
|
tmux_conf_theme_mouse="↗" # U+2197
|
||||||
|
tmux_conf_theme_mouse_fg="none"
|
||||||
|
tmux_conf_theme_mouse_bg="none"
|
||||||
|
tmux_conf_theme_mouse_attr="none"
|
||||||
|
|
||||||
# root indicator
|
# root indicator
|
||||||
tmux_conf_theme_root='!'
|
tmux_conf_theme_root="!"
|
||||||
tmux_conf_theme_root_fg='none'
|
tmux_conf_theme_root_fg="none"
|
||||||
tmux_conf_theme_root_bg='none'
|
tmux_conf_theme_root_bg="none"
|
||||||
tmux_conf_theme_root_attr='bold,blink'
|
tmux_conf_theme_root_attr="bold,blink"
|
||||||
|
|
||||||
|
# synchronized indicator
|
||||||
|
tmux_conf_theme_synchronized="⚏" # U+268F
|
||||||
|
tmux_conf_theme_synchronized_fg="none"
|
||||||
|
tmux_conf_theme_synchronized_bg="none"
|
||||||
|
tmux_conf_theme_synchronized_attr="none"
|
||||||
|
|
||||||
# battery bar symbols
|
# battery bar symbols
|
||||||
tmux_conf_battery_bar_symbol_full='◼'
|
tmux_conf_battery_bar_symbol_full="◼"
|
||||||
tmux_conf_battery_bar_symbol_empty='◻'
|
tmux_conf_battery_bar_symbol_empty="◻"
|
||||||
#tmux_conf_battery_bar_symbol_full='♥'
|
#tmux_conf_battery_bar_symbol_full="♥"
|
||||||
#tmux_conf_battery_bar_symbol_empty='·'
|
#tmux_conf_battery_bar_symbol_empty="·"
|
||||||
|
|
||||||
# battery bar length (in number of symbols), possible values are:
|
# battery bar length (in number of symbols), possible values are:
|
||||||
# - auto
|
# - auto
|
||||||
# - a number, e.g. 5
|
# - a number, e.g. 5
|
||||||
tmux_conf_battery_bar_length='auto'
|
tmux_conf_battery_bar_length="auto"
|
||||||
|
|
||||||
# battery bar palette, possible values are:
|
# battery bar palette, possible values are:
|
||||||
# - gradient (default)
|
# - gradient (default)
|
||||||
# - heat
|
# - heat
|
||||||
# - 'colour_full_fg,colour_empty_fg,colour_bg'
|
# - "colour_full_fg,colour_empty_fg,colour_bg"
|
||||||
tmux_conf_battery_bar_palette='gradient'
|
tmux_conf_battery_bar_palette="gradient"
|
||||||
#tmux_conf_battery_bar_palette='#d70000,#e4e4e4,#000000' # red, white, black
|
#tmux_conf_battery_bar_palette="#d70000,#e4e4e4,#000000" # red, white, black
|
||||||
|
|
||||||
# battery hbar palette, possible values are:
|
# battery hbar palette, possible values are:
|
||||||
# - gradient (default)
|
# - gradient (default)
|
||||||
# - heat
|
# - heat
|
||||||
# - 'colour_low,colour_half,colour_full'
|
# - "colour_low,colour_half,colour_full"
|
||||||
tmux_conf_battery_hbar_palette='gradient'
|
tmux_conf_battery_hbar_palette="gradient"
|
||||||
#tmux_conf_battery_hbar_palette='#d70000,#ff5f00,#5fff00' # red, orange, green
|
#tmux_conf_battery_hbar_palette="#d70000,#ff5f00,#5fff00" # red, orange, green
|
||||||
|
|
||||||
# battery vbar palette, possible values are:
|
# battery vbar palette, possible values are:
|
||||||
# - gradient (default)
|
# - gradient (default)
|
||||||
# - heat
|
# - heat
|
||||||
# - 'colour_low,colour_half,colour_full'
|
# - "colour_low,colour_half,colour_full"
|
||||||
tmux_conf_battery_vbar_palette='gradient'
|
tmux_conf_battery_vbar_palette="gradient"
|
||||||
#tmux_conf_battery_vbar_palette='#d70000,#ff5f00,#5fff00' # red, orange, green
|
#tmux_conf_battery_vbar_palette="#d70000,#ff5f00,#5fff00" # red, orange, green
|
||||||
|
|
||||||
# symbols used to indicate whether battery is charging or discharging
|
# symbols used to indicate whether battery is charging or discharging
|
||||||
tmux_conf_battery_status_charging='↑' # U+2191
|
tmux_conf_battery_status_charging="↑" # U+2191
|
||||||
tmux_conf_battery_status_discharging='↓' # U+2193
|
tmux_conf_battery_status_discharging="↓" # U+2193
|
||||||
#tmux_conf_battery_status_charging='⚡ ' # U+26A1
|
#tmux_conf_battery_status_charging="🔌" # U+1F50C
|
||||||
#tmux_conf_battery_status_charging='🔌 ' # U+1F50C
|
#tmux_conf_battery_status_discharging="🔋" # U+1F50B
|
||||||
#tmux_conf_battery_status_discharging='🔋 ' # U+1F50B
|
|
||||||
|
|
||||||
# clock style
|
# clock style (when you hit <prefix> + t)
|
||||||
tmux_conf_theme_clock_colour='#00afff' # light blue
|
# you may want to use %I:%M %p in place of %R in tmux_conf_theme_status_right
|
||||||
tmux_conf_theme_clock_style='24'
|
tmux_conf_theme_clock_colour="$tmux_conf_theme_colour_4"
|
||||||
|
tmux_conf_theme_clock_style="24"
|
||||||
|
|
||||||
|
|
||||||
# -- clipboard -----------------------------------------------------------------
|
# -- clipboard -----------------------------------------------------------------
|
||||||
@ -283,7 +364,7 @@ tmux_conf_copy_to_os_clipboard=false
|
|||||||
#set -g history-limit 10000
|
#set -g history-limit 10000
|
||||||
|
|
||||||
# start with mouse mode enabled
|
# start with mouse mode enabled
|
||||||
set -g mouse off
|
#set -g mouse on
|
||||||
|
|
||||||
# force Vi mode
|
# force Vi mode
|
||||||
# really you should export VISUAL or EDITOR environment variable, see manual
|
# really you should export VISUAL or EDITOR environment variable, see manual
|
||||||
@ -299,3 +380,59 @@ set -g mouse off
|
|||||||
|
|
||||||
# move status line to top
|
# move status line to top
|
||||||
#set -g status-position top
|
#set -g status-position top
|
||||||
|
|
||||||
|
# -- tpm -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
# while I don't use tpm myself, many people requested official support so here
|
||||||
|
# is a seamless integration that automatically installs plugins in parallel
|
||||||
|
|
||||||
|
# whenever a plugin introduces a variable to be used in 'status-left' or
|
||||||
|
# 'status-right', you can use it in 'tmux_conf_theme_status_left' and
|
||||||
|
# 'tmux_conf_theme_status_right' variables.
|
||||||
|
|
||||||
|
# by default, launching tmux will update tpm and all plugins
|
||||||
|
# - true (default)
|
||||||
|
# - false
|
||||||
|
tmux_conf_update_plugins_on_launch=true
|
||||||
|
|
||||||
|
# by default, reloading the configuration will update tpm and all plugins
|
||||||
|
# - true (default)
|
||||||
|
# - false
|
||||||
|
tmux_conf_update_plugins_on_reload=true
|
||||||
|
|
||||||
|
# /!\ do not add set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
# /!\ do not add run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
|
# to enable a plugin, use the 'set -g @plugin' syntax:
|
||||||
|
# visit https://github.com/tmux-plugins for available plugins
|
||||||
|
#set -g @plugin 'tmux-plugins/tmux-copycat'
|
||||||
|
#set -g @plugin 'tmux-plugins/tmux-cpu'
|
||||||
|
#set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
|
#set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
|
#set -g @continuum-restore 'on'
|
||||||
|
|
||||||
|
|
||||||
|
# -- custom variables ----------------------------------------------------------
|
||||||
|
|
||||||
|
# to define a custom #{foo} variable, define a POSIX shell function between the
|
||||||
|
# '# EOF' and the '# "$@"' lines. Please note that the opening brace { character
|
||||||
|
# must be on the same line as the function name otherwise the parse won't detect
|
||||||
|
# it.
|
||||||
|
#
|
||||||
|
# then, use #{foo} in e.g. the 'tmux_conf_theme_status_left' or the
|
||||||
|
# 'tmux_conf_theme_status_right' variables.
|
||||||
|
|
||||||
|
# # /!\ do not remove the following line
|
||||||
|
# EOF
|
||||||
|
#
|
||||||
|
# weather() {
|
||||||
|
# curl -m 1 wttr.in?format=3 2>/dev/null
|
||||||
|
# sleep 900 # sleep for 15 minutes, throttle network requests whatever the value of status-interval
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# online() {
|
||||||
|
# ping -c 1 1.1.1.1 >/dev/null 2>&1 && printf '✔' || printf '✘'
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# "$@"
|
||||||
|
# # /!\ do not remove the previous line
|
||||||
|
|||||||
109
.vim/colors/monokai.vim
Normal file
109
.vim/colors/monokai.vim
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
" Vim color file
|
||||||
|
" Converted from Textmate theme Monokai using Coloration v0.3.2 (http://github.com/sickill/coloration)
|
||||||
|
|
||||||
|
set background=dark
|
||||||
|
highlight clear
|
||||||
|
|
||||||
|
if exists("syntax_on")
|
||||||
|
syntax reset
|
||||||
|
endif
|
||||||
|
|
||||||
|
set t_Co=256
|
||||||
|
let g:colors_name = "monokai"
|
||||||
|
|
||||||
|
hi Cursor ctermfg=235 ctermbg=231 cterm=NONE guifg=#272822 guibg=#f8f8f0 gui=NONE
|
||||||
|
hi Visual ctermfg=NONE ctermbg=59 cterm=NONE guifg=NONE guibg=#49483e gui=NONE
|
||||||
|
hi CursorLine ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d37 gui=NONE
|
||||||
|
hi CursorColumn ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d37 gui=NONE
|
||||||
|
hi ColorColumn ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d37 gui=NONE
|
||||||
|
hi LineNr ctermfg=102 ctermbg=237 cterm=NONE guifg=#90908a guibg=#3c3d37 gui=NONE
|
||||||
|
hi VertSplit ctermfg=241 ctermbg=241 cterm=NONE guifg=#64645e guibg=#64645e gui=NONE
|
||||||
|
hi MatchParen ctermfg=197 ctermbg=NONE cterm=underline guifg=#f92672 guibg=NONE gui=underline
|
||||||
|
hi StatusLine ctermfg=231 ctermbg=241 cterm=bold guifg=#f8f8f2 guibg=#64645e gui=bold
|
||||||
|
hi StatusLineNC ctermfg=231 ctermbg=241 cterm=NONE guifg=#f8f8f2 guibg=#64645e gui=NONE
|
||||||
|
hi Pmenu ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi PmenuSel ctermfg=NONE ctermbg=59 cterm=NONE guifg=NONE guibg=#49483e gui=NONE
|
||||||
|
hi IncSearch term=reverse cterm=reverse ctermfg=193 ctermbg=16 gui=reverse guifg=#C4BE89 guibg=#000000
|
||||||
|
hi Search term=reverse cterm=NONE ctermfg=231 ctermbg=24 gui=NONE guifg=#f8f8f2 guibg=#204a87
|
||||||
|
hi Directory ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE
|
||||||
|
hi Folded ctermfg=242 ctermbg=235 cterm=NONE guifg=#75715e guibg=#272822 gui=NONE
|
||||||
|
hi SignColumn ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d37 gui=NONE
|
||||||
|
hi Normal ctermfg=231 ctermbg=235 cterm=NONE guifg=#f8f8f2 guibg=#272822 gui=NONE
|
||||||
|
hi Boolean ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE
|
||||||
|
hi Character ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE
|
||||||
|
hi Comment ctermfg=242 ctermbg=NONE cterm=NONE guifg=#75715e guibg=NONE gui=NONE
|
||||||
|
hi Conditional ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi Constant ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi Define ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi DiffAdd ctermfg=231 ctermbg=64 cterm=bold guifg=#f8f8f2 guibg=#46830c gui=bold
|
||||||
|
hi DiffDelete ctermfg=88 ctermbg=NONE cterm=NONE guifg=#8b0807 guibg=NONE gui=NONE
|
||||||
|
hi DiffChange ctermfg=NONE ctermbg=NONE cterm=NONE guifg=#f8f8f2 guibg=#243955 gui=NONE
|
||||||
|
hi DiffText ctermfg=231 ctermbg=24 cterm=bold guifg=#f8f8f2 guibg=#204a87 gui=bold
|
||||||
|
hi ErrorMsg ctermfg=231 ctermbg=197 cterm=NONE guifg=#f8f8f0 guibg=#f92672 gui=NONE
|
||||||
|
hi WarningMsg ctermfg=231 ctermbg=197 cterm=NONE guifg=#f8f8f0 guibg=#f92672 gui=NONE
|
||||||
|
hi Float ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE
|
||||||
|
hi Function ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE
|
||||||
|
hi Identifier ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic
|
||||||
|
hi Keyword ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi Label ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE
|
||||||
|
hi NonText ctermfg=59 ctermbg=236 cterm=NONE guifg=#49483e guibg=#31322c gui=NONE
|
||||||
|
hi Number ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE
|
||||||
|
hi Operator ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi PreProc ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi Special ctermfg=231 ctermbg=NONE cterm=NONE guifg=#f8f8f2 guibg=NONE gui=NONE
|
||||||
|
hi SpecialComment ctermfg=242 ctermbg=NONE cterm=NONE guifg=#75715e guibg=NONE gui=NONE
|
||||||
|
hi SpecialKey ctermfg=59 ctermbg=237 cterm=NONE guifg=#49483e guibg=#3c3d37 gui=NONE
|
||||||
|
hi Statement ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi StorageClass ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic
|
||||||
|
hi String ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE
|
||||||
|
hi Tag ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi Title ctermfg=231 ctermbg=NONE cterm=bold guifg=#f8f8f2 guibg=NONE gui=bold
|
||||||
|
hi Todo ctermfg=95 ctermbg=NONE cterm=inverse,bold guifg=#75715e guibg=NONE gui=inverse,bold
|
||||||
|
hi Type ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline
|
||||||
|
hi rubyClass ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi rubyFunction ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE
|
||||||
|
hi rubyInterpolationDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi rubySymbol ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE
|
||||||
|
hi rubyConstant ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic
|
||||||
|
hi rubyStringDelimiter ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE
|
||||||
|
hi rubyBlockParameter ctermfg=208 ctermbg=NONE cterm=NONE guifg=#fd971f guibg=NONE gui=italic
|
||||||
|
hi rubyInstanceVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi rubyInclude ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi rubyGlobalVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi rubyRegexp ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE
|
||||||
|
hi rubyRegexpDelimiter ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE
|
||||||
|
hi rubyEscape ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE
|
||||||
|
hi rubyControl ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi rubyClassVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi rubyOperator ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi rubyException ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi rubyPseudoVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi rubyRailsUserClass ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic
|
||||||
|
hi rubyRailsARAssociationMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE
|
||||||
|
hi rubyRailsARMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE
|
||||||
|
hi rubyRailsRenderMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE
|
||||||
|
hi rubyRailsMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE
|
||||||
|
hi erubyDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi erubyComment ctermfg=95 ctermbg=NONE cterm=NONE guifg=#75715e guibg=NONE gui=NONE
|
||||||
|
hi erubyRailsMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE
|
||||||
|
hi htmlTag ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE
|
||||||
|
hi htmlEndTag ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE
|
||||||
|
hi htmlTagName ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi htmlArg ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi htmlSpecialChar ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE
|
||||||
|
hi javaScriptFunction ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic
|
||||||
|
hi javaScriptRailsFunction ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE
|
||||||
|
hi javaScriptBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi yamlKey ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE
|
||||||
|
hi yamlAnchor ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi yamlAlias ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi yamlDocumentHeader ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE
|
||||||
|
hi cssURL ctermfg=208 ctermbg=NONE cterm=NONE guifg=#fd971f guibg=NONE gui=italic
|
||||||
|
hi cssFunctionName ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE
|
||||||
|
hi cssColor ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE
|
||||||
|
hi cssPseudoClassId ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE
|
||||||
|
hi cssClassName ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE
|
||||||
|
hi cssValueLength ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE
|
||||||
|
hi cssCommonAttr ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE
|
||||||
|
hi cssBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
########## Variables
|
########## Variables
|
||||||
|
|
||||||
dir=~/dotfiles # dotfiles directory
|
dir=~/.dotfiles # dotfiles directory
|
||||||
olddir=~/dotfiles_old # old dotfiles backup directory
|
olddir=~/.dotfiles_old # old dotfiles backup directory
|
||||||
files=".tmux.conf .tmux.conf.local .vimrc .vim .tcshrc .inputrc" # list of files/folders to symlink in homedir
|
files=".tmux.conf .tmux.conf.local .vimrc .vim .tcshrc .bashrc .inputrc .git_completion .ansible.cfg" # list of files/folders to symlink in homedir
|
||||||
|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
@ -25,7 +25,18 @@ echo "...done"
|
|||||||
# move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks
|
# move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks
|
||||||
for file in $files; do
|
for file in $files; do
|
||||||
echo "Moving any existing dotfiles from ~ to $olddir"
|
echo "Moving any existing dotfiles from ~ to $olddir"
|
||||||
mv ~/$file ~/dotfiles_old/ > /dev/null 2>&1
|
mv ~/$file ~/.dotfiles_old/ > /dev/null 2>&1
|
||||||
echo "Creating symlink to $file in home directory."
|
echo "Creating symlink to $file in home directory."
|
||||||
ln -s $dir/$file ~/$file > /dev/null 2>&1
|
ln -s $dir/$file ~/$file > /dev/null 2>&1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# link Starship config to ~/.config/ if exists
|
||||||
|
if [ -d ~/.config ]; then
|
||||||
|
ln -s $dir/starship.toml ~/.config/starship.toml
|
||||||
|
fi
|
||||||
|
|
||||||
|
# copy example bashrc.local if one doesn't exist yet
|
||||||
|
if [ ! -f ~/.bashrc.local ]; then
|
||||||
|
cp $file/.bashrc.local ~/.bashrc.local
|
||||||
|
fi
|
||||||
|
|
||||||
|
|||||||
94
starship.toml
Normal file
94
starship.toml
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
command_timeout = 500
|
||||||
|
format = "$username$hostname: $directory$git_branch$python$aws$time$cmd_duration$character"
|
||||||
|
[line_break]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = "[➜](bold green) "
|
||||||
|
error_symbol = "[✗](bold red) "
|
||||||
|
|
||||||
|
[cmd_duration]
|
||||||
|
min_time = 500
|
||||||
|
format = "took [$duration](bold yellow) "
|
||||||
|
|
||||||
|
[env_var.SHELL]
|
||||||
|
variable = "SHELL"
|
||||||
|
default = "unknown shell"
|
||||||
|
|
||||||
|
[env_var.USER]
|
||||||
|
default = "unknown user"
|
||||||
|
|
||||||
|
[username]
|
||||||
|
style_user = "blue bold"
|
||||||
|
style_root = "red bold"
|
||||||
|
format = "[$user]($style)"
|
||||||
|
disabled = false
|
||||||
|
show_always = true
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
ssh_only = false
|
||||||
|
format = "[$ssh_symbol](bold blue) on [$hostname](bold yellow) "
|
||||||
|
trim_at = ".strog.org"
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
read_only = " "
|
||||||
|
truncation_length = 8
|
||||||
|
truncation_symbol = "…/"
|
||||||
|
use_os_path_sep = true
|
||||||
|
|
||||||
|
[shell]
|
||||||
|
fish_indicator = ""
|
||||||
|
powershell_indicator = "_"
|
||||||
|
unknown_indicator = "mystery shell"
|
||||||
|
style = "cyan bold"
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[status]
|
||||||
|
style = "bg:blue"
|
||||||
|
symbol = "🔴 "
|
||||||
|
success_symbol = "🟢 SUCCESS"
|
||||||
|
format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) '
|
||||||
|
map_symbol = true
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[aws]
|
||||||
|
disabled = true
|
||||||
|
format = ' AWS:[$symbol($profile )(\($region\))]($style)'
|
||||||
|
style = "bold blue"
|
||||||
|
#symbol = "\xe2\x98\x81\xef\xb8\x8f"
|
||||||
|
[aws.region_aliases]
|
||||||
|
us-west-1 = "us-west-1"
|
||||||
|
us-east-1 = "va"
|
||||||
|
|
||||||
|
[container]
|
||||||
|
format = "[$symbol \\[$name\\]]($style) "
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
symbol = " "
|
||||||
|
style = "bold #e8ec00 inverted"
|
||||||
|
format = "on [$symbol$branch ]($style) "
|
||||||
|
|
||||||
|
[git_commit]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[git_state]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[kubernetes]
|
||||||
|
format = 'on [☸ $context \($namespace\)](dimmed green) '
|
||||||
|
disabled = false
|
||||||
|
#[kubernetes.context_aliases]
|
||||||
|
#"dev.local.cluster.k8s" = "dev"
|
||||||
|
|
||||||
|
[package]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
[python]
|
||||||
|
format = '[${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'
|
||||||
|
symbol = "🐍 "
|
||||||
|
pyenv_version_name = true
|
||||||
|
|
||||||
Reference in New Issue
Block a user