Skip to content

izzygomez/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Izzy's dotfiles, powered by Dotbot. 🤖

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published