dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README

commit fd32bd649002ca266d09857d01623d656a114389
parent 21682226d7e5ddfe615c7300c12ef814187273b4
Author: Pablo Cárdenas <pablo.cardenas@imca.edu.pe>
Date:   Tue, 10 May 2022 13:18:22 -0500

Moved bash files to linux

I'll never use a Mac. So all my configurations will be for linux.

Diffstat:
Dhome/.bashrc | 49-------------------------------------------------
Rhome/.bash_profile -> linux/.bash_profile | 0
Alinux/.bashrc | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 62 insertions(+), 49 deletions(-)

diff --git a/home/.bashrc b/home/.bashrc @@ -1,49 +0,0 @@ -# If not running interactively, don't do anything -[[ $- != *i* ]] && return - -shopt -s checkwinsize histappend histreedit - -HISTCONTROL=ignoreboth -HISTSIZE=100000 -HISTFILESIZE=200000 -HISTTIMEFORMAT="%d/%m/%y %T " - -# Bash completions -if ! shopt -oq posix; then - [ -f /etc/bash_completion ] && source /etc/bash_completion - [ -f /usr/local/etc/bash_completion ] && source /usr/local/etc/bash_completion -fi - -LANG=en_US.UTF-8 -LC_ALL=en_US.UTF-8 - - - -# Para clases -#PS1='\[\033[01;31m\]\W $\[\033[00m\] ' - -LESS=-R -LESS_TERMCAP_mb=$'\E[1;31m' # begin blink -LESS_TERMCAP_md=$'\E[1;36m' # begin bold -LESS_TERMCAP_me=$'\E[0m' # reset bold/blink -LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video -LESS_TERMCAP_se=$'\E[0m' # reset reverse video -LESS_TERMCAP_us=$'\E[1;32m' # begin underline -LESS_TERMCAP_ue=$'\E[0m' # reset underline - -mkdir -p "$XDG_STATE_HOME"/bash -HISTFILE="$XDG_STATE_HOME"/bash/history - -source $XDG_CONFIG_HOME/shell/aliases.bash - -[ -f /usr/share/git/completion/git-prompt.sh ] && source /usr/share/git/completion/git-prompt.sh -#export GIT_PS1_SHOWCOLORHINTS=1 -#export GIT_PS1_SHOWDIRTYSTATE=1 -PS1='[\u@\h \W] $(__git_ps1) \$ ' - -echo '$HOME' `ls $HOME -A | wc -l` -ls $HOME -echo -echo '$XDG_CONFIG_HOME' `ls $XDG_CONFIG_HOME -A | wc -l` -ls $XDG_CONFIG_HOME -echo diff --git a/home/.bash_profile b/linux/.bash_profile diff --git a/linux/.bashrc b/linux/.bashrc @@ -0,0 +1,62 @@ +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +shopt -s checkwinsize histappend histreedit + +HISTCONTROL=ignoreboth +HISTSIZE=100000 +HISTFILESIZE=200000 +HISTTIMEFORMAT="%d/%m/%y %T " + +# Bash completions +if ! shopt -oq posix; then + [ -f /etc/bash_completion ] && source /etc/bash_completion + [ -f /usr/local/etc/bash_completion ] && source /usr/local/etc/bash_completion +fi + +LANG=en_US.UTF-8 +LC_ALL=en_US.UTF-8 + +LESS=-R +LESS_TERMCAP_mb=$'\E[1;31m' # begin blink +LESS_TERMCAP_md=$'\E[1;36m' # begin bold +LESS_TERMCAP_me=$'\E[0m' # reset bold/blink +LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video +LESS_TERMCAP_se=$'\E[0m' # reset reverse video +LESS_TERMCAP_us=$'\E[1;32m' # begin underline +LESS_TERMCAP_ue=$'\E[0m' # reset underline + +mkdir -p "$XDG_STATE_HOME"/bash +HISTFILE="$XDG_STATE_HOME"/bash/history + +source $XDG_CONFIG_HOME/shell/aliases.bash + +[ -f /usr/share/git/completion/git-prompt.sh ] && source /usr/share/git/completion/git-prompt.sh +#export GIT_PS1_SHOWCOLORHINTS=1 +#export GIT_PS1_SHOWDIRTYSTATE=1 +PS1='[\u@\h \W] $(__git_ps1) \$ ' + +countdown() { + start="$(( $(date '+%s') + $1))" + while [ $start -ge $(date +%s) ]; do + time="$(( $start - $(date +%s) ))" + printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)" + sleep 0.1 + done +} + +stopwatch() { + start=$(date +%s) + while true; do + time="$(( $(date +%s) - $start))" + printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)" + sleep 0.1 + done +} + +echo '$HOME' `ls $HOME -A | wc -l` +ls $HOME +echo +echo '$XDG_CONFIG_HOME' `ls $XDG_CONFIG_HOME -A | wc -l` +ls $XDG_CONFIG_HOME +echo