summaryrefslogtreecommitdiff
path: root/dot-bashrc
blob: 9a8b02b4433e848fc690089b7c154cbbfc84c7b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '

export EDITOR=nvim

# include home binaries
export PATH=$PATH:~/.bin

# use trash instead of rm
alias rm='echo "use trash instead"; false'
alias tm='trash-put'

# lock desktop
alias lock='swaylock -f -c 000000'

# bluetooth
alias bt='bluetui'

# kitten ssh
alias kssh='kitten ssh'

# SSH Keychain
eval $(keychain --eval --quiet id_ed25519)

# rclone
## logs
export RCLONE_COMBINED=~/.logs/rclone/combined.log
export RCLONE_DIFFER=~/.logs/rclone/differ.log
export RCLONE_ERROR=~/.logs/rclone/error.log
export RCLONE_MATCH=~/.logs/rclone/match.log
export RCLONE_MISSING_ON_DST=~/.logs/rclone/missing-on-dst.log
export RCLONE_MISSING_ON_SRC=~/.logs/rclone/missing-on-src.log
## settings
## specific to aws-like (Hetzner)
## see https://rclone.org/s3/#reducing-costs
## and https://rclone.org/s3/#increasing-performance
export RCLONE_FAST_LIST=true
export RCLONE_CHECKSUM=true
export RCLONE_TRANSFERS=200
export RCLONE_CHECKERS=200

# list packages installed explicitly, sorted by date
alias pacbd="cd && pacman -Qqe > pkglist.txt && expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | sed 's/^.*\s//' - | rg -f pkglist.txt -x"

# direnv
eval "$(direnv hook bash)"

# starship
eval "$(starship init bash)"

# include dev bashrc when in `dev` distrobox
if [ "$CONTAINER_ID" = "dev" ]; then
  source ~/.bashrc.d/dev.bashrc
fi