Giter Site home page Giter Site logo

dotfiles's Introduction

Izzy's Dotfiles

Personal dotfiles setup (huh?) using anishathalye/dotbot.

Usage

For more instructions, check this blog post out. This section will briefly detail common flows.

Adding a dotfile

  1. Copy dotfile into this repo (no leading dot!), & make backup
> cd dotfiles
> cp ~/.dotfile ./dotfile
> mv ~/.dotfile ~/.dotfile-backup
  1. Add new dotfile into install.conf.yaml
link:
  ~/.dotfile: dotfile
  1. Run install script, & delete backup if successful
> ./install
...
==> All tasks executed successfully
> rm ~/.dotfile-backup

Installing dotfiles on new machine

  1. Clone & install dotfiles
> git clone https://github.com/izzygomez/dotfiles --recursive
> cd dotfiles
> ./install
  1. Install new dotfile updates
> git pull
> ./install

Misc

Machine-specific configuration

Ideally, this dotfiles setup should work out-of-the-box on any machine, regardless of OS & availability of packages. In order to accomplish this, config dotfiles should be split & organized in such a way that settings are only applied for certain machine specs & depending on package availability.

This effort is a ๐Ÿšง work in progress ๐Ÿšง. As an example, see usage of methods in zsh/checkers.sh to see how this can be accomplished.

Shell script formatting

Shell scripts in this repo should be formatted with the following command:

shfmt -i 4 -w FILE-NAME

The -i 4 flag specifies to use 4 spaces for indentation, & the -w flag overwrites FILE-NAME in place. This is not automatically enforced yet (see TODOs below).

Submodules

Our submodule pointers can be updated by simply pulling new changes

cd submodule
git checkout {main,master,...}
git pull

& then returning to the dotfiles repo & commiting the updates

cd ..  # should be in dotfiles/ after running this
git add submodule; git commit -m "update `submodule`"; git push

Note that git restore submodule does not discard working directory changes as one might expect. To revert the submodule pointer to what it was before, either do as above but instead git checkout the previous commit hash, or run git submodule update --init.

TODOs

  • Consider writing a script that can be run to enumerate dot files in ~ that need to be ported into this repo & output diff to console output. Can create some sort of "ignore" list to not print out, e.g. .zsh_history.
  • Figure out how to synchronize tmux plugins across machines, i.e. automate the following currently-manual steps of having to install plugins the first time tmux is run:
> git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
> tmux source ~/.tmux.conf
# in tmux, press C-a (prefix) + I (capital "i")
  • Auto-enforce formatting of shell-like files. See "Shell script formatting" section above.
  • emacs, undo-tree package: currently setting up undo tree history files to be saved in ~/.emacs.d/undo-tree-histories, but there's no mechanism to delete history files for files that have been deleted (or possibly even handle cases where files are renamed?). Investigate this & fix.
  • emacs is not working well on raspi setup: the diff-hl-mode related code for uncommitted changes is not working well (something related to the add-hook line?).
  • Seems like "Save Changes" setting on iTerm2 > Settings > General > Preferences is not configurable via defaults (see this commit for usage example), so TODO here is to set value of this setting to "Automatically" via some other method; for the moment, am doing this via an echo statement in zshrc_macos.

dotfiles's People

Contributors

izzygomez avatar

Watchers

 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.