-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.bash
More file actions
55 lines (41 loc) · 1.23 KB
/
__init__.bash
File metadata and controls
55 lines (41 loc) · 1.23 KB
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
#!/bin/bash
if [[ ! "$ENV_PROFILE" ]]; then
echo 'Missing Environment variable $ENV_PROFILE in your ~\.zshrc | ~\.bashrc | ~\.bash_profile | ...'
exit 1
fi
echo "[ENV_PROFILE: $ENV_PROFILE]"
SCRIPT_DIR="$HOME/.terminal"
function header() {
printf "\n### %s ###\n" "$1"
}
# Unlock the ssh-keychain for no password-promts on new sessions
eval "keychain --eval ssh ~./ssh/id_ed25519"
eval "keychain --eval ssh ~./ssh/id_rsa"
# Load all utils
header "Utils"
for util in "$SCRIPT_DIR"/utils/*.bash; do
# shellcheck source=/dev/null
source "$util"
printf "Loaded => %s\n" "$util"
done
header "Environment variables"
loadSource "$SCRIPT_DIR/.env.bash"
# Load all resources
header "Environment"
for resource in "$SCRIPT_DIR"/*.bash; do
if grep -v --silent --quiet "__init__" <<<"$resource"; then
loadSource "$resource"
fi
done
# Other system sourcing
autoload -U +X bashcompinit && bashcompinit
source "$SCRIPT_DIR/az.completion"
source "$SCRIPT_DIR/tmux/init.bash"
# xmodmap
# xmodmap -e "keysym Meta_L = ISO_Level3_Shift"
# xmodmap "$SCRIPT_DIR/.Xmodmap"
# Set nvim as the default viewer for Manpages
export MANPAGER='nvim +Man!'
# Set up fzf key bindings and fuzzy completion
# shellcheck source=/dev/null
source <(fzf --zsh)