Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
Skylar "The Cobra" Widulski 2022-11-06 08:21:14 -05:00
parent b5376ee86f
commit 756b45f57d
Signed by: cobra
GPG Key ID: 4FD8F812083FF6F9
1 changed files with 33 additions and 9 deletions

42
.bashrc
View File

@ -12,22 +12,23 @@ export HISTFILESIZE=1000
export HISTSIZE=1000
export GPG_TTY=$(tty)
clear() {
printf '\033c' # faster than ncurses clear by a lot
}
# We hate sudo here
alias sudo='sh -c "exit 1"'
# Other aliases
alias clear="printf '\033c'" # faster than ncurses clear by a lot
alias c='clear'
alias ls='ls --color=auto -FAh'
alias ll='ls -l'
alias rebash='. ~/.bashrc'
alias bashrc="$EDITOR ~/.bashrc && rebash"
alias nf='neofetch'
alias sshd='boas /usr/sbin/sshd'
alias ga='git add'
alias gc='git commit -sS'
alias gp='git push'
alias wv='mpv $($PASTE_COMMAND)'
alias lc='fc -nl $HISTCMD | xargs'
alias curl='curl -L'
alias prof='profanity'
@ -152,13 +153,36 @@ playcd() {
mpv --start=00:00:00.0000000 av://libcdio:/dev/cdrom --cache=yes
}
playdvd() {
mpv --start=00:00:00.0000000 dvd:///dev/sr0 --cache=yes
}
gpginfo() {
gpg --with-colons --import-options show-only --import
}
baseto() {
local i="$1"
local o="$2"
shift 2
bc <<< "obase=$o;$(($i#$*))"
lc() {
fc -nl $HISTCMD | sed 's/^\s*//'
}
baseto() {
if [ $# -ge 3 ]; then
local i="$1"
local o="$2"
shift 2
bc <<< "obase=$o;$(($i#$*))"
else
local line i o n
while read -r line; do
read -r i o n <<< "$line"
bc <<< "obase=$o;$(($i#$n))"
done
fi
}
rebash() { . ~/.bashrc; }
bashrc() { "$EDITOR" ~/.bashrc && rebash; }
curplot() {
ssh typhoon "~/gnuplot/gnuplot.sh; cat ~/gnuplot/$(date -I).svg" > $(date -I).svg
}