Skip to content

Added oh My zsh #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c8465c9
Added oh My zsh
Mehran Nov 15, 2017
fa4cba1
add Plugins and theme
invalid-email-address Nov 15, 2017
0926d0c
install powerline Fonts
invalid-email-address Nov 15, 2017
e87f803
Update OSConfig.sh
Mehran Nov 16, 2017
47ff231
Replace wget with curl
Mehran Nov 16, 2017
6da354e
add sudo
Mehran Nov 16, 2017
1f87ccd
add ZSH configuration by sed
Mehran Nov 16, 2017
a723a01
Update BrewConfig.sh
Mehran Nov 16, 2017
1f5a1b9
Default is zsh
Mehran Nov 17, 2017
6dbd519
Update OSConfig.sh
Mehran Nov 17, 2017
6db33b8
Update OSConfig.sh
Mehran Nov 17, 2017
c3f46fb
Update OSConfig.sh
Mehran Nov 17, 2017
85c48ca
Update OSConfig.sh
Mehran Nov 17, 2017
55aa444
Update OSConfig.sh
Mehran Nov 17, 2017
d3be098
Update OSConfig.sh
Mehran Nov 17, 2017
5c8b872
Update OSConfig.sh
Mehran Mar 8, 2018
5f57bc2
Update OSConfig.sh
Mehran Mar 8, 2018
674be58
Update BrewConfig.sh
Mehran Mar 10, 2018
219f410
Update OSConfig.sh
Mehran Mar 12, 2018
4c489de
Update OSConfig.sh
Mehran Mar 16, 2018
03f2657
Update OSConfig.sh
Mehran Apr 23, 2018
13bf547
Add unzip
Mehran May 4, 2018
ae411fe
Added auto downloader software for MacOS
May 4, 2018
4a9992a
Update Downloader-MacOS.sh
Mehran May 4, 2018
e8be680
Add wget
Mehran May 4, 2018
8fb020d
Delete Downloader-MacOS.sh
Mehran May 4, 2018
c05f175
Added Brew Cask to install software
Mehran May 4, 2018
eb2a2dd
add insomniax
Mehran May 4, 2018
01028ba
Update UnsplashBackground.sh
Mehran May 4, 2018
5a27465
Update README.md
Mehran May 4, 2018
7a1b4ea
Update BrewCask.sh
Mehran Jul 22, 2018
643cab3
Update BrewCask.sh
Mehran Jul 22, 2018
dfcd84a
Update BrewCask.sh
Mehran Jul 22, 2018
be6cfb1
Update OSConfig.sh
Mehran Jul 22, 2018
cdc598b
Update OSConfig.sh
Mehran Jul 23, 2018
7bf6995
Update OSConfig.sh
Mehran Jul 23, 2018
1cd2669
Update OSConfig.sh
Mehran Jul 23, 2018
7a1de74
add wireguard
Mehran Nov 22, 2018
712123f
Update BrewCask.sh
Mehran Dec 22, 2018
f3596c4
Update OSConfig.sh
Mehran Dec 22, 2018
3b852c6
Remove the “Last login” Message from the Terminal
Mehran Mar 29, 2019
b3f5905
Update OSConfig.sh
Mehran Aug 9, 2019
7ad4e20
Update BrewCask.sh
Mehran Aug 9, 2019
a25af64
Update BrewConfig.sh
Mehran Aug 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions BrewCask.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

#Check If Brew Is Installed
if ! [ -x "$(command -v brew)" ]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
brew update
brew upgrade
fi

# Install Need Software on Mac #
#brew cask install evernote
brew cask install firefox
#brew cask install visual-studio-code
#brew cask install google-chrome
#brew cask install peakhour
brew cask install dropbox
brew cask install telegram
#brew cask install 1password
brew cask install iterm2
#brew cask install vmware-fusion
#brew cask install ipvanish-vpn
brew cask install insomniax
brew tap buo/cask-upgrade
18 changes: 11 additions & 7 deletions BrewConfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,23 @@ brew install bash
brew install bash-completion2
brew install git
brew install git-lfs
brew install telnet
brew install unzip
brew install wget
brew install wireguard-tools

