Skip to content

qgbest/dotfiles

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

663 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

My configuration files for macOS Thanks

Includes Zsh, Neovim, Karabiner, Hammerspoon, VS Code

These are the various configuration files I use on macOS. I wrote about how I customise and use my shell in article here.

You can also see my top used applications, safari exensions and alfred workflows I use here.

Contents

Install

To install my configration, clone the repository and run: ./install.

This will automatically setup all the configuration files using Dotbot.

I describe my custom configuration I use below. It is heavily tailored to my own workflow so it is best you take ideas from it rather than copying the entire config.

Karabiner

img

The most exciting thing in here is probably how I utilise Karabiner. It has absolutely transformed the way I interact with my computer and there is no going back now.

I go over how I use Karabiner in detail here. And my config for it can be seen here.

Neovim

The best text editing experience you will ever get. It is worth learning it as you will start thinking about text editing differently.

My Neovim config can be seen here. I use Ayu theme with many plugins. Here is how it looks:

VS Code

My main editor of choice is VS Code since it has very well built vim mode.

Configs I use for it can be seen here. And here is a list of extensions I use.

Sublime Text

I use it primarily to edit markdown files like my wiki. I also edit config files and open large and small files for quick edits.

I use many plugins together with Ayu theme.

Hammerspoon

I don't use Hammerspoon as extensively however I am looking into implementing more of its features into my workflow.

Zsh

I am using Zsh as my shell with Antibody plugin manager.

I am also using Ayu theme I made in Zsh. Here is how my prompt looks like:

a is alias for exa

Zsh aliases

I use many aliases to get around my system as fast as possible. You can view them all here.

Interesting aliases and functions

There is quite a lot of awesome programs I use from my command line. You can see here for some of them.

I also love customising my shell experience with various aliases and zsh functions. Here are some that I like and use very often:

Commit and push repository to GitHub in one command

ggi() {
    git init
    mit
    git add .
    git commit -m "Init"
    git remote add origin $(osascript -e 'tell application "Safari" to return URL of front document')
    git push -u origin master
}

Say I created some project and wrote some code in it or added a simple README with some text in it. I then go on to create a new GitHub repository and give it a name. After that I just run this ggi command.

It will initialise my current directory with git if it wasn't already. It will then call this function :

mit() {
  license-up mit Nikita Voloboev nikitavoloboev.xyz
  git add license
}

Which using this CLI tool, will create a license file and git add it. It will then take the URL of my current browser window which will be at the newly created repository, point the local git repo to push there and push it.

And thus in one command I initialised and pushed the repo. To create a new repo quickly I use this Alfred workflow.

Commit all with generic update message

I use this command often.

ggs() {
    git add .
    git commit . -m 'update'
    git push
}

It will simply add all files and commit them. I don't use this when working with code but for making some changes or for updating this dotfiles repo for example, I just use this. Saves a lot of time.

Clone current url in clipboard

gll(){
    git clone "$(pbpaste)"
}

I use this very often to quickly clone the URL that I copied from GitHub.

Trash files / folders

A lot more safer than rm -rf files as you can always check out ~/.Trash in cases of emergency or mistakes.

re(){
  mv "$1" ~/.Trash
}

Fzf

fzf is a command line tool that lets you fuzzy search on text. I use it very often now for fuzzy searching for files to open with neovim, or fuzzy searching through my commit messages and more.

Here are some of my favourite commands I use with it:

Search for files to edit in current dir

fe() {
  local files
  IFS=$'\n' files=($(fzf-tmux --query="$1" --multi --select-1 --exit-0))
  [[ -n "$files" ]] && nvim "${files[@]}"
}

This command will let me fuzzy search for a file to open from the directory I am currently in. I use it a lot.

Since I also use VS Code as my primary editor, I use this command too :

fw() {
  local files
  IFS=$'\n' files=($(fzf-tmux --query="$1" --multi --select-1 --exit-0))
  [[ -n "$files" ]] && code "${files[@]}"
}

Which does the same thing but opens the files in VS Code instead of neovim.

Interesting dotfiles

These are dotfiles I got many ideas from and liked.

Contributing

Suggestions on how I can improve the structure of these dotfiles as well as suggesting new and awesome tools are welcome.

Thank you πŸ’œ

You can support me on Patreon or look into other projects I shared.

License

MIT Β© Nikita Voloboev

About

🏑 Zsh, Neovim, Karabiner, Hammerspoon, VS Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Vim Script 52.7%
  • Shell 29.1%
  • Python 11.4%
  • Lua 6.8%