Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denysdovhan/dotfiles
My lovely dots ~/.π
https://github.com/denysdovhan/dotfiles
dotfiles linux macos setup shell ubuntu zsh zsh-custom
Last synced: 4 days ago
JSON representation
My lovely dots ~/.π
- Host: GitHub
- URL: https://github.com/denysdovhan/dotfiles
- Owner: denysdovhan
- Created: 2015-01-19T19:33:03.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-06-20T12:44:46.000Z (5 months ago)
- Last Synced: 2024-10-13T02:08:17.227Z (23 days ago)
- Topics: dotfiles, linux, macos, setup, shell, ubuntu, zsh, zsh-custom
- Language: Shell
- Homepage:
- Size: 474 KB
- Stars: 404
- Watchers: 4
- Forks: 61
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Denys Dovhanβs dotfiles
There are tons of useful things in here:
- The usefulness of [βOh My ZSH!β](http://ohmyz.sh/) is already builtβin.
- [πβοΈ Spaceships](https://github.com/spaceship-prompt/spaceship-prompt) as a prompt.
- π [Fish](https://fishshell.com/)-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.
- [zgen](https://github.com/tarjoilija/zgen) for dependency management.
- Useful [aliases](./lib/aliases.zsh).
- Git config, global `.gitignore` file and aliases.
- Dotfiles synchronization (`sync.py`) with backup.
- Restoring old dotfiles (`restore.py`) from backup.
- A lot of [useful bins](https://github.com/denysdovhan/dotfiles/tree/master/bin).
- `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:
Tell Git who you are using these commands:
```sh
git config -f ~/.gitlocal user.email "[email protected]"
git config -f ~/.gitlocal user.name "Name Lastname"
```Clone dotfiles repo:
```sh
# Clone dotfiles repo
git clone https://github.com/denysdovhan/dotfiles.git $HOME/.dotfiles# Go to the dotfiles directory
cd $HOME/.dotfiles# Install dotfiles
./install
```## Updating
Use single command to get latest updates:
```
update
```This command will update dotfiles, their dependencies, `brew` or `apt-get` packages, global `npm` dependencies, `gem`s, `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](https://github.com/robbyrussell/oh-my-zsh/wiki/Cheatsheet#commands) for more.
- Easier navigation
- **`..`** β `cd ..`
- **`...`** β `cd ../..`
- **`....`** β `cd ../../..`
- **`.....`** β `cd ../../../..`
- **`~`** β `cd ~`
- **`-`** β `cd -`
- Folders shortcuts
- **`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 `** β open file from terminal.
- **`o `** β open file from terminal.
- **`oo`** β open current folder.
- Misc
- **`update`** β get updates (Runs `$DOTFILES/scripts/update.zsh`).
- **`dotfiles`** β jump quickly into dotfiles folder.
- **`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`](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/git) β git aliases and functions.
- [`npm`](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/npm) β provides completion as well as adding many useful aliases.
- [`yarn`](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/yarn) β the same as for `npm`, but for `yarn`
- [`nvm`](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/nvm) β auto-sourcing `nvm`.
- [`sudo`](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/sudo) β `[Esc] [Esc]` to re-run previous command with sudo.
- [`ssh-agent`](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/ssh-agent) β automatically starts ssh-agent to set up and load whichever credentials you want for ssh connections.
- [`gpg-agent`](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/gpg-agent) β enables `gpg-agent` if it is not running.
- More are listed in `.zshrc` (it's hard to keep the list updated).### Bin
Dotfiles also include some functions that will make your life easier. See code in [`bin/`](./bin).
- `emptytrash` β empty the Trash on all mounted volumes and the main HDD.
- `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](https://www.youtube.com/watch?v=QH2-TGUlwu4).
- `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](http://www.vim.org/) instead of [Vi](http://www.tutorialspoint.com/unix/unix-vi-editor.htm).
- `push.default` set as `current`.
- Automatic replacement `git://github.com/`, `gh:`, `github:` addresses as `[email protected]:` for GitHub.
- Automatic replacement `git://gist.github.com/`, `gst:`, `gist:` addresses as `[email protected]:` 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 sync`** β pull and push changes from/to remote.
- **`git-root`** β go to repo root.
- **`git-cleanup [--force]`** β removes old Git branches.
- **`git-fork `** β add remote upstream.
- **`git-upstream [branch]`** β sync branch with upstream (as default `master`).## Resources
Resources that I used to make these dotfiles better:
- [GitHub β€ ~/](http://dotfiles.github.com/)
- [Artem Sapeginβs dotfiles](https://github.com/sapegin/dotfiles)
- [Mathiasβs dotfiles](https://github.com/mathiasbynens/dotfiles)## License
MIT Β© [Denys Dovhan](https://denysdovhan.com)