Skip to content

Commit

Permalink
feat: dots_diff
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Jan 3, 2025
1 parent a07cac1 commit 19526dd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v1.3.0 (2025-01-03)

- Adds `dots_diff` as a command to see what dotfiles have changed

## v1.2.1 (2024-12-30)

- Dotfile checking was previously too aggressive on every shell invocation which lead to slow shell starts. Dots will now only check the dotfiles status on first boot and once every 72 hours after that if machine stays on
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ dots_clean
# Get the status of the dotfiles
dots_status

# Get the diff of the dotfiles
dots_diff

# Show the list of dotfiles installed
dots_list

Expand Down
7 changes: 6 additions & 1 deletion src/dots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DOTFILES_DIR="$HOME/.dotfiles" # Cannot be `~/.dots` as we will use this for int
DOTS_CONFIG_FILE="$DOTFILES_DIR/dots-config.sh"

# Dots required variables (DO NOT EDIT)
DOTS_VERSION="v1.2.1"
DOTS_VERSION="v1.3.0"
HOSTNAME="$(hostname)" # Required for macOS as it's not set automatically like it is on Linux
DOTS_HOME_DIR="$HOME/.dots"
DOTS_DIR="$DOTFILES_DIR/dots/src"
Expand Down Expand Up @@ -183,6 +183,11 @@ dots_status() {
git -C "$DOTFILES_DIR" status -s -b || echo "Couldn't check remote Dotfiles"
}

# Gets the diff of dotfiles
dots_diff() {
git -C "$DOTFILES_DIR" diff
}

# Syncs dotfiles from your local machine to and from your dotfiles repo
dots_sync() {
echo "Dots is about to sync your Dotfiles, this process may override your current Dotfiles. Press any key to continue."
Expand Down

0 comments on commit 19526dd

Please sign in to comment.