-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy-mac-tools.sh
138 lines (116 loc) · 3.37 KB
/
my-mac-tools.sh
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
#!/bin/bash
# ----------------------------------------------------------
# ---------------Enable application firewall----------------
# ----------------------------------------------------------
echo '--- Enable application firewall'
/usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
sudo defaults write /Library/Preferences/com.apple.alf globalstate -bool true
defaults write com.apple.security.firewall EnableFirewall -bool true
cd ~ || exit
# install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# ----------------------------------------------------------
# ---------Disable Homebrew user behavior analytics---------
# ----------------------------------------------------------
echo '--- Disable Homebrew user behavior analytics'
command='export HOMEBREW_NO_ANALYTICS=1'
declare -a profile_files=("$HOME/.bash_profile" "$HOME/.zprofile")
for profile_file in "${profile_files[@]}"
do
touch "$profile_file"
if ! grep -q "$command" "${profile_file}"; then
echo "$command" >> "$profile_file"
echo "[$profile_file] Configured"
else
echo "[$profile_file] No need for any action, already configured"
fi
done
casktools=(
iterm2
vscodium
alacritty
fig
docker
)
brew install --cask "${casktools[@]}"
clitools=(
bat #A cat clone with syntax highlighting and Git integration.
dust #du + rust = dust. Like du but more intuitive.
lsd # rewrite of GNU ls with lots of added features
fd #fd is a program to find entries in your filesystem
git
git-delta
htop
jq
midnight-commander
procs #procs is a replacement for ps written in Rust.
sd #sd - search & displace
tldr
wget
z
google-chrome
gh
zsh
git-flow
lazygit
node
yarn
# fnm
pnpm
)
brew install "${clitools[@]}"
# # other tools
# brew install --cask alt-tab
# brew install --cask raycast
# brew install --cask shottr
git config --global user.name "Dawid U"
git config --global user.email "dawurb@gmail.com"
# git config --global push.default current
# git config --global core.pager delta
# git config --global core.pager "delta --dark"
# git config --global core.pager "delta --line-numbers --dark"
# zsh
# brew install antigen
# echo "eval '$(fnm env)'" >> .zshrc
# python
# sudo easy_install pip
# pip install --user powerline-status
# pip install ipython
# brew install python3
# python tools
# pip3 install ipython
# pip3 install jedi
# pip3 install rope
# pip3 install flake8
# pip3 install autopep8
# pip3 install yapf
# pip3 install black
# stuff
# mkdir code
# mkdir code/open-source
# mkdir stuff
# git clone https://github.com/denilsonsa/prettyping $HOME/stuff
# git clone https://github.com/przemyslawjanpietrzak/dotfiles $HOME/code/open-source
# curl -L git.io/antigen > $HOME/stuff/antigen.zsh
# # load configs
# cp $HOME/code/open-source/alacritty.toml $HOME/.config/alacritty/
# cp $HOME/code/open-source/tmux.conf $HOME/.config/tmux/
# cp $HOME/code/open-source/.zshrc $HOME/
# ssh
# brew install tunnelblick
# brew install openssh
# media
# brew install vlc
# brew install transmission
# brew install spotify
# aws
# pip3 install awscli --upgrade --user
# Dodanie ustawień do .zshrc
zshrc_file="$HOME/.zshrc"
{
echo 'HISTFILE="$HOME/.zsh_history"'
echo 'HISTSIZE=10000000'
echo 'SAVEHIST=10000000'
echo 'HISTORY_IGNORE="(ls|cd|pwd|exit|cd)*"'
} >> "$zshrc_file"
source "$zshrc_file"