-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
48 lines (42 loc) · 1.48 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
#!/usr/bin/env bash
# ================= XDG =================
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
# ================= DEFAULT =================
case $- in
*i*) ;;
*) return;;
esac
export LANG=en_US.UTF-8
export SSH_AUTH_SOCK="$HOME/.ssh/agent.sock"
export HISTFILE="$XDG_STATE_HOME/bash/history"
export GIT_EDITOR=vim
export EDITOR=vim
alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
# ================= OH-MY-BASH =================
# Install oh-my-bash by this script:
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"
export OSH="$XDG_DATA_HOME/oh-my-bash"
OSH_THEME="agnoster"
COMPLETION_WAITING_DOTS="true"
OMB_USE_SUDO=true
OMB_PROMPT_SHOW_PYTHON_VENV=true
completions=(git composer ssh)
aliases=(general ls)
plugins=(git bashmarks pyenv)
source "$OSH"/oh-my-bash.sh
# ================= WSL-SSH =================
# Windows WSL SSH config
ss -a | grep -q $SSH_AUTH_SOCK
if [ $? -ne 0 ]; then
npiperelaypath=$XDG_DATA_HOME/npiperelay
if [ -d $npiperelaypath ]; then
rm -f $SSH_AUTH_SOCK
(setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"$npiperelaypath/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork &) >/dev/null 2>&1
fi
fi
# ================ FZF ===================
source /home/alireza/.local/share/conf/bash/completion.bash
source /home/alireza/.local/share/conf/bash/key-bindings.bash