From cec30766ac35fdf94dbf7577833cc6545819ca18 Mon Sep 17 00:00:00 2001 From: Ben Kreeger Date: Thu, 19 Jun 2025 14:08:24 -0500 Subject: [PATCH] Update README --- README.md | 24 ++++++++++++++++-------- lazygit/config.yml | 0 zsh/functions.zsh | 22 +++------------------- 3 files changed, 19 insertions(+), 27 deletions(-) create mode 100644 lazygit/config.yml diff --git a/README.md b/README.md index 8e62968..ecec940 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,22 @@ My dotfiles. Also works with the following repos: -- [kreeger/nvimrc](https://git.kree.gr/kreeger/nvimrc) -- [kreeger/zshrc](https://git.kree.gr/kreeger/zshrc) -- [kreeger/tmuxrc](https://git.kree.gr/kreeger/tmuxrc) +To use, clone this repo (and its submodules!) to `$XDG_CONFIG_HOME/dotfiles` (on +my macOS machine, I have this set to `~/.config` instead of +`~/Library/Application Support`). -To use, clone this repo to `$HOME/.config/dotfiles` and run `setup.sh`. This -makes sure those three repos are cloned to their `$HOME/.config`-equivalent -homes, that the `zshrc` file is symlinked to my home directory, and that any -other dotfiles in this repo also get symlinked to home. +```bash +$ git clone --recurse-submodules \ + https://git.kree.gr/kreeger/dotfiles \ + $XDG_CONFIG_HOME/dotfiles +$ $XDG_CONFIG_HOME/dotfiles/setup.sh +``` + +This will make sure my `zsh` config is symlinked to the right place, and then +everything else will be symlinked to `$XDG_CONFIG_HOME` to conform to the [XDG +base directory specification][xdg]. My `zshrc` files also include a function (`update_dotfiles`) to do a `git pull` -on each of these repos to help me keep things up-to-date. +on this repo to keep things up-to-date. + +[xdg]: https://specifications.freedesktop.org/basedir-spec/latest/ diff --git a/lazygit/config.yml b/lazygit/config.yml new file mode 100644 index 0000000..e69de29 diff --git a/zsh/functions.zsh b/zsh/functions.zsh index 1d86be6..854ee06 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -68,26 +68,10 @@ function devcshell() { # Dotfile update command(s) function update_dotfiles() { - # Update zsh - echo "Fetching latest ZSH." - cd $HOME/.config/zsh - git pull origin main > /dev/null 2>&1 - - # Update NeoVim - echo "Fetching latest NeoVim." - cd $HOME/.config/nvim + echo "Fetching latest dotfiles." + cd $XDG_CONFIG_HOME/dotfiles git pull origin main > /dev/null 2>&1 + sh $XDG_CONFIG_HOME/dotfiles/setup.sh > /dev/null 2>&1 nvim --headless "+Lazy! install" +qa > /dev/null 2>&1 nvim --headless "+Lazy! clean" +qa > /dev/null 2>&1 - - # Update tmux - echo "Fetching latest tmux." - cd $HOME/.config/tmux - git pull origin main > /dev/null 2>&1 - - # Update my dotfiles - echo "Fetching latest dotfiles." - cd $HOME/.config/dotfiles - git pull origin main > /dev/null 2>&1 - sh $HOME/.config/dotfiles/setup.sh > /dev/null 2>&1 }