diff options
author | Marc Coquand <marc@mccd.space> | 2024-10-22 11:07:59 +0300 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-10-22 11:07:59 +0300 |
commit | e24f418e3499afd1e9e529b8656a35376e69f52a (patch) | |
tree | 90e01f42d46dec91e3a6cace4de6d089152fad29 /home/bashrc | |
download | guix-e24f418e3499afd1e9e529b8656a35376e69f52a.tar.gz guix-e24f418e3499afd1e9e529b8656a35376e69f52a.tar.bz2 guix-e24f418e3499afd1e9e529b8656a35376e69f52a.zip |
initial commit
Diffstat (limited to 'home/bashrc')
-rw-r--r-- | home/bashrc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/home/bashrc b/home/bashrc new file mode 100644 index 0000000..9a3a2cf --- /dev/null +++ b/home/bashrc @@ -0,0 +1,42 @@ +export SHELL + +if [[ $- != *i* ]] +then + # We are being invoked from a non-interactive shell. If this + # is an SSH session (as in "ssh host command"), source + # /etc/profile so we get PATH and other essential variables. + [[ -n "$SSH_CLIENT" ]] && source /etc/profile + + # Don't do anything else. + return +fi + +# Source the system-wide file. +[ -f /etc/bashrc ] && source /etc/bashrc + +alias rm='rm -i' +alias grep="ugrep --exclude-dir=node-modules --exclude-dir=_build" +alias e="$EDITOR" +alias g="git" +alias grep="ugrep" +alias logdate='date +"%Y-%m-%d"' + +optimizeimg() { + magick -strip -quality 85% $1 $2 +} + +refs() { + recsel -q $1 ~/personal-db/refs.rec +} + +cleartrail() { + cat $1 | tr -d '\n' +} + +alias a='pwd' + +eval "$(zoxide init posix --hook prompt)" + +if [ "$(tty)" = "/dev/tty1" ]; then + exec startx +fi |