My dotfiles for my Linux rice managed with stow and make
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

89 lines
3.1 KiB

if [ -x /usr/bin/dircolors ]; then
test -r $HOME/.dircolors && eval "$(dircolors -b $HOME/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
alias sl='sl -e'
alias l='ls -CF'
alias ll='ls -alF'
alias la='ls -A'
alias cdb='cd -'
alias ..='cd ..'
alias ...='cd ../..'
alias cp='rsync'
alias cpr='rsync -r'
alias speedtest='speedtest-cli'
alias alsamixer='alsamixer -c 1'
alias gdrive='google-drive-ocamlfuse $HOME/Google\ Drive/'
alias ugdrive='sudo umount $HOME/Google\ Drive/'
alias todo='vi $HOME/.todo'
alias dataBackup='$HOME/backupScript/backup.sh'
alias dataBackupUmount='$HOME/backupScript/backup.sh && sleep 5 && sudo umount /dev/sdd1'
alias makescript="fc -rnl | head -1 >"
alias histg='history | grep'
alias cmount='mount | column -t'
alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"
alias tree2="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
alias meminfo='free -m -l -t'
alias ps?='ps aux | grep'
alias ipinfo="curl ifconfig.me && curl ifconfig.me/host"
alias bashrc="vi $HOME/.bashrc"
alias bashalias="vi $HOME/.bash_aliases"
alias katawa="$HOME/data/Videos/Anime/Visual\ Novels/Katawa\ Shoujo-linux/Katawa\ Shoujo.sh"
alias python="python3"
alias mysql="mysql -u root -p"
alias aptclean="sudo apt-get autoremove ; sudo apt-get autoclean; sudo apt-get install -f ; sudo apt-get clean"
alias aptupgrade="sudo apt-get update ; sudo apt-get -y upgrade ; sudo apt-get -y dist-upgrade ; sudo apt-get -y autoremove ; sudo apt-get -y autoclean; sudo apt-get -y install -f ; sudo apt-get -y clean"
alias setCurrentProject='pwd > $HOME/.current_project'
alias currentProject='cd `cat $HOME/.current_project`'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
getlocation() { lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\';}
mcd() { mkdir -p "$1"; cd "$1";}
cls() { cd "$1"; ls;}
crun() { make "$1"; ./$1;}
backup() { cp "$1"{,.bak};}
md5check() { md5sum "$1" | grep "$2";}
ctree() { cd "$1"; ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'; cd -; }
#C compiling shortcuts for clang and gcc
clang() {
if [[ $1 =~ \.c$ ]]; then
clang-3.5 -g $1 -o ${1%%.*};
else
echo "$1 is not a c file"
fi
}
clanglm() {
if [[ $1 =~ \.c$ ]]; then
clang-3.5 -g $1 -o ${1%%.*} -lm;
else
echo "$1 is not a c file"
fi
}
gccc() {
if [[ $1 =~ \.c$ ]]; then
gcc -std=c99 -Wall -pedantic -Wextra -Werror -O2 -g $1 -o ${1%%.*};
else
echo "$1 is not a c file"
fi
}
gcclm() {
if [[ $1 =~ \.c$ ]]; then
gcc -std=c99 -g $1 -o ${1%%.*} -lm;
else
echo "$1 is not a c file"
fi
}