Giter Club home page Giter Club logo

dotfiles-backup's Introduction

My configuration files for macOS Thanks

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

These are the various configuration files I use on macOS. I wrote about how you can customize your shell experience in an article here.

You can also see my top used applications, Safari extensions and Alfred workflows I use here.

Contents

Install

git submodule update --init --remote

Install Nix

Follow these instructions: NixOS/nix#3125 (comment) and then these: https://github.com/LnL7/nix-darwin.

I use Nix with Nix Darwin to manage my system configuration. Nix is a declarative language and you can read through my configuration file to see what settings it applies and what programs it installs.

Assuming you have Nix & Nix Darwin installed and this dotfiles repo cloned to ~/.dotfiles, you should first run /run/current-system/sw/bin/darwin-rebuild switch -I darwin-config=$HOME/.dotfiles/nix/darwin.nix. This lets Nix Darwin know that the configuration file it should read is placed inside ~/.dotfiles/darwin.nix.

You can then run darwin-rebuild switch to apply my configuration on your system.

I also use Dotbot to apply appropriate symlinks so that I can keep the original files in this one dotfiles dir. Look here for what exactly it will do. Place this cloned dotfiles repo in ~/.dotfiles/ and run ./install inside it.

Clean install everything

  1. Boot fresh macOS copy.
  2. Go through preferences & set everything up.
  3. Download & install apps from my macOS.
  4. Download dotfiles & set everything up (instructions above).
  5. Download Alfred workflows.
  6. Download KM macros.

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 utilize 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. I generate my config for it with Goku.

Neovim

Vim language is 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 Monokai Night theme with a few plugins. Here is how it looks:

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 a few plugins together with Ayu theme.

Zsh

I am using Zsh as my shell and Antibody to install all my Zsh plugins.

I am also using Monokai Night theme I made for iTerm. Here is how my prompt looks:

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 customizing 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 initialize 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 initialized 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 when I find no commit message is 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

Here are dotfiles I got many ideas from and liked. I also mention Nix configurations I 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.

MIT Twitter

dotfiles-backup's People

Contributors

nikitavoloboev avatar auser avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.