1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-21 11:01:31 +01:00

Version bump

This commit is contained in:
bretello 2018-03-31 02:33:42 +02:00
parent faf112d855
commit b4d5787480
4 changed files with 32 additions and 12 deletions

View File

@ -34,7 +34,7 @@ fi
#### Audible bell
alias bell='echo -en "\007"'
alias grep="grep --color=auto"
alias grep="grep --colour=yes"
##############
## ls aliases
@ -90,6 +90,7 @@ if [[ "$TERM" != dumb ]] && [[ -f $(which grc) ]] ; then
gcc \
gmake \
ifconfig \
iptables \
last \
ldap \
make \
@ -99,6 +100,7 @@ if [[ "$TERM" != dumb ]] && [[ -f $(which grc) ]] ; then
ping \
ping6 \
ps \
ss \
traceroute \
traceroute6 \
wdiff \
@ -107,7 +109,7 @@ if [[ "$TERM" != dumb ]] && [[ -f $(which grc) ]] ; then
# Set alias for available commands.
for cmd in $cmds ; do
if [[ -f $(which $cmd) ]] ; then
alias $cmd="grc --colour=auto $cmd"
alias $cmd="grc --colour=on $cmd"
fi
done

View File

@ -2,7 +2,7 @@
env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT DOTFILES=$DOTFILES zsh -f $DOTFILES/check_for_update.sh
# oh-my-zsh plugins (some of these have to be installed by running install.sh or install_zsh_plugins, found in install.sh)
shared_plugins=(git alias-tips sudo common-aliases fast-syntax-highlighting zsh-autosuggestions colored-man-pages zsh-navigation-tools zsh_reload )
shared_plugins=(git alias-tips sudo common-aliases fast-syntax-highlighting zsh-autosuggestions colored-man-pages zsh-navigation-tools zsh_reload themes )
uname=$(uname -a)
if [[ $uname == *"Darwin"* ]]; then

View File

@ -21,7 +21,12 @@ function dotfiles_selfupdate
## get cheat sheets for commands from cheat.sh. Usage: cheat commandname
function cheat
{
curl cheat.sh/$1
curl "cheat.sh/$1"
}
# get cheat sheets for commands matching $1
function cheatall
{
curl "cheat.sh/~$1"
}
## Simple calculator. Usage: calc 1+1, calc 5/7, calc "sqrt(2)"
function calc
@ -107,13 +112,13 @@ function httpserver
## Upload something using the transfer.sh service. Usage: transfer filename
function transfer
{
{
basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g')
out=$(curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile")
echo -e "Done, file at:\t$out"
if [[ $(uname) == "Darwin" ]]; then
echo "$out" | pbcopy
else
echo "$out" | pbcopy
else
echo "$out"
fi
}
@ -165,7 +170,7 @@ function list_functions
###########################
## MAC SPECIFIC #
## MAC SPECIFIC #
###########################
if [[ "$(uname)" == "Darwin" ]]; then
@ -177,7 +182,7 @@ function ramdisk
else
sizeingb=1
fi
# Numsectors is size in bytes / 512 (sector size in bytes)
name='RAM_disk'
sizeinbytes=$(($sizeingb*1000**3))
@ -216,7 +221,18 @@ function nman
}
fi # end of mac-specific functions
# Force update git repo from origin/master# Force update git repo from origin/master# Force update git repo from origin/master
function gitupdate(){
git fetch --all
git reset --hard origin/master
}
if [[ -f ~/.dotfiles_functions ]]; then
function pipupdate(){
for pip in pip2 pip2; do
$pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U
done
}
if [[ -f ~/.dotfiles_functions ]]; then
source ~/.dotfiles_functions
fi

View File

@ -34,9 +34,11 @@ function install_vimrc {
git clone https://github.com/amix/vimrc.git $HOME/.vim_runtime && sh $HOME/.vim_runtime/install_awesome_vimrc.sh || return -1
}
function install_zsh_plugins {
# Install fast-syntax-highlighting (git: zdharma), zsh-autosuggestions (git:zsh-users)
ZSH_PLUGINS="$HOME/.oh-my-zsh/custom/plugins"
mkdir -p $ZSH_PLUGINS
git clone https://github.com/zdharma/fast-syntax-highlighting.git ${ZSH_PLUGINS}/fast-syntax-highlighting || error=true
git clone git://github.com/zsh-users/zsh-autosuggestions ${ZSH_PLUGINS}/zsh-autosuggestions || error=true
if [[ $error ]]; then
@ -205,9 +207,9 @@ function brethil_dotfiles_setup {
fi
# Symlink brethil.zsh-theme
ln -s $DOTFILES/brethil.zsh-theme $HOME/.oh-my-zsh/themes/
ln -s $DOTFILES/brethil.zsh-theme $HOME/.oh-my-zsh/custom/
# Symlink brethil-minimal.zsh-theme
ln -s $DOTFILES/brethil-minimal.zsh-theme $HOME/.oh-my-zsh/themes/
ln -s $DOTFILES/brethil-minimal.zsh-theme $HOME/.oh-my-zsh/custom/
# Set brethil theme
if [[ $(uname) == "Darwin" ]]; then # MacOS has a different syntax for sed