-# vi mode in the shell
-set -o vi
-# autocomplete for sudo man and wich
-complete -cf sudo man wich;
-# transform md anotations into PDF
-mdpdf () { pandoc "$1".md -t beamer -o "$1".pdf ;}
-#byebye for shutdown
-alias byebye='shutdown now'
-# Get all metadata
-metadata () { echo "Salida del comando stat" ; stat "$1" ; echo "Salida del comando ls -lisan" ; ls -lisan "$1" ; echo "salida del comando exiftool" ; exiftool "$1" ;}
-# use highlight for colored cat
-alias ccat='highlight --out-format=ansi'
-# activates the autocd mode
-shopt -s autocd
-# wifi available
-alias wifi='nmcli d wifi';
-edit () { du -a -L "$1" | awk '{print $2}' | fzf | xargs -r "$VISUAL" ;}
-# personalized ps1 #################################################################################
-# .bashrc (or .bash_profile)
-
-# declares an array with the emojis we want to support
-EMOJIS=(👻 💀 👽 👾 🎃 😎 🧠 🦘 🦍 🎻)
-
-# selects a random element from the EMOJIS set
-SELECTED_EMOJI=${EMOJIS[$RANDOM % ${#EMOJIS[@]}]};
-# declare the terminal prompt format
-#export PS1='${SELECTED_EMOJI} [\u@\h \W]$ '
-#export PS1="\e[1;90m[\$?]\e[m\e[1;92m\[$(tput bold)\]\u@\h\e[m\[$(tput sgr0)\]:\e[0;36m\w\e[m\n\\$";
-export PS1="\e[1;90m[\$?]\e[m\e[1;92m\[$(tput bold)\]\u@\h\e[m\[$(tput sgr0)\]:\e[0;36m\w\e[m\n${SELECTED_EMOJI}";
-
-
-####################################################################################################
-
-cat ~/.cache/wal/sequences & #This imports the theme from the last pywal
-
-
-#export PS1="\[\033[38;5;247m\][\$?]\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;40m\]\u@\h\[$(tput sgr0)\]:\[$(tput sgr0)\]\[\033[38;5;45m\]\w\[$(tput sgr0)\]\n\\$\[$(tput sgr0)\]"
-
-alias autowal='wal --iterative -i /usr/share/backgrounds/ > /dev/null'
-#figlet de mi nombre
-whoami | figlet Josuer08 | lolcat -F 0.25;
-#whoami | figlet Josuer08 | lolcat;
-
-function cdls() {
- DIR="$*";
- # if no DIR given, go home
- if [ $# -lt 1 ]; then
- DIR=$HOME;
- fi;
- builtin cd "${DIR}" && \
- # use your preferred ls command
- ls -F --color=auto
-}
-
-
-#vicat is a color and line number cat
-
-function vicat() {
- ccat $@ | nl;
-
-}
-
-
-
-#colorman
-if $_isxrunning; then
- export PAGER=less
- export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
- export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold
- export LESS_TERMCAP_me=$'\E[0m' # end mode
- export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
- export LESS_TERMCAP_so=$'\E[38;5;246m' # begin standout-mode - info box
- export LESS_TERMCAP_ue=$'\E[0m' # end underline
- export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
-fi
-#top10 commands
-top10() { history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}' | sort -rn | head; }
-# goes up by the number of directories
-up() {
- local d=""
- limit=$1
- for ((i=1 ; i <= limit ; i++)); do
- d=$d/..
- done
- d=$(echo $d | sed 's/^\///')
- if [[ -z "$d" ]]; then
- d=..
- fi
- cd $d
-}
-# ARCHIVE EXTRACTOR {{{
-extract() {
- clrstart="\033[1;34m" #color codes
- clrend="\033[0m"