scripts/.bashrc
2025-04-01 21:26:13 +02:00

42 lines
1.1 KiB
Bash

#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export EDITOR=vim
alias setclip="xclip -selection c"
alias getclip="xclip -selection c -o"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias curl="curl --progress-bar"
alias khal="vdirsyncer sync;khal interactive"
alias git-ssl-self-signed="source ~/.scripts/ssl-git"
PS1='[\u@\h \W]\$ '
alias borg="borg --progress"
alias kodi="firejail kodi"
alias firefox="waterfox"
alias ls="ls -alh"
alias rm="rm -i"
export GOTIFY_TOKEN="dunno"
export BORG_PASSCOMMAND='pass show borg/borg'
export BACKUP_LOCATION='/mnt/backup/borg'
export PASSWORD_STORE_DIR='passwordstoredirHERE'
shopt -s progcomp
do_backup() {
echo "do_backup [file] [name]"
borg create $BACKUP_LOCATION::"$2"-{hostname}-$(date +"%Y-%m-%d_%H:%M") "$1"
}
home_backup(){
echo "no args doing a backup of home"
borg create $BACKUP_LOCATION::home-{hostname}-$(date +"%Y-%m-%d_%H:%M") ~ --exclude '/home/*/.local' --exclude '/home/*/.cache' --exclude '/home/*/steampath'
}
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi