Skip to content

Commit 0305021

Browse files
author
nar3nd3r
committed
day n: fix for oh-my-zsh and other clean up
1 parent cf6f1bf commit 0305021

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

i_am_lazy.sh

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ function wait_for_xcode_cli_tools_installation() {
3636
readChoice choice
3737
if [[ $choice == 'y' || $choice == 'Y' ]]; then
3838
echo -ne "\n"
39-
if [[ -z `xcode-select -p` ]]
40-
then
41-
sudo xcode-select --install 2>& 1 > /dev/null
39+
if [[ -z $(xcode-select -p) ]]; then
40+
sudo xcode-select --install 2>&1 >/dev/null
4241
echo -ne "\nShould we proceed further (y/N): \b"
4342
wait_for_xcode_cli_tools_installation
4443
fi
@@ -50,7 +49,6 @@ function wait_for_xcode_cli_tools_installation() {
5049
return $?
5150
}
5251

53-
5452
function run_this_command() {
5553
_command=$1
5654
osascript <<EOF
@@ -166,11 +164,10 @@ function main() {
166164
set_system_hostname || exit
167165

168166
# we need xcode command line tool first
169-
if [[ -z `xcode-select -p` ]]
170-
then
167+
if [[ -z $(xcode-select -p) ]]; then
171168
# initially its gonna take a while to install xcode command line tools
172169
echo -ne "[+] Please allow xcode command line tools to be installed \n"
173-
sudo xcode-select --install 2>& 1 > /dev/null
170+
sudo xcode-select --install 2>&1 >/dev/null
174171
echo -ne "\nShould we proceed further (y/N): \b"
175172
wait_for_xcode_cli_tools_installation || exit
176173
fi
@@ -224,20 +221,26 @@ function main() {
224221
wget -q "$meslo_bold_italic" -O ~/Library/Fonts/MesloLGS\ NF\ Bold\ Italic.ttf
225222
run_this_command "fc-cache -vf ~/.local/share/fonts/"
226223

227-
# one last step
228224
# set zsh and oh-my-zsh
229225
run_this_command "brew install zsh zsh-completions"
230226
run_this_command "[[ -e ~/.zcompdump ]] && rm -f ~/.zcompdump || compinit"
227+
run_this_command "compaudit | xargs chmod g-w,o-w"
231228
chmod go-w '/usr/local/share'
232-
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
233-
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
234-
235229

236230
# finally change shell to zsh
237231
command -v zsh | sudo tee -a /etc/shells
238232
sudo chsh -s $(command -v zsh)
239233
chsh -s $(command -v zsh)
240-
run_this_command "compaudit | xargs chmod g-w,o-w"
234+
235+
# one last step
236+
echo -ne "[+] Installing oh-my-zsh\n"
237+
run_this_command "curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sh"
238+
239+
echo -ne "[+] Installing powerlevel10k\n"
240+
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
241+
242+
# open a terminal here for virtualenv to do a quick self configuration
243+
run_this_command "echo 'All Good'"
241244

242245
echo "[!] please consider donating me if you can, helps me a meal for the day."
243246
open -a Safari "https://www.paypal.me/nar3nd3rs1ngh"

packages/commandlineCaskTools.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ kap
55
spectacle
66
appcleaner
77
visual-studio-code
8-
kite
9-
keepingyouawake
8+
# kite
9+
# keepingyouawake
1010
dozer
1111
the-unarchiver
1212
skype
1313
# macs-fan-control
1414
nightowl
1515
# firefox
1616
# font-hack-nerd-font
17-
# font-fira-code
17+
font-fira-code
1818
# android-platform-tools
19-
mos
19+
# mos
2020
# barrier
21-
google-chrome
21+
# google-chrome
2222
# postgres

0 commit comments

Comments
 (0)