Skip to content

punyavashist/dotfiles

 
 

Repository files navigation

My configuration files for macOS Thanks

Zsh, Karabiner, VS Code, Sublime, Neovim, Nix, Hammerspoon

img

These are the various configuration files I use on macOS. I wrote about how you can customise your shell experience in an 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 install assumes that this repository is placed in ~/.dotfiles dir.

This will automatically setup all the configuration files using Dotbot. Look here for what exactly it will do.

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:

img

VS Code

My main editor of choice is VS Code since it has 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 and Antibody to install all my zsh plugins.

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

img

a is alias for exa

Aliases and functions

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

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

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

Commit and push repository to GitHub

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 when I find no commit message necessary.

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

Clone current url in clipboard

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

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

Trash files / folders

A lot safer than to 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 often now for fuzzy searching for files to open with neovim, or fuzzy searching through my commit messages and more. Here are all the functions I use with it.

Interesting dotfiles

These are dotfiles I got many ideas from and liked.

Interesting Nix configs

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, Karabiner, VS Code, Sublime, Neovim, Nix, Hammerspoon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 61.6%
  • Shell 30.1%
  • Lua 8.0%
  • Python 0.3%