Remove Bash and Fish Shell
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
# ~/.bash_logout: executed by bash(1) when login shell exits.
|
||||
|
||||
# when leaving the console clear the screen to increase privacy
|
||||
|
||||
if [ "$SHLVL" = 1 ]; then
|
||||
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
|
||||
fi
|
||||
@@ -1,6 +0,0 @@
|
||||
#
|
||||
# ~/.bash_profile
|
||||
#
|
||||
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
[[ -f ~/.profile ]] && . ~/.profile
|
||||
192
bash/.bashrc
192
bash/.bashrc
@@ -1,192 +0,0 @@
|
||||
#
|
||||
# ~/.bashrc
|
||||
#
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
shopt -s autocd
|
||||
shopt -s checkwinsize
|
||||
shopt -s cdspell
|
||||
shopt -s cmdhist
|
||||
shopt -s histappend
|
||||
shopt -s hostcomplete
|
||||
|
||||
# Make colorcoding available for everyone
|
||||
Black='\e[0;30m' # Black
|
||||
Red='\e[0;31m' # Red
|
||||
Green='\e[0;32m' # Green
|
||||
Yellow='\e[0;33m' # Yellow
|
||||
Blue='\e[0;34m' # Blue
|
||||
Purple='\e[0;35m' # Purple
|
||||
Cyan='\e[0;36m' # Cyan
|
||||
White='\e[0;37m' # White
|
||||
|
||||
# Bold
|
||||
BBlack='\e[1;30m' # Black
|
||||
BRed='\e[1;31m' # Red
|
||||
BGreen='\e[1;32m' # Green
|
||||
BYellow='\e[1;33m' # Yellow
|
||||
BBlue='\e[1;34m' # Blue
|
||||
BPurple='\e[1;35m' # Purple
|
||||
BCyan='\e[1;36m' # Cyan
|
||||
BWhite='\e[1;37m' # White
|
||||
|
||||
# Background
|
||||
On_Black='\e[40m' # Black
|
||||
On_Red='\e[41m' # Red
|
||||
On_Green='\e[42m' # Green
|
||||
On_Yellow='\e[43m' # Yellow
|
||||
On_Blue='\e[44m' # Blue
|
||||
On_Purple='\e[45m' # Purple
|
||||
On_Cyan='\e[46m' # Cyan
|
||||
On_White='\e[47m' # White
|
||||
|
||||
NC="\e[m" # Color Reset
|
||||
|
||||
# new alert text
|
||||
ALERT=${BWhite}${On_Red} # Bold White on red background
|
||||
|
||||
# Creates an archive (*.tar.gz) from given directory.
|
||||
function maketar() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; }
|
||||
|
||||
# Create a ZIP archive of a file or folder.
|
||||
function makezip() { zip -r "${1%%/}.zip" "$1" ; }
|
||||
|
||||
function extract {
|
||||
if [ -z "$1" ]; then
|
||||
# display usage if no parameters given
|
||||
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
|
||||
else
|
||||
if [ -f $1 ] ; then
|
||||
# NAME=${1%.*}
|
||||
# mkdir $NAME && cd $NAME
|
||||
case $1 in
|
||||
*.tar.bz2) tar xvjf ../$1 ;;
|
||||
*.tar.gz) tar xvzf ../$1 ;;
|
||||
*.tar.xz) tar xvJf ../$1 ;;
|
||||
*.lzma) unlzma ../$1 ;;
|
||||
*.bz2) bunzip2 ../$1 ;;
|
||||
*.rar) unrar x -ad ../$1 ;;
|
||||
*.gz) gunzip ../$1 ;;
|
||||
*.tar) tar xvf ../$1 ;;
|
||||
*.tbz2) tar xvjf ../$1 ;;
|
||||
*.tgz) tar xvzf ../$1 ;;
|
||||
*.zip) unzip ../$1 ;;
|
||||
*.Z) uncompress ../$1 ;;
|
||||
*.7z) 7z x ../$1 ;;
|
||||
*.xz) unxz ../$1 ;;
|
||||
*.exe) cabextract ../$1 ;;
|
||||
*) echo "extract: '$1' - unknown archive method" ;;
|
||||
esac
|
||||
else
|
||||
echo "$1 - file does not exist"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# jump directorys upwards until it hits a directory with multiple folders
|
||||
function 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" || exit
|
||||
}
|
||||
|
||||
# create an directory and directly cd into it
|
||||
function mcd() {
|
||||
mkdir -p "$1"
|
||||
cd "$1" || exit
|
||||
}
|
||||
|
||||
function parse_git_branch() {
|
||||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
||||
}
|
||||
|
||||
function my_ip() {
|
||||
INTERFACE=$(ip addr | awk '/state UP/ {print $2}' | sed 's/.$//')
|
||||
echo "$(/sbin/ifconfig $INTERFACE | awk "/inet/ {print $2} " | sed -e s/addr://)"
|
||||
}
|
||||
|
||||
function welcome() {
|
||||
#------------------------------------------
|
||||
#------WELCOME MESSAGE---------------------
|
||||
# customize this first message with a message of your choice.
|
||||
# this will display the username, date, time, a calendar, the amount of users, and the up time.
|
||||
clear
|
||||
# Gotta love ASCII art with figlet
|
||||
#figlet "Welcome, " $USER;
|
||||
toilet -f starwars -t "Welcome, " $USER;
|
||||
#echo -e ""; cal ;
|
||||
fastfetch 2> /dev/null
|
||||
echo ""
|
||||
echo -ne "Today is "; date
|
||||
echo -e ""
|
||||
echo -ne "Up time:";uptime | awk /'up/'
|
||||
echo -en "Local IP Address : "; my_ip | awk '{print $2}'
|
||||
echo "";
|
||||
}
|
||||
|
||||
[ -r "$HOME/.bashrc.aliases" ] && . "$HOME/.bashrc.aliases"
|
||||
|
||||
# export QT_STYLE_OVERRIDE=gtk
|
||||
# export QT_SELECT=qt5
|
||||
|
||||
if [[ $LANG = '' ]]; then
|
||||
export LANG=it_IT.UTF-8
|
||||
fi
|
||||
|
||||
if [ -n "$SSH_CLIENT" ]; then
|
||||
ssh_placeholder=' {SSH::SESSION}'
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
|
||||
# To only show the git prompt in or under a repository directory
|
||||
GIT_PROMPT_ONLY_IN_REPO=0
|
||||
# To use upstream's default theme
|
||||
GIT_PROMPT_THEME=Custom
|
||||
source "$HOME/.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 ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -e "/etc/DIR_COLORS" ] && DIR_COLORS="/etc/DIR_COLORS"
|
||||
[ -e "$HOME/.dircolors" ] && DIR_COLORS="$HOME/.dircolors"
|
||||
[ -e "$DIR_COLORS" ] || DIR_COLORS=""
|
||||
|
||||
[ -f "$HOME/.ghcup/env" ] && . "$HOME/.ghcup/env"
|
||||
|
||||
if [ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]; then
|
||||
# Initialize Homebrew
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
fi
|
||||
|
||||
if command -v oh-my-posh > /dev/null 2>&1; then
|
||||
eval "$(oh-my-posh init bash --config "$(brew --prefix oh-my-posh)/themes/peru.omp.json")"
|
||||
fi
|
||||
|
||||
if command -v zoxide > /dev/null 2>&1; then
|
||||
# Initialize Zoxide
|
||||
eval "$(zoxide init bash)"
|
||||
fi
|
||||
|
||||
if command -v mise > /dev/null 2>&1; then
|
||||
# Activate Mise JDX
|
||||
eval "$(mise activate bash)"
|
||||
fi
|
||||
@@ -1,49 +0,0 @@
|
||||
#
|
||||
# ~/.bashrc.aliases
|
||||
#
|
||||
|
||||
# Alias di cambio directory
|
||||
alias ..="cd .."
|
||||
alias ...="cd ../.."
|
||||
alias .3="cd ../../.."
|
||||
alias .4="cd ../../../.."
|
||||
alias .5="cd ../../../../.."
|
||||
alias cd..="cd .."
|
||||
alias home="cd ~"
|
||||
|
||||
# Alias del comando ls
|
||||
alias l="ls -CF --color=always"
|
||||
alias ls="ls --color=always"
|
||||
alias lla="ls -lisah"
|
||||
alias ll="ls -lh"
|
||||
alias la="ls -CFa"
|
||||
alias lsl="ls -lhFA | less"
|
||||
|
||||
# Output colorato comandi vari
|
||||
alias grep='grep --color=auto'
|
||||
alias gcc='colorgcc'
|
||||
alias diff='colordiff'
|
||||
|
||||
# Alias vari
|
||||
alias path='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths
|
||||
alias mkdir="mkdir -pv"
|
||||
alias journalctl='sudo journalctl'
|
||||
alias failed='sudo systemctl --failed'
|
||||
alias se='ls /usr/bin | grep'
|
||||
alias df='df -h'
|
||||
alias du='du -h'
|
||||
alias please='sudo $(fc -ln -1)'
|
||||
alias userlist="cut -d: -f1 /etc/passwd | sort"
|
||||
alias fhere="find . -name "
|
||||
alias free="free -mth"
|
||||
alias ps="ps auxf"
|
||||
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
|
||||
alias wget="wget -c"
|
||||
alias histg="history | grep"
|
||||
alias myip="curl http://ipecho.net/plain; echo"
|
||||
alias logs="find /var/log -type f -exec file {} \; | grep 'text' | cut -d' ' -f1 | sed -e's/:$//g' | grep -v '[0-9]$' | xargs tail -f"
|
||||
alias folders='find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn'
|
||||
alias vpn-add='nmcli connection import type openvpn file'
|
||||
alias pbcopy='xsel --clipboard --input'
|
||||
alias pbpaste='xsel --clipboard --output'
|
||||
alias stow='stow --dotfiles -d ~/.dotfiles '
|
||||
Reference in New Issue
Block a user