denysdovhan / Dotfiles
Programming Languages
Projects that are alternatives of or similar to Dotfiles
Denys Dovhanโs dotfiles
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 protected]"
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, 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 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. -
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 fornpm
, but foryarn
-
nvm
โ auto-sourcingnvm
. -
sudo
โ[Esc] [Esc]
to re-run previous command with sudo. -
extract
โ defines a function calledextract
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
โ enablesgpg-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 innode_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 ascurrent
. - 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 tomaster
branch and pull from remote. -
git develop
โ go todevelop
branch and pull from remote. -
git git
โ do not complain aboutgit 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 defaultmaster
).
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:
- GitHub โค ~/
- Artem Sapeginโs dotfiles
- Mathiasโs dotfiles
- Yet another cool story about bash prompt
License
MIT ยฉ Denys Dovhan