From 13bee261064f7b7045b3a1cd8f61da72f55c814a Mon Sep 17 00:00:00 2001 From: Pratik Tripathy Date: Sun, 18 Oct 2020 02:28:30 +0530 Subject: [PATCH] gitconfig added --- .aliases | 8 ++----- .bashrc | 19 ++++------------ .gitconfig | 3 +++ .profile | 29 +++++++++++++++++++++++ .zshrc | 67 ++++++------------------------------------------------ 5 files changed, 46 insertions(+), 80 deletions(-) create mode 100644 .gitconfig create mode 100644 .profile diff --git a/.aliases b/.aliases index b21b1eb..3548662 100644 --- a/.aliases +++ b/.aliases @@ -1,7 +1,5 @@ #!/usr/bin/env bash -# Custom aliases - # Generic alias sb="source ~/.bashrc" alias bashreload="source ~/.bashrc" @@ -17,6 +15,7 @@ alias fgrep='fgrep --color=auto' alias usersearch="awk -F: '{print \"UserName: \" \$1 \", UserID: \" \$3 \", Home Dir: \" \$6 \", Shell Used: \" \$7}' /etc/passwd | grep" # alias code="codium" + # History alias histsearch="history | grep" alias hs="histsearch" @@ -88,9 +87,6 @@ git_push_all_changes(){ git add . && git commit -am "${1}" && git push } -# Add ~/.local/bin to PATH -export PATH="${HOME}"/.local/bin:$PATH - # For servers alias ngt="sudo nginx -t" @@ -182,4 +178,4 @@ f2b_ban_an_ip(){ fi sudo fail2ban-client set "${ban_jail}" banip "${ip_to_ban}" > /dev/null && echo "Ban successful" -} +} \ No newline at end of file diff --git a/.bashrc b/.bashrc index cfe1086..92cfb57 100644 --- a/.bashrc +++ b/.bashrc @@ -184,18 +184,9 @@ jazz_my_prompt() { PS1="\n${group1}-${group2}-${group3}-${group4}-${group5}\n${group6}-${group9}-${group8}\n${isroot}${reset} " } -if [[ -f ~/.aliases ]]; then - source ~/.aliases -fi +[[ ! -f ~/.aliases ]] || source ~/.aliases +[[ ! -f ~/.aliases_personal ]] || source ~/.aliases_personal +[[ ! -f ~/.neon_alias ]] || source ~/.neon_alias -if [[ -f ~/.aliases_personal ]]; then - source ~/.aliases_personal -fi - -if [[ -f ~/.gosetup ]]; then - source ~/.gosetup -fi - -if [[ -f ~/.neon_alias ]]; then - source ~/.neon_alias -fi +[[ ! -f ~/.gosetup ]] || source ~/.gosetup +[[ ! -f ~/.flutterpathsetup ]] || source ~/.flutterpathsetup diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..a63f6a1 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,3 @@ +[user] + email = mail@pratik.live + name = Pratik Tripathy diff --git a/.profile b/.profile new file mode 100644 index 0000000..2124798 --- /dev/null +++ b/.profile @@ -0,0 +1,29 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/.local/bin" ] ; then + PATH="$HOME/.local/bin:$PATH" +fi + +export PATH="$HOME/.cargo/bin:/media/pratik/Personal_Projects/DevSetUps/IDEs/flutter/bin:$PATH" diff --git a/.zshrc b/.zshrc index 5c33dc9..ec15763 100644 --- a/.zshrc +++ b/.zshrc @@ -26,24 +26,12 @@ CASE_SENSITIVE="true" # Case-sensitive completion must be off. _ and - will be interchangeable. # HYPHEN_INSENSITIVE="true" -# Uncomment the following line to disable bi-weekly auto-update checks. -# DISABLE_AUTO_UPDATE="true" - # Uncomment the following line to automatically update without prompting. # DISABLE_UPDATE_PROMPT="true" -# Uncomment the following line to change how often to auto-update (in days). -# export UPDATE_ZSH_DAYS=13 - # Uncomment the following line if pasting URLs and other text is messed up. # DISABLE_MAGIC_FUNCTIONS="true" -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - # Uncomment the following line to enable command auto-correction. # ENABLE_CORRECTION="true" @@ -55,22 +43,12 @@ COMPLETION_WAITING_DOTS="true" # much, much faster. # DISABLE_UNTRACKED_FILES_DIRTY="true" -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, # see 'man strftime' for details. HIST_STAMPS="dd.mm.yyyy" -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? # Standard plugins can be found in $ZSH/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh plugins=( git @@ -86,30 +64,6 @@ source $ZSH/oh-my-zsh.sh # User configuration -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" - ##############Pratik POWERLEVEL9K Configs#################################### POWERLEVEL9K_SHORTEN_DIR_LENGTH=4 @@ -136,21 +90,14 @@ setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording e setopt HIST_VERIFY # Don't execute immediately upon history expansion. setopt HIST_IGNORE_SPACE # Don't add commands that start with whitespace to history -if [[ -f ~/.aliases ]]; then - source ~/.aliases -fi +##############Bring all the alias and setup scripts################################ -if [[ -f ~/.aliases_personal ]]; then - source ~/.aliases_personal -fi +[[ ! -f ~/.aliases ]] || source ~/.aliases +[[ ! -f ~/.aliases_personal ]] || source ~/.aliases_personal +[[ ! -f ~/.neon_alias ]] || source ~/.neon_alias -if [[ -f ~/.gosetup ]]; then - source ~/.gosetup -fi - -if [[ -f ~/.neon_alias ]]; then - source ~/.neon_alias -fi +[[ ! -f ~/.gosetup ]] || source ~/.gosetup +[[ ! -f ~/.flutterpathsetup ]] || source ~/.flutterpathsetup # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh \ No newline at end of file