Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ wt help
```

The installer will:
1. Copy the toolkit to `~/.config/wt/`
1. Copy the toolkit to `~/.wt/`
2. Add sourcing to your shell rc file
3. Prompt for workspace paths (main repo, worktrees, metadata vault)
4. Create required directories
Expand Down Expand Up @@ -196,26 +196,26 @@ To set it up manually:

```bash
# Create log directory
mkdir -p ~/.config/wt/logs
mkdir -p ~/.wt/logs

# Edit crontab
crontab -e

# Add this line to run nightly at 2am (uses login shell for full PATH):
0 2 * * * /bin/zsh -lc '~/.config/wt/lib/wt-ijwb-refresh' >> ~/.config/wt/logs/ijwb-refresh.log 2>&1
0 2 * * * /bin/zsh -lc '~/.wt/lib/wt-ijwb-refresh' >> ~/.wt/logs/ijwb-refresh.log 2>&1
```

You can also run the script manually:

```bash
# Refresh all .ijwb directories and re-export to vault
~/.config/wt/lib/wt-ijwb-refresh
~/.wt/lib/wt-ijwb-refresh

# Preview what would be refreshed (dry run)
~/.config/wt/lib/wt-ijwb-refresh --dry-run
~/.wt/lib/wt-ijwb-refresh --dry-run

# Refresh targets files only (skip re-export step)
~/.config/wt/lib/wt-ijwb-refresh --no-export
~/.wt/lib/wt-ijwb-refresh --no-export
```

The refresh script:
Expand Down
4 changes: 2 additions & 2 deletions bin/wt-add
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ LIB_DIR="$SCRIPT_DIR/../lib"
# Bootstrap: source wt-common from lib/
if [[ -f "$LIB_DIR/wt-common" ]]; then
. "$LIB_DIR/wt-common"
elif [[ -f "$HOME/.config/wt/lib/wt-common" ]]; then
. "$HOME/.config/wt/lib/wt-common"
elif [[ -f "$HOME/.wt/lib/wt-common" ]]; then
. "$HOME/.wt/lib/wt-common"
else
echo "Error: Cannot find wt-common" >&2
exit 1
Expand Down
4 changes: 2 additions & 2 deletions bin/wt-cd
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ LIB_DIR="$SCRIPT_DIR/../lib"
# Bootstrap: source wt-common from lib/
if [[ -f "$LIB_DIR/wt-common" ]]; then
. "$LIB_DIR/wt-common"
elif [[ -f "$HOME/.config/wt/lib/wt-common" ]]; then
. "$HOME/.config/wt/lib/wt-common"
elif [[ -f "$HOME/.wt/lib/wt-common" ]]; then
. "$HOME/.wt/lib/wt-common"
else
echo "Error: Cannot find wt-common" >&2
exit 1
Expand Down
4 changes: 2 additions & 2 deletions bin/wt-ijwb-export
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ LIB_DIR="$SCRIPT_DIR/../lib"
# Bootstrap: source wt-common from lib/
if [[ -f "$LIB_DIR/wt-common" ]]; then
. "$LIB_DIR/wt-common"
elif [[ -f "$HOME/.config/wt/lib/wt-common" ]]; then
. "$HOME/.config/wt/lib/wt-common"
elif [[ -f "$HOME/.wt/lib/wt-common" ]]; then
. "$HOME/.wt/lib/wt-common"
else
echo "Error: Cannot find wt-common" >&2
exit 1
Expand Down
4 changes: 2 additions & 2 deletions bin/wt-ijwb-import
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ LIB_DIR="$SCRIPT_DIR/../lib"
# Bootstrap: source wt-common from lib/
if [[ -f "$LIB_DIR/wt-common" ]]; then
. "$LIB_DIR/wt-common"
elif [[ -f "$HOME/.config/wt/lib/wt-common" ]]; then
. "$HOME/.config/wt/lib/wt-common"
elif [[ -f "$HOME/.wt/lib/wt-common" ]]; then
. "$HOME/.wt/lib/wt-common"
else
echo "Error: Cannot find wt-common" >&2
exit 1
Expand Down
4 changes: 2 additions & 2 deletions bin/wt-list
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ LIB_DIR="$SCRIPT_DIR/../lib"
# Bootstrap: source wt-common from lib/
if [[ -f "$LIB_DIR/wt-common" ]]; then
. "$LIB_DIR/wt-common"
elif [[ -f "$HOME/.config/wt/lib/wt-common" ]]; then
. "$HOME/.config/wt/lib/wt-common"
elif [[ -f "$HOME/.wt/lib/wt-common" ]]; then
. "$HOME/.wt/lib/wt-common"
else
echo "Error: Cannot find wt-common" >&2
exit 1
Expand Down
4 changes: 2 additions & 2 deletions bin/wt-remove
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ LIB_DIR="$SCRIPT_DIR/../lib"
# Bootstrap: source wt-common from lib/
if [[ -f "$LIB_DIR/wt-common" ]]; then
. "$LIB_DIR/wt-common"
elif [[ -f "$HOME/.config/wt/lib/wt-common" ]]; then
. "$HOME/.config/wt/lib/wt-common"
elif [[ -f "$HOME/.wt/lib/wt-common" ]]; then
. "$HOME/.wt/lib/wt-common"
else
echo "Error: Cannot find wt-common" >&2
exit 1
Expand Down
4 changes: 2 additions & 2 deletions bin/wt-switch
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ LIB_DIR="$SCRIPT_DIR/../lib"
# Bootstrap: source wt-common from lib/
if [[ -f "$LIB_DIR/wt-common" ]]; then
. "$LIB_DIR/wt-common"
elif [[ -f "$HOME/.config/wt/lib/wt-common" ]]; then
. "$HOME/.config/wt/lib/wt-common"
elif [[ -f "$HOME/.wt/lib/wt-common" ]]; then
. "$HOME/.wt/lib/wt-common"
else
echo "Error: Cannot find wt-common" >&2
exit 1
Expand Down
8 changes: 4 additions & 4 deletions completion/wt.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
#
# Usage:
# 1. Place this file as: completion/wt.bash
# 2. Have install.sh copy it into ~/.config/wt/wt.bash
# 2. Have install.sh copy it into ~/.wt/wt.bash
# 3. In ~/.bashrc (or ~/.bash_profile), add:
# [[ -f "$HOME/.config/wt/wt.bash" ]] && source "$HOME/.config/wt/wt.bash"
# [[ -f "$HOME/.wt/wt.bash" ]] && source "$HOME/.wt/wt.bash"

# --- Load shared config (wt-common) if available ---
if [[ -f "$HOME/.config/wt/lib/wt-common" ]]; then
. "$HOME/.config/wt/lib/wt-common"
if [[ -f "$HOME/.wt/lib/wt-common" ]]; then
. "$HOME/.wt/lib/wt-common"
fi

# --- Helper: resolve which repo to use for branch completion ---
Expand Down
4 changes: 2 additions & 2 deletions completion/wt.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
# This file is designed for personal use.

# --- Load shared config (wt-common) if available ---
if [[ -r "$HOME/.config/wt/lib/wt-common" ]]; then
source "$HOME/.config/wt/lib/wt-common"
if [[ -r "$HOME/.wt/lib/wt-common" ]]; then
source "$HOME/.wt/lib/wt-common"
fi

# --- Helper: resolve which repo to use for branch completion ---
Expand Down
Loading