mirror of
https://github.com/GeorgeSG/dotfiles.git
synced 2026-11-03 10:38:44 +00:00
Rearrange files in .config folder, update makefile
This commit is contained in:
-110
@@ -1,110 +0,0 @@
|
||||
##### Platform independent #####
|
||||
|
||||
# Files
|
||||
alias ...="cd ../../"
|
||||
alias ....="cd ../../../"
|
||||
|
||||
alias df1="du -h -d 1"
|
||||
|
||||
# alias ls='ls -hG'
|
||||
alias ll='ls -alhFG'
|
||||
alias la='ls -AG'
|
||||
alias l='ls -CFG'
|
||||
|
||||
# if test $(which zoxide); then
|
||||
# alias cd="z"
|
||||
# fi;
|
||||
|
||||
# eza aliases, if available
|
||||
if test $(which eza); then
|
||||
eza_params=(
|
||||
'--git' '--icons' '--group' '--group-directories-first'
|
||||
'--time-style=relative'
|
||||
)
|
||||
alias ls='eza $eza_params -1'
|
||||
alias l='eza --git-ignore $eza_params'
|
||||
alias ll='eza --all --header --long $eza_params'
|
||||
alias llm='eza --all --header --long --sort=modified $eza_params'
|
||||
alias la='eza -lbhHigUmuSa'
|
||||
alias lx='eza -lbhHigUmuSa@'
|
||||
alias lt='eza --tree $eza_params'
|
||||
alias tree='eza --tree $eza_params'
|
||||
|
||||
alias lA='ll --sort=acc'
|
||||
alias lC='ll --sort=cr'
|
||||
alias lM='ll --sort=mod'
|
||||
alias lS='ll --sort=size'
|
||||
alias lX='ll --sort=ext'
|
||||
fi
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
|
||||
# CD-ing to some commonly used folders
|
||||
alias og="cd ~/Git"
|
||||
alias dotfiles="cd ~/Git/dotfiles"
|
||||
|
||||
# Git Aliases
|
||||
alias g="git"
|
||||
alias ga="git add"
|
||||
alias gr="git rm"
|
||||
alias gc="git commit"
|
||||
alias gs="git status -s"
|
||||
alias gss="git status"
|
||||
alias gd="git diff"
|
||||
alias gds="git diff --staged"
|
||||
alias gco="git checkout"
|
||||
alias gcom="git checkout master"
|
||||
alias gpom="git pull origin master"
|
||||
alias gbd="git branch -D"
|
||||
alias gm="git mergetool"
|
||||
alias gmc="git merge --continue"
|
||||
alias grc="git rebase --continue"
|
||||
alias gsf="git sf"
|
||||
alias gaf="git af"
|
||||
alias gmf="git mf"
|
||||
|
||||
# tmux
|
||||
alias tm="tmux -2 attach-session -t "default" || tmux -2 new-session -s \"default\""
|
||||
alias tmv="tmux -2 attach-session -t "vscode" || tmux -2 new-session -s \"vscode\""
|
||||
alias tmks="tmux kill-session -t"
|
||||
alias tmas="tmux attach-session -t"
|
||||
alias tmls="tmux list-sessions"
|
||||
|
||||
# Docker
|
||||
alias dc="docker compose"
|
||||
alias de="docker exec"
|
||||
alias dr="docker run"
|
||||
alias db="docker build"
|
||||
alias ds="docker stop"
|
||||
alias drm="docker rm"
|
||||
alias drmi="docker rmi"
|
||||
alias dps="docker ps"
|
||||
alias dl="docker logs"
|
||||
|
||||
# Editing files
|
||||
alias aliases="code ~/.aliases"
|
||||
alias laliases="code ~/.aliases.local"
|
||||
alias zshrc="code $ZDOTDIR/.zshrc"
|
||||
alias lzshrc="code $ZDOTDIR/.zshrc.local"
|
||||
alias vimrc="vim ~/.vimrc"
|
||||
|
||||
# NPM
|
||||
alias npr="npm run"
|
||||
|
||||
# IP addresses & networking
|
||||
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
|
||||
alias localip="ipconfig getifaddr en0"
|
||||
alias reloaddns="dscacheutil -flushcache && sudo killall -HUP mDNSResponder"
|
||||
|
||||
# Misc
|
||||
|
||||
alias c="clear"
|
||||
alias be="bundle exec"
|
||||
alias serve="python -m http.server 9000"
|
||||
alias yda="youtube-dl -x --audio-format mp3"
|
||||
alias copyssh="pbcopy < $HOME/.ssh/id_ed25519.pub"
|
||||
|
||||
##### Mac OS Specific #####
|
||||
alias fl="open -a ForkLift"
|
||||
@@ -1,96 +0,0 @@
|
||||
# Set prompt
|
||||
IFS='.' read -ra split_hostname <<<$(hostname | tr '[:upper:]' '[:lower:]')
|
||||
HOSTNAME=${split_hostname[0]}
|
||||
PS1='\[\e[1;4;36m\]$HOSTNAME\[\e[1;0m\] \[\e[1;32m\]\w\[\e[m\]\[\e[1;0m\] \[\e[0m\] \[\e[1;0m\]'
|
||||
export TERM=xterm-256color
|
||||
|
||||
shopt -s cdspell
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# Enable some Bash 4 features when possible:
|
||||
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
|
||||
# * Recursive globbing, e.g. `echo **/*.txt`
|
||||
for option in autocd globstar; do
|
||||
shopt -s "$option" 2> /dev/null;
|
||||
done;
|
||||
|
||||
# Disable Caret-C output
|
||||
stty -ctlecho
|
||||
|
||||
set -o vi
|
||||
bind -m vi-insert "\C-l":clear-screen
|
||||
|
||||
#so as not to be disturbed by Ctrl-S ctrl-Q in terminals:
|
||||
stty -ixon
|
||||
|
||||
######################
|
||||
# History Management #
|
||||
######################
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=5000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
######################
|
||||
# Aliases #
|
||||
######################
|
||||
|
||||
# enable color support of ls
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
fi
|
||||
|
||||
# Editor
|
||||
export EDITOR='code -w'
|
||||
|
||||
# bash-git-prompt
|
||||
GIT_PROMPT_ONLY_IN_REPO=1
|
||||
GIT_PROMPT_START="\[\e[1;4;36m\]$HOSTNAME\[\e[1;0m\] \[\e[1;32m\]\w\[\e[m\]"
|
||||
GIT_PROMPT_END="\[\e[1;m\] \[\e[1;m\]"
|
||||
|
||||
|
||||
# Disable deprecation warning on mac
|
||||
export BASH_SILENCE_DEPRECATION_WARNING=1
|
||||
|
||||
######################
|
||||
# Sources & exports #
|
||||
######################
|
||||
|
||||
if [ -f ~/.aliases ]; then
|
||||
source ~/.aliases
|
||||
fi
|
||||
|
||||
if [ -f ~/.aliases.local ]; then
|
||||
. ~/.aliases.local
|
||||
fi
|
||||
|
||||
|
||||
if [ -f ~/.bash_profile.local ]; then
|
||||
source ~/.bash_profile.local
|
||||
fi
|
||||
|
||||
# bash-git prompt
|
||||
if [ -f ~/.bash-git-prompt/gitprompt.sh ]; then
|
||||
source ~/.bash-git-prompt/gitprompt.sh
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
source /etc/bash_completion
|
||||
fi
|
||||
|
||||
# Git completion
|
||||
if [ -f ~/.git-completion.bash ]; then
|
||||
source ~/.git-completion.bash
|
||||
fi
|
||||
@@ -1,3 +0,0 @@
|
||||
[ -n "$PS1" ] && source ~/.bash_profile;
|
||||
|
||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||
@@ -1,28 +0,0 @@
|
||||
GIT_PROMPT_EXECUTABLE="shell"
|
||||
source $ZDOTDIR/plugins/zsh-git-prompt/zshrc.sh
|
||||
|
||||
function git_email_prompt() {
|
||||
GIT_USER=$(git config user.email)
|
||||
echo $GIT_USER
|
||||
}
|
||||
|
||||
PROMPT='%B%U%F{cyan}% %m%u%F{green} %~$(git_super_status)%f %{%G%}%b '
|
||||
RPROMPT='%B%F{42}% $(git_email_prompt)%f %F{cyan}%*%b'
|
||||
|
||||
# No right padding on RPROMPT
|
||||
ZLE_RPROMPT_INDENT=0
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %B%F{cyan}% ("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%B%F{cyan}% )"
|
||||
ZSH_THEME_GIT_PROMPT_SEPARATOR="%B%F{cyan}% |"
|
||||
ZSH_THEME_GIT_PROMPT_BRANCH=""
|
||||
ZSH_THEME_GIT_PROMPT_STAGED="%F{green}% %{●%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_CONFLICTS="%B%F{red}% %{✖%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_CHANGED="%B%F{red}% %{✚%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_STASHED="%B%F{251}% %{⚑%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_BEHIND="%B%F{magenta}% %{↓%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD="%B%F{yellow}% %{↑%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%B%F{42}% %{…%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%B%F{cyan}% %{✔%G%}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_LOCAL=" %B%F{42}% L"
|
||||
@@ -1 +0,0 @@
|
||||
ZDOTDIR=$HOME/.zsh
|
||||
@@ -1,80 +0,0 @@
|
||||
ZDOTDIR=~/.zsh
|
||||
|
||||
setopt auto_cd
|
||||
setopt no_case_glob
|
||||
setopt glob_complete
|
||||
|
||||
setopt correct
|
||||
setopt correct_all
|
||||
|
||||
setopt completeinword # not just at the end
|
||||
|
||||
|
||||
# --------
|
||||
# History
|
||||
# --------
|
||||
|
||||
HISTFILE=${ZDOTDIR:-~}/.zsh_history
|
||||
SAVEHIST=50000
|
||||
HISTSIZE=10000
|
||||
HISTORY_IGNORE="(ls|cd|pwd|zsh|exit|cd ..)"
|
||||
|
||||
setopt extended_history # record start time and elapsed time in history file
|
||||
setopt share_history # share history across multiple zsh sessions
|
||||
setopt append_history # append to history
|
||||
setopt inc_append_history # adds commands as they are typed, not at shell exit
|
||||
setopt hist_ignore_dups # do not store duplications
|
||||
setopt hist_reduce_blanks # removes blank lines from history
|
||||
setopt hist_verify # show !! before executing
|
||||
setopt hist_ignore_space # remove command lines beginning with a space from history
|
||||
|
||||
setopt no_beep # Don't beep on command input error
|
||||
|
||||
# --------
|
||||
# Source & include
|
||||
# --------
|
||||
|
||||
# Include functions
|
||||
fpath+=~/Git/dotfiles/functions
|
||||
autoload extract
|
||||
|
||||
|
||||
[ -f $ZDOTDIR/.zshrc.local ] && source $ZDOTDIR/.zshrc.local
|
||||
[ -f ~/.aliases ] && source ~/.aliases
|
||||
[ -f ~/.aliases.local ] && source ~/.aliases.local
|
||||
|
||||
|
||||
# --------
|
||||
# Plugins
|
||||
# --------
|
||||
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
|
||||
source "$ZDOTDIR/plugins/zsh-vim-mode/zsh-vim-mode.plugin.zsh"
|
||||
|
||||
# https://github.com/arzzen/calc.plugin.zsh
|
||||
source "$ZDOTDIR/plugins/calc.plugin.zsh/calc.plugin.zsh"
|
||||
|
||||
# https://github.com/lukechilds/zsh-better-npm-completion
|
||||
source "$ZDOTDIR/plugins/.zsh-better-npm-completion/zsh-better-npm-completion.plugin.zsh"
|
||||
|
||||
# https://github.com/sunlei/zsh-ssh
|
||||
source "$ZDOTDIR/plugins/zsh-ssh/zsh-ssh.zsh"
|
||||
|
||||
# https://github.com/Tarrasch/zsh-bd
|
||||
source "$ZDOTDIR/plugins/bd/bd.zsh"
|
||||
|
||||
|
||||
# --------
|
||||
# Comp init
|
||||
# --------
|
||||
|
||||
autoload -Uz compinit && compinit -i
|
||||
|
||||
# Load bashcompinit for some old bash completions
|
||||
autoload bashcompinit && bashcompinit
|
||||
|
||||
|
||||
# Prompt
|
||||
source $ZDOTDIR/.zprompt
|
||||
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
Reference in New Issue
Block a user