# Install Some Security Tools
brew install binutils
brew install binwalk
#brew install binutils
#brew install binwalk
brew install nmap
brew install sqlmap
brew install tcpflow
brew install tcpreplay
brew install tcptrace
#brew install sqlmap
#brew install tcpflow
#brew install tcpreplay
#brew install tcptrace

# Install Some Other Tools
brew install shellcheck
brew install dark-mode
#brew install dark-mode


# Clean Up Brew
Expand Down
51 changes: 47 additions & 4 deletions OSConfig.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash

sudo -i

# Turn On Dark Mode (From brew install dark-mode)
dark-mode on
#dark-mode on

# Enable Darkmode on Mojave Os
osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to not dark mode'

# Save To Disk (not to iCloud) By Default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
Expand All @@ -22,10 +27,12 @@ defaults write com.apple.screencapture type -string "png"
defaults write com.apple.screencapture disable-shadow -bool true

#Remove Icons For Hard Drives, Servers, And Removable Media On The Desktop.
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool false
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool false
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
killall -HUP Finder


#Keep folders At Top When Sorting By Name.
defaults write com.apple.finder _FXSortFoldersFirst -bool true
Expand Down Expand Up @@ -54,3 +61,39 @@ defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true

# Minimize Windows Into Their Application’s Icon
defaults write com.apple.dock minimize-to-application -bool true

# Disabled Correct Spelling Automatically
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false

# Show battery percentage
defaults write com.apple.menuextra.battery ShowPercent -string "YES"

# setup Oh my Zsh & Plugins & Themes
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
sudo git clone git://github.com/zsh-users/zsh-autosuggestions /Users/mehran/.oh-my-zsh/plugins/zsh-autosuggestions
sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /Users/mehran/.oh-my-zsh/plugins/zsh-syntax-highlighting
curl -o /Users/mehran/.oh-my-zsh/themes/cobalt2.zsh-theme https://raw.githubusercontent.com/wesbos/Cobalt2-iterm/master/cobalt2.zsh-theme

# Edit Oh My Zsh configure file
sed -i 's/\(^ZSH_THEME=\).*/\ZSH_THEME="cobalt2"/' ~/.zshrc
sed -i '/git/s/ .*/ git zsh-syntax-highlighting zsh-autosuggestions/' ~/.zshrc
chsh -s /bin/zsh

# Remove the “Last login” Message from the Terminal
touch .hushlogin

# Install Powerline Fonts
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
cd ..
rm -rf fonts

# Allow Apps from Anywhere
sudo spctl --master-disable

# Auto change wallpaper after login On Mac
test -d ~/Pictures/Wallpapers/ || mkdir ~/Pictures/Wallpapers/ && mkdir ~/Pictures/Wallpapers/unsplash
curl -o ~/Pictures/Wallpapers/unsplash/login.sh "https://raw.githubusercontent.com/Mehran/MacOS-Config/master/UnsplashBackground.sh" && chmod +x ~/Pictures/Wallpapers/unsplash/login.sh
curl -o ~/Library/LaunchAgents/com.user.loginscript.plist "https://gist.githubusercontent.com/Mehran/86019097a00dc661d2ca5c5820a2bfd1/raw/e399e122f121ed9a4f8d08154efe49ccd617d329/com.user.loginscript"
launchctl load ~/Library/LaunchAgents/com.user.loginscript.plist
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Simple shell scripts I use to tweak MacOS to my liking.

- `BrewConfig.sh` Installs and updates HomeBrew and tools I like.
- `OSConfig.sh` Tweaks OS sittings to how I like them.
- `BrewCask.sh` Download automatically software to how I need them .
- `UnsplashBackground.sh` Downloads an amazing image from Unsplash and sets it as the background.

## Important Notice
Expand Down
1 change: 1 addition & 0 deletions UnsplashBackground.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
mkdir -p ~/Pictures/Wallpapers/
mkdir -p ~/Pictures/Wallpapers/unsplash
rm -f ~/Pictures/Wallpapers/unsplash/"$(date +%F)".png
curl -s -L -o ~/Pictures/Wallpapers/unsplash/"$(date +%F)".png "https://unsplash.it/2560/1600/?random" > /dev/null
Expand Down