/dotfiles

Dotfiles and 🤖 and stuff

Primary LanguageShellMIT LicenseMIT

Build Status

Dotfiles AKA ZORDinator

Heavily based on @FabioAntunes ones. Thanks bud 👍

Its focus is to hold everything that I need to be productive in any Unix based env.

So, behold, ZORDinator, the maker of ZORDS!

image

(For reference the pun resides in the fact that all my machines have some kind of ZORD in its name - e.g. megaZORD, brutoZORD)

About

I use:

  • fish
  • neovim
  • terminator/iTerm2
  • ubuntu based OSes
  • OSX sometimes
  • other stuff I don't actually remember

So that's basically what you're going to get here 👀

Installation

Clone this repo

First step, clone this repo, because I'm lazy and this are my dotfiles, they need to be placed in ~/github/dotfiles

$ git clone https://github.com/JGAntunes/dotfiles.git ~/github/dotfiles --recurse-submodules

Oh btw I'm using some git submodules.

Run the init script

$ bash init.sh

After all this it will set 🐟 as your default shell, and it will start the init.fish script

NOTE

Some operations require sudo permissions, your password will be asked a couple of times and sent to a random server so I can take over all your data. 👌

Global functions

After running both the init.sh and init.fish there will be a couple functions available globally.

zordinator

This is the main function that allows us run all the commands related to dotfiles, it has autocompletion enabled just type zordinator - and press tab. If no args are passed to the zordinator function, all the options will be executed in this order:

  1. create symlinks, any existing symlinks will be preserved.
  2. install fisherman
  3. install vim plug Plugins

If we use the -f/--force it will run all the options above, but won't preserve any symlinks

The next args allows you to run the function in a granular way, feel free to combine multiple args

  • -f/--force - it will overwrite existing symlinks
  • -s/--symlink - create symlinks, this options will ignore already created symlinks. If a regular file already exists, it will be renamed aka backup file. Combine with the -f/--force
  • -m/--fisherman - install fisherman and it's plugins.
  • -v/--vimplug - install vim and nvim Plugins.

At the end it will output all the symlinks created, any errors creating symlinks and any backup files created.

Post install

All the paths should direct you to the dotfiles! There's a post_exec function inside the config.fish, that:

  • For OSX:
    • Listens for any brew install and brew cask install.
    • Dumps a Brewfile, commits and pushes it.
    • The message will be Updated Brewfile :beer:. You can change this by setting $DOTFILES_MSG to whatever you want.
  • For Linux:
    • Listens for any apt{-get} install.
    • Adds a line to the .dpkg.list with the installed software.
    • The message will be Updated dpkg list with <installed_package>. You can change this by setting $DOTFILES_MSG to whatever you want.

TODO document nvim stuff