-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bashrc
155 lines (120 loc) · 4.14 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#!/bin/bash
case $- in
# Enable the subsequent settings only in interactive sessions
*i*) ;;
*) return ;;
esac
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"
# Path to your oh-my-bash installation.
export OSH="${HOME}/.oh-my-bash"
export SYSTEMD_EDITOR=vim
export DISPLAY=:1
# export GIT_EDITOR="NVR --remote-tab-wait + 'set bufhidden=delete'"
# TODO: fix the command to act like I actually want
# export FZF_DEFAULT_COMMAND="rg --files --hidden --follow --glob '!.git'"
fzfe() {
echo -n "" | fzf --print-query --prompt="Enter regex> " --preview='echo {} | highlight --syntax regex'
}
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-bash is loaded.
OSH_THEME="beat"
# shellcheck source=/dev/null
[[ $- == *i* ]] && source "$HOME/.local/share/blesh/ble.sh" --rcfile "$HOME/.config/blesh/init.sh"
PATH="$HOME/.local/bin/:$PATH"
# To disable the uses of "sudo" by oh-my-bash, please set "false" to
# this variable. The default behavior for the empty value is "true".
export OMB_USE_SUDO=true
# Which completions would you like to load? (completions can be found in ~/.oh-my-bash/completions/*)
# Custom completions may be added to ~/.oh-my-bash/custom/completions/
# Example format: completions=(ssh git bundler gem pip pip3)
# Add wisely, as too many completions slow down shell startup.
completions=(
git
composer
ssh
)
# Which aliases would you like to load? (aliases can be found in ~/.oh-my-bash/aliases/*)
# Custom aliases may be added to ~/.oh-my-bash/custom/aliases/
# Example format: aliases=(vagrant composer git-avh)
# Add wisely, as too many aliases slow down shell startup.
aliases=(
# general
)
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-bash/plugins/*)
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
bashmarks
)
# Which plugins would you like to conditionally load? (plugins can be found in ~/.oh-my-bash/plugins/*)
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
# Example format:
# if [ "$DISPLAY" ] || [ "$SSH" ]; then
# plugins+=(tmux-autoattach)
# fi
# shellcheck source=/home/beat/.oh-my-bash/oh-my-bash.sh
source "$OSH"/oh-my-bash.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
export DISPLAY=${DISPLAY:-:1}
vpn() {
local target="$1"
local state="$2"
nmcli connection "$state" "$target"
}
wake() {
local target="$1"
if [[ "$target" == "smolboi" ]]; then
wakeonlan b4:2e:99:a1:4d:aa
else
echo "target not found"
fi
}
pacmanSearch() {
pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'
}
export FZF_DEFAULT_COMMAND="rg --files --hidden --follow --glob '!.git'"
if [[ -f "$HOME/.aliases" ]]; then
. "$HOME/.aliases"
fi
if [[ -f "$HOME/.aliases_mt" ]]; then
. "$HOME/.aliases_mt"
fi
if [[ -f "$HOME/.bashrc_mt" ]]; then
. "$HOME/.bashrc_mt"
fi
export NVM_DIR="$HOME/.nvm"
# shellcheck source=/dev/null
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# shellcheck source=/dev/null
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export SIMULATION_CONFIG="$HOME/sim_config.xml"
if [[ -f "$HOME/.cargo/env" ]]; then
. "$HOME/.cargo/env"
fi
# pnpm
export PNPM_HOME="/${HOME}.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
[[ -f "/home/beat/workspace/mtrsys/develop/build/sim/sim_helpers.sh" ]] && source "/home/beat/workspace/mtrsys/develop/build/sim/sim_helpers.sh"