Created
April 21, 2021 05:44
-
-
Save eromatiya/f64a45f06928100a951f139656bcc048 to your computer and use it in GitHub Desktop.
Termux .bashrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ░█▀█░█▀▀░█▀█░█▀▀░█▀▀░▀█▀░█▀▀░█░█ | |
# ░█░█░█▀▀░█░█░█▀▀░█▀▀░░█░░█░░░█▀█ | |
# ░▀░▀░▀▀▀░▀▀▀░▀░░░▀▀▀░░▀░░▀▀▀░▀░▀ | |
if [[ ! -z $(which neofetch) ]]; | |
then | |
neofetch --ascii_distro android_small \ | |
--disable cpu gpu memory packages | |
fi | |
# ░█▀█░█▀▀░▀█░ | |
# ░█▀▀░▀▀█░░█░ | |
# ░▀░░░▀▀▀░▀▀▀ | |
# Simple PS1 | |
# export PS1='[\u@\h \W]\$ ' | |
# Bloated PS1 | |
export PS1="\$(if [[ \$? == 0 ]]; then echo \"\[\e[01;32m\][ \342\234\223 ]\[$(tput sgr0)\]\"; else echo \"\[\e[01;31m\][ \342\234\227 ]\[$(tput sgr0)\]\"; fi)\[$(tput bold)\][\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\e[38;5;11m\]\u\[$(tput sgr0)\]\[\e[38;5;2m\]@\[$(tput sgr0)\]\[\e[38;5;12m\]\h\[$(tput sgr0)\] \[$(tput bold)\]][\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\e[38;5;36m\]\w\[$(tput sgr0)\] \[$(tput bold)\]]\[$(tput sgr0)\]\n\[$(tput bold)\]\\$\[$(tput sgr0)\] \[$(tput bold)\]>\[$(tput sgr0)\] \[$(tput sgr0)\]" | |
# ░█░█░█░█░█▀▀░█░█░█░░░█▀█░█▀▀░▀█▀░█▀█ | |
# ░█▀█░█░█░▀▀█░█▀█░█░░░█░█░█░█░░█░░█░█ | |
# ░▀░▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀ | |
# Create hushlogin (disables splash text) | |
if [[ ! -e ~/.hushlogin ]]; | |
then | |
touch ~/.hushlogin; | |
fi | |
# If not running interactively, don't do anything | |
[[ $- != *i* ]] && return | |
export HISTCONTROL=ignoredups:erasedups | |
export HISTSIZE=100000 | |
export HISTFILESIZE=100000 | |
shopt -s histappend | |
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" | |
shopt -s checkwinsize | |
alias l='ls' | |
alias ls='ls --color=auto' | |
alias la='ls -a' | |
alias ll='ls -l' | |
alias lal='ls -al' | |
alias grep='grep --color=auto' | |
alias d='dirs' | |
alias h='cd $HOME' | |
alias p='pwd' | |
alias mkdir='mkdir -p -v' | |
alias cls='clear' | |
alias c='clear' | |
alias x='exit' | |
alias ht='history' | |
alias s='sudo' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias .....='cd ../../../..' | |
alias src='source ~/.bashrc' | |
alias cp='cp --preserve=all' | |
alias cpv='cp --preserve=all -v' | |
alias cpr='cp --preserve=all -R' | |
# Functions | |
# Convert filename with whitespace to underscore in $PWD | |
function wtu() { for f in *\ *; do mv "$f" "${f// /_}"; done; } | |
# Print needed packages for fresh install | |
function refresher() { | |
echo "Recommended: wget, neofetch, tsu, git, ncurses-utils and man" | |
echo "Optional: cmatrix, w3m, figlet" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment