-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
65 lines (52 loc) · 1.61 KB
/
.bashrc
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
63
64
65
#!/bin/bash
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Windows only
if [[ "$OSTYPE" == "msys" ]]; then
if [ -f "$HOME/.bash/dir_colors" ]; then
eval "$(dircolors "$HOME/.bash/dir_colors")"
fi
XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-'/tmp'}
USER=${USER:-$USERNAME}
fi
# VTE stuff :/
if [ -f /etc/profile.d/vte.sh ]; then
source /etc/profile.d/vte.sh
fi
# Cross compilation toolchain
if [ -f "$HOME/Projects/sp3/current_toolchains/set_path.sh" ]; then
source "$HOME/Projects/sp3/current_toolchains/set_path.sh"
fi
# launch ssh-agent if not running yet and set env to use it
if [[ ! `ps -u "$UID" | grep ssh-agent` ]]; then
ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! "$SSH_AUTH_SOCK" ]]; then
source "$XDG_RUNTIME_DIR/ssh-agent.env" > /dev/null
fi
# Starship prompt
eval "$(starship init bash)"
# Python pip installed executables script path
PATH="$PATH:$HOME/.local/bin"
# rustup binaries
PATH="$PATH:$HOME/.cargo/bin"
# go binaries
PATH="$PATH:$HOME/go/bin"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
# alias for dotfiles git and autocomplete alias
alias config='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
complete -F _complete_alias config
# make xargs expands alias
alias xargs='xargs '
export VISUAL=nvim
export EDITOR=nvim
export DIFFPROG='nvim -d'
# export MANPAGER='nvim -c "%! col -b" -c "set ft=man nomod | let &titlestring=$MAN_PN"'
export MANPAGER='nvim +Man!'
alias pacdiff='sudo -H DIFFPROG="nvim -d" pacdiff'
alias arch-maintenance='bash $HOME/.bash/arch-maintenance.sh'
echo -e "(o)> \n//\\ \nV_/_"