forked from lewagon/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
102 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"bootstrapped": true, | ||
"installed_packages": | ||
[ | ||
"AdvancedNewFile", | ||
"All Autocomplete", | ||
"ApplySyntax", | ||
"BracketHighlighter", | ||
"DocBlockr", | ||
"Emmet", | ||
"Git", | ||
"GitGutter", | ||
"JSX", | ||
"Package Control", | ||
"Ruby on Rails snippets", | ||
"SCSS", | ||
"Solarized Color Scheme", | ||
"Theme - SoDaReloaded" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"color_scheme": "Packages/Solarized Color Scheme/Solarized (dark).tmTheme", | ||
"detect_indentation": false, | ||
"draw_white_space": true, | ||
"ensure_newline_at_eof_on_save": true, | ||
"folder_exclude_patterns": | ||
[ | ||
"tmp", | ||
"log", | ||
".git", | ||
"_site", | ||
".bundle", | ||
".sass-cache", | ||
"build" | ||
], | ||
"highlight_modified_tabs": true, | ||
"hot_exit": false, | ||
"ignored_packages": | ||
[ | ||
"Vintage" | ||
], | ||
"remember_open_files": false, | ||
"rulers": | ||
[ | ||
80 | ||
], | ||
"tab_size": 2, | ||
"theme": "SoDaReloaded Dark.sublime-theme", | ||
"translate_tabs_to_spaces": true, | ||
"trim_automatic_white_space": true, | ||
"trim_trailing_white_space_on_save": true, | ||
"use_tab_stops": true, | ||
"wordWrap": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1 @@ | ||
Install | ||
------- | ||
|
||
**Assumption**: you have [`oh-my-zsh`](http://ohmyz.sh/) is already installed. | ||
|
||
Your dotfiles are personal. [Fork this repo](https://github.com/lewagon/dotfiles/fork) on Github, and then clone it on your computer. | ||
|
||
``` | ||
# Don't blindly copy paste this line, type it and put *your* | ||
$ export GITHUB_USERNAME=my_github_username | ||
``` | ||
|
||
``` | ||
# Sure you did not just copy paste the previous line? Sure? OK go on! | ||
# You can now blinly copy paste this line *without changing anything* | ||
$ mkdir -p ~/code/$GITHUB_USERNAME && cd $_ && git clone [email protected]:$GITHUB_USERNAME/dotfiles.git && cd dotfiles | ||
``` | ||
|
||
Run the `dotfiles` installer. It will prompt you for your name and your email. | ||
|
||
```bash | ||
$ zsh install.sh | ||
``` | ||
|
||
You're all set! Go back to [lewagon/setup](https://github.com/lewagon/setup) | ||
Once this repo is forked, go back to [lewagon/setup](https://github.com/lewagon/setup) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
echo "Type in your first and last name (no accent or special characters - e.g. 'ç'): " | ||
read full_name | ||
echo "Type in your email address (the one used for your GitHub account): " | ||
read email | ||
|
||
git config --global user.email $email | ||
git config --global user.name $full_name | ||
|
||
git add . | ||
git commit --message "My identity for @lewagon in the gitconfig" | ||
git push origin master | ||
|
||
git remote add upstream [email protected]:lewagon/dotfiles.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
.DS_Store | ||
# Mac OSX Finder hidden files | ||
.DS_Store | ||
|
||
# Figaro gem | ||
config/application.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
backup() { | ||
target=$1 | ||
if [ -e "$target" ]; then # Does the config file already exist? | ||
if [ ! -L "$target" ]; then # as a pure file? | ||
mv "$target" "$target.backup" # Then backup it | ||
echo "-----> Moved your old $target config file to $target.backup" | ||
fi | ||
fi | ||
} | ||
|
||
#!/bin/zsh | ||
for name in *; do | ||
if [ ! -d "$name" ]; then | ||
target="$HOME/.$name" | ||
if [[ ! "$name" =~ '\.sh$' ]] && [ "$name" != 'README.md' ]; then | ||
if [ -e "$target" ]; then # Does the config file already exist? | ||
if [ ! -L "$target" ]; then # as a pure file? | ||
mv "$target" "$target.backup" # Then backup it | ||
echo "-----> Moved your old $target config file to $target.backup" | ||
fi | ||
fi | ||
backup $target | ||
|
||
if [ ! -e "$target" ]; then | ||
echo "-----> Symlinking your new $target" | ||
|
@@ -36,34 +41,32 @@ if [ ! -d "$ZSH_PLUGINS_DIR/zsh-history-substring-search" ]; then | |
fi | ||
cd "$CURRENT_DIR" | ||
|
||
|
||
echo "Type in your first and last name (no accent or special characters - e.g. 'ç'): " | ||
read full_name | ||
echo "Type in your email address (the one used for your GitHub account): " | ||
read email | ||
git config --global user.email $email | ||
git config --global user.name $full_name | ||
|
||
setopt nocasematch | ||
if [[ ! `uname` =~ "darwin" ]]; then | ||
git config --global core.editor "subl -n -w $@ >/dev/null 2>&1" | ||
echo 'export BUNDLER_EDITOR="subl $@ >/dev/null 2>&1"' >> zshrc | ||
else | ||
git config --global core.editor "'/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl' -n -w" | ||
bundler_editor="'/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl'" | ||
git config --global core.editor "'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl' -n -w" | ||
bundler_editor="'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'" | ||
echo "export BUNDLER_EDITOR=\"${bundler_editor}\"" >> zshrc | ||
fi | ||
|
||
git add . | ||
git commit --message "My identity for @lewagon in the gitconfig" | ||
git push origin master | ||
|
||
git remote add upstream [email protected]:lewagon/dotfiles.git | ||
# Sublime Text | ||
if [[ ! `uname` =~ "darwin" ]]; then | ||
SUBL_PATH=~/.config/sublime-text-3 | ||
else | ||
SUBL_PATH=~/Library/Application\ Support/Sublime\ Text\ 3 | ||
fi | ||
mkdir -p $SUBL_PATH/Packages/User $SUBL_PATH/Installed\ Packages | ||
backup "$SUBL_PATH/Packages/User/Preferences.sublime-settings" | ||
curl https://sublime.wbond.net/Package%20Control.sublime-package > $SUBL_PATH/Installed\ Packages/Package\ Control.sublime-package | ||
ln -s $PWD/Preferences.sublime-settings $SUBL_PATH/Packages/User/Preferences.sublime-settings | ||
ln -s $PWD/Package\ Control.sublime-settings $SUBL_PATH/Packages/User/Package\ Control.sublime-settings | ||
|
||
zsh ~/.zshrc | ||
|
||
if [[ `uname` =~ "darwin" ]]; then | ||
echo "Quit your terminal (⌘ + Q) and restart it." | ||
echo "Quit your terminal and restart it (⌘ + Q)." | ||
else | ||
echo "Quit your terminal (Alt + F4) and restart it." | ||
echo "Quit your terminal and restart it (Alt + F4)." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters