Skip to content
My lovely dots ~/.πŸ’–
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Zsh: Fix bin availability Sep 28, 2018
custom Zsh: Fix issue with .zshlocal. Add custom folder Nov 21, 2018
home Zsh: Fix issue with .zshlocal. Add custom folder Nov 21, 2018
lib Zsh: Add help alias Oct 17, 2018
modules Add zplug submodule Oct 11, 2017
scripts VSCode: Use another spellchecking solution. Oct 19, 2018
vscode VSCode: Update settings.json Nov 21, 2018
.editorconfig Misc: More settings in Editorconfig Sep 19, 2018
.gitignore Zsh: Fix issue with .zshlocal. Add custom folder Nov 21, 2018
.gitmodules
.prettierrc Misc: Fix broken Prettier config Sep 22, 2018
README.md Docs: Document dotfiles alias Sep 27, 2018
installer.sh Zsh: Add better banners for installers Sep 24, 2018
restore.py Sync: Add backups. Dec 24, 2015
sync.py Zsh: Add better banners for installers Sep 24, 2018

README.md

Denys Dovhan’s dotfiles

Spaceship with Hyper and One Dark

There are tons of useful things in here:

  • The usefulness of β€œOh My ZSH!” is already built–in.
  • πŸš€β­οΈ Spaceships ZSH as a prompt.
  • 🐟 Fish-like autosuggestions.
  • Syntax highlighting of commands while they are typed.
  • Automatically closing and deleting of quotes and brackets when you type them.
  • Browser-like substring search for history.
  • 🌺 zplug for dependency management.
  • Useful aliases.
  • Git config, global .gitignore file and aliases.
  • VSCode settings syncronization.
  • Dotfiles synchronization (sync.py) with backup.
  • Restoring old dotfiles (restore.py) from backup.
  • A lot of useful bins.
  • update script for updating dotfiles, npm, brew, gems, etc.

Missing feature? 🍴 Fork this repo and make it better!

Installation

Dotfiles are installed by running one of the following commands in your terminal, just copy one of the following commands and execute in the terminal:

via curl

bash -c "$(curl -fsSL https://raw.githubusercontent.com/denysdovhan/dotfiles/master/installer.sh)"

via wget

bash -c "$(wget https://raw.githubusercontent.com/denysdovhan/dotfiles/master/installer.sh -O -)"

Tell Git who you are using these commands:

git config -f ~/.gitlocal user.email "email@yoursite.com"
git config -f ~/.gitlocal user.name "Name Lastname"

Updating

Use single command to get latest updates:

update

This command will update dotfiles, their dependencies, brew or apt-get packages, global npm dependencies, gems, apm plugins.

Under the hood

Note: You may put your custom settings into ~/.zshlocal.

Projects tree

I suggest you to organize project folder as follows:

~/Projects
β”œβ”€β”€ Forks       # for GitHub fork
β”œβ”€β”€ Job         # for job projects
β”œβ”€β”€ Playground  # for short-term experiments
└── Repos       # for long-term projects

Aliases

Aliases are gonna make your work fast and enjoyable. See code in $DOTFILES/lib/aliases.zsh. Here is what's included:

  • Aliases from Oh-My-Zsh. See Oh-My-Zsh Cheatsheet for more.
  • Easier navigation
    • .. β†’ cd ..
    • ... β†’ cd ../..
    • .... β†’ cd ../../..
    • ..... β†’ cd ../../../..
    • ~ β†’ cd ~
    • - β†’ cd -
  • Folders shortcuts
    • dr β†’ cd ~/Dropbox
    • dl β†’ cd ~/Downloads
    • dt β†’ cd ~/Desktop
    • pj β†’ cd ~/Projects
    • pjr β†’ cd ~/Projects/_Repos
    • pjf β†’ cd ~/Projects/_Forks
    • pl β†’ cd ~/Projects/_Playground/
  • Commands Shortcuts
    • e β†’ $EDITOR
    • +x β†’ chmod +x
    • x+ β†’ chmod +x
    • ll β†’ ls -alF
    • la β†’ ls -A
    • l β†’ ls -CF
  • Open
    • open <FILE> β€” open file from terminal.
    • o <FILE> β€” open file from terminal.
    • oo β€” open current folder.
  • Color conversion
    • hex2hsl <[#]dead00> [alpha] - convert #hex color to HSL/HSLA. #dead00 β†’ hsl(47,99%,44%).
    • hex2rgb <[#]dead00> [alpha] - convert #hex color to RGB/RGBA. #dead00 β†’ rgb(222,173,0).
  • Misc
    • update β€” get updates (Runs $DOTFILES/scripts/update.zsh).
    • dotfiles β€” jump quickly into dotfiles folder.
    • alert β€” throw alert notify message. Add an alert alias for long running commands. Use like so: sleep 10; alert. (Works only when notify-send is available).
    • myip β€” my local IP address.
    • password β€” generate random password, copies it into clipboard and outputs it to terminal.
    • path β€” print $PATH in readable view.
    • getpage β€” download web page with all assets.
    • get β€” download file with original filename.

Oh-My-Zsh plugins

These OMZ plugins are included:

  • git β€” git aliases and functions.
  • npm β€” provides completion as well as adding many useful aliases.
  • yarn β€” the same as for npm, but for yarn
  • nvm β€” auto-sourcing nvm.
  • sudo β€” [Esc] [Esc] to re-run previous command with sudo.
  • extract β€” defines a function called extract that extracts the archive file you pass it, and it supports a wide variety of archive filetypes.
  • ssh-agent β€” automatically starts ssh-agent to set up and load whichever credentials you want for ssh connections.
  • gpg-agent β€” enables gpg-agent if it is not running.

Bin

Dotfiles also include some functions that will make your life easier. See code in bin/.

  • color.js β€” HTML color converter.
  • emptytrash β€” empty the Trash on all mounted volumes and the main HDD.
  • git-changelog β€” generate changelog based on commit history.
  • git-cleanup β€” removes old Git branches and does other cleanup.
  • git-fork β€” add remote upsteam.
  • git-upstream β€” sync branch with upstream.
  • gz β€” get gzipped file size
  • n β€” runs given command using binary in node_modules/.bin of the current project.
  • nyan β€” print nyan cat.
  • osx-shadow β€” add macOS-like shadow to an image.
  • server β€” start an HTTP server from a directory.

Git

Note: Add your git user data and custom settings to ~/.gitlocal.

Configuration

  • UI color is auto.
  • Diff colors are:
    • white bold for meta information;
    • cyan bold for frag;
    • red bold for old lines;
    • green bold for new lines.
  • Default editor is Vim instead of Vi.
  • push.default set as current.
  • Automatic replacement git://github.com/, gh:, github: addresses as git@github.com: for GitHub.
  • Automatic replacement git://gist.github.com/, gst:, gist: addresses as git@gist.github.com: for Gists.
  • User custom settings gets from a ~/.gitlocal file.

Git Aliases

  • git a β†’ git add β€” patch mode for specified files.
  • git ua β†’ git reset HEAD β€” unstage files.
  • git b β†’ git branch β€” list, create, or delete branches.
  • git c β†’ git commit β€” record changes to the repository.
  • git co β†’ git checkout β€” checkout a branch or paths to the working tree.
  • git ap β†’ git add -p β€” add file contents to the index.
  • git ca β†’ git commit -a β€” commit with automatically stage files that have been modified and deleted.
  • git cm β†’ git commit -m β€” commit with commit message.
  • git cam β†’ git commit -am β€” add all files and commit with message.
  • git s β†’ git status -sb β€” short status with current branch.
  • git master β€” go to master branch and pull from remote.
  • git develop β€” go to develop branch and pull from remote.
  • git git β€” do not complain about git git.
  • git l β€” commits log with pretty single line format.
  • git ll β€” log with list of changed files for each commit.
  • git ignore β€” ignore files: append file to .gitignore.
  • git this β€” initialize, add all files and commit.
  • git amend β€” amend last commit.
  • git redo β€” amend last commit with its original message.
  • git undo β†’ reset --mixed HEAD^ β€” reset index changes, but not the working tree.
  • git discard β†’ checkout -- β€” discard changes.
  • git contrib β€” list of contributors and how many commits each person has.
  • git today β€” see how many lines of code you have written today.
  • git stat β€” how many lines of code in repo.
  • git-changelog [-l,--list,-t,--tag] <FILE> β€” generate changelog based on commit history.
  • git-cleanup [--force] β€” removes old Git branches.
  • git-fork <original-author> β€” add remote upstream.
  • git-upstream [branch] β€” sync branch with upstream (as default master).

Bash

If you wanna stand on bash version of dotfiles, please execute following commands inside the ~/.dotfiles folder:

git checkout bash
./sync.py

I do not support bash version anymore, so if you need fixes or new features, please send me a pull request into bash branch. Thank you!

Resources

Resources that I used to make these dotfiles better:

License

MIT Β© Denys Dovhan

You can’t perform that action at this time.