1
0
Fork 0

some minor syntax changes for shellrc

This commit is contained in:
Von Random 2015-06-04 13:15:26 +03:00
parent f90ef8b70e
commit 161ad3d6ab

29
shellrc
View file

@ -5,12 +5,12 @@
# common # common
# {{{ environment # {{{ environment
# a bunch of functions to make this whole thing work # a bunch of functions to make this whole thing work
is_zsh() { [[ -n ${ZSH_VERSION} ]]; } is_zsh() [[ -n ${ZSH_VERSION} ]]
if is_zsh; then if is_zsh; then
is_exec() { [[ -x $(whence ${1}) ]]; } is_exec() [[ -x $(whence ${1}) ]]
export HOSTNAME=${HOST} export HOSTNAME=${HOST}
else else
is_exec() { [[ -x $(type -P ${1}) ]]; } is_exec() [[ -x $(type -P ${1}) ]]
fi fi
newline=" newline="
@ -92,28 +92,15 @@ alias sci='command svn commit'
alias sup='command svn up' alias sup='command svn up'
# }}} # }}}
# {{{ common functions # {{{ common functions
screenoff-disable() { screenoff-disable() { xset -dpms; xset s off; }
xset -dpms
xset s off
}
screenoff-enable() { screenoff-enable() { xset +dpms; xset s on; }
xset +dpms
xset s on
}
dotfiles-update() { dotfiles-update() { git --work-tree="${dotfiles}" --git-dir="${dotfiles}/.git" pull; }
git --work-tree="${dotfiles}" --git-dir="${dotfiles}/.git" pull
return 0
}
hide-info() { hide-info() { hide_info=true; }
hide_info=true
}
unhide-info() { unhide-info() { unset hide_info; }
unset hide_info
}
seconds-to-hr() { seconds-to-hr() {
local seconds d h m s local seconds d h m s