Compare commits

..

7 Commits

Author SHA1 Message Date
c440b6423b install.sh: repoint dangling claude symlink to latest installed version
The committed ~/.local/bin/claude symlink targets a specific Claude Code
version path (whatever was current when this snapshot was taken). On any
host that has Claude Code installed at a different version, that symlink
arrives dangling.

Old behavior: just delete the dangling link and rely on the Claude
installer to recreate it. That doesn't help when the host has Claude
installed but at a version other than the one in the snapshot, and we
also support skipping the installer via DRUNKENDOTFILES_SKIP_CLAUDE=1
(used when the binary is already on disk but at a different version).

New behavior: when the deployed symlink is dangling, scan
~/.local/share/claude/versions/ and repoint the symlink to the highest
installed version (semver sort). Only fall back to deleting the link if
no version is installed at all.
2026-05-06 09:45:52 +00:00
3b1bb11960 tmux: enable truecolor + focus-events for TUI apps
- Switch default-terminal from screen-256color to tmux-256color
  (better italics/undercurl/SGR support for nvim, Claude Code, etc.)
- Add terminal-features RGB for the common outer terminals so
  truecolor escape sequences pass through cleanly
- Enable focus-events so inner programs can redraw when the pane
  regains focus
2026-05-06 09:37:20 +00:00
2f278a8852 Pin git identity to dissimulo / connect+gitea@dustin-williams.com
Identity was previously deferred to ~/.gitconfig.user via the include
at the bottom of this file. Per the dotfiles owner, identity should
travel with the dotfiles regardless of host or local user — every
machine where this repo is deployed commits as dissimulo.

Per-machine bits (safe.directory, etc.) still belong in
~/.gitconfig.user, which the existing [include] at the bottom picks
up after this block.
2026-05-06 02:26:08 -07:00
d0316e45b5 Add ~/.local/bin to PATH from prezto-override zshrc
The Claude Code installer drops the binary at ~/.local/bin/claude.
Without this PATH entry, freshly-installed Claude Code is invisible to
new shells until the user adds it manually. Other ~/.local/bin scripts
in this dotfiles repo (tmux-ip, tmux-window-icon, twitterbot, etc.)
benefit from the same.
2026-05-06 02:24:33 -07:00
526ad252b0 Make tmux/tmux.conf a relative symlink to ../.tmux.conf
YADR's Rakefile maps tmux/tmux.conf -> $HOME/.tmux.conf, but the
canonical, customized tmux config has lived at the repo root since
3d2508a (when the relationship was inverted). Re-running rake install
on its own (without the bash installer's subsequent personal-deploy
overlay) was therefore replacing the deployed real .tmux.conf with a
symlink to the older 3987-byte tmux/tmux.conf, dropping the IP/host
status-right and the bumped history limit.

Pointing tmux/tmux.conf at ../.tmux.conf via a relative symlink fixes
this on any machine, regardless of where ~/.yadr lives or which user
owns it: rake install's symlink chain now resolves to the customized
config no matter the install order.
2026-05-06 02:24:32 -07:00
5bed5f7746 gitconfig: use absolute include path for .gitconfig.user
Some checks failed
Close stale issues / stale (push) Has been cancelled
The previous `[include] path = .gitconfig.user` was resolved relative to
the config file being read, which — because `~/.gitconfig` is a symlink
to `~/.yadr/git/gitconfig` — meant git looked for the user-identity
override at `~/.yadr/git/.gitconfig.user` instead of the conventional
`~/.gitconfig.user`. Switch to an absolute path so the include picks up
the homedir file regardless of symlink layout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 07:41:12 -07:00
59a5c0bbf8 install.sh: merge PERSONAL_DIRS contents instead of wholesale replace
The previous deploy_one() did `mv $HOME/<dir> $BACKUP_DIR/<dir>` then
`cp -a $YADR_DIR/<dir> $HOME/<dir>` for every entry in PERSONAL_DIRS.
For dirs the repo only partially populates (notably .local — repo only
tracks .local/bin/), this swept away unrelated user data: the most
recent re-bootstrap moved ~/.local/share/fonts/ (Intel One Mono, Open
Gorton, Roboto Mono, GALLAUDET, code128) into the timestamped backup,
making them appear missing.

Rework deploy logic:
- deploy_file: copies one file/symlink, backing up only the conflicting
  destination (if any). Idempotent via paths_equivalent() so re-runs
  with no changes produce no output and no spurious backups.
- deploy_dir: walks the repo's tree for that dir and deploys each leaf
  via deploy_file. Files in $HOME the repo doesn't know about are left
  untouched. Subdirs are mkdir'd as needed.

Also: track the personal fonts at .local/share/fonts/ so they redeploy
on every install, and run fc-cache -f at the end so apps see them
without a logout/login.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 07:28:40 -07:00
9 changed files with 6 additions and 173 deletions

33
.claude/.gitignore vendored
View File

@@ -1,33 +0,0 @@
# Never track Claude Code per-machine state, secrets, or chat data.
#
# settings.json IS tracked (portable user prefs + permissions allowlist).
# Everything else under ~/.claude/ stays per-host: credentials, session
# logs, project memories, file-edit history, telemetry, caches.
# Auth — must NEVER be tracked
.credentials.json
# Per-machine settings overrides (by Claude Code convention)
settings.local.json
# Chat and session data
history.jsonl
sessions/
projects/
file-history/
plans/
# Caches and ephemeral state
cache/
downloads/
paste-cache/
shell-snapshots/
session-env/
backups/
telemetry/
mcp-needs-auth-cache.json
# Plugin marketplace state — known_marketplaces.json IS portable, but the
# resolved-plugin caches and the local blocklist are per-machine.
plugins/blocklist.json
plugins/marketplaces/

View File

@@ -1,57 +0,0 @@
{
"permissions": {
"allow": [
"Bash(tmux source-file:*)",
"Bash(git:*)",
"Bash(curl:*)",
"Bash(sudo:*)",
"Bash(find:*)",
"Bash(ls:*)",
"Bash(cat:*)",
"Bash(systemctl:*)",
"Bash(sysctl:*)",
"Bash(crontab:*)",
"Bash(dig:*)",
"Bash(ulimit:*)",
"Bash(python3:*)",
"Bash(iptables:*)",
"Bash(ip6tables:*)",
"Bash(ufw status:*)",
"Bash(firewall-cmd:*)",
"Bash(apt list:*)",
"Bash(apt-get install:*)",
"Bash(apt-get upgrade:*)",
"Bash(dpkg:*)",
"Bash(fail2ban-client status:*)",
"Bash(fail2ban-client set:*)",
"Bash(aa-status)",
"Bash(getenforce)",
"Bash(mount)",
"Bash(netstat -tuln)",
"Bash(netstat -tlnp)",
"Bash(openssl x509:*)",
"Bash(openssl rand:*)",
"Bash(grep -v \"^$\")",
"Bash(du -sh /var/log/*)",
"Bash(lsmod)",
"Bash(xargs ls:*)",
"Bash(last:*)",
"Bash(nginx:*)",
"Bash(redis-cli:*)",
"Bash(rkhunter:*)",
"Bash(aideinit)",
"Bash(npm --version)",
"Bash(ruby --version)",
"Bash(getent passwd:*)",
"Bash(sqlite3:*)",
"Read(//home/**)",
"Read(//opt/**)",
"Read(//etc/nginx/sites-enabled/**)",
"Read(//etc/nginx/sites-available/**)"
],
"defaultMode": "auto"
},
"theme": "dark",
"verbose": true,
"skipAutoPermissionPrompt": true
}

View File

@@ -29,21 +29,5 @@ if is_digitalocean && do_anchor_ip; then
exit 0
fi
print_local_ip() {
local iface ip
if command -v ipconfig >/dev/null 2>&1; then
for iface in en0 en1 en2; do
ip=$(ipconfig getifaddr "$iface" 2>/dev/null) || true
[ -n "${ip:-}" ] && { printf '%s\n' "$ip"; return 0; }
done
fi
if hostname -I >/dev/null 2>&1; then
hostname -I | awk '{print $1}'
return 0
fi
ifconfig 2>/dev/null | awk '/inet /{ if ($2 != "127.0.0.1") { print $2; exit } }'
}
ip=$(curl -s --connect-timeout 3 https://api.ipify.org 2>/dev/null || true)
[ -z "${ip:-}" ] && ip=$(print_local_ip)
printf '%s\n' "${ip:-}"
curl -s --connect-timeout 3 https://api.ipify.org 2>/dev/null \
|| hostname -I | awk '{print $1}'

View File

@@ -1,17 +0,0 @@
#!/bin/bash
#
# Emit the tmux status-bar network segment.
# No VPN: "⌂ <local_ip>"
# VPN up: "⌂ <local_ip> / ⇡ <vpn_ip>"
#
set -u
local_ip=$("$HOME/.local/bin/tmux-ip" 2>/dev/null || true)
vpn_ip=$("$HOME/.local/bin/tmux-vpn-ip" 2>/dev/null || true)
if [ -n "${vpn_ip:-}" ]; then
printf '\xe2\x8c\x82 %s / \xe2\x87\xa1 %s\n' "${local_ip:-}" "$vpn_ip"
else
printf '\xe2\x8c\x82 %s\n' "${local_ip:-}"
fi

View File

@@ -1,24 +0,0 @@
#!/bin/bash
#
# Print the IPv4 of the first active VPN tunnel interface, if any.
# Empty output when no VPN is up.
#
# macOS: utun* Linux: tun*, wg*, ppp*
set -u
case "$(uname -s)" in
Darwin)
ifconfig 2>/dev/null | awk '
/^utun[0-9]+:/ { iface=$1; sub(":", "", iface); next }
/^[a-z]+[0-9]*:/ { iface="" }
iface != "" && $1 == "inet" { print $2; exit }
'
;;
Linux)
if command -v ip >/dev/null 2>&1; then
ip -4 -o addr show 2>/dev/null \
| awk '$2 ~ /^(tun|wg|ppp)[0-9]+/ { sub("/.*","",$4); print $4; exit }'
fi
;;
esac

View File

@@ -79,7 +79,7 @@ set -g pane-border-style fg=colour245
set -g pane-active-border-style fg=colour39
set -g message-style fg=colour16,bg=colour221,bold
set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]#[fg=colour245,bg=colour238,bold] #(whoami) '
set -g status-right '#[bold][#[nobold,fg=colour229]#h#[fg=default] / #[fg=colour229]#(~/.local/bin/tmux-net)#[fg=default,bold]]#[nobold,fg=colour255] %H:%M %d-%b-%Y '
set -g status-right '#[bold][#[nobold,fg=colour229]#H#[fg=default] / #[fg=colour229]#(~/.local/bin/tmux-ip)#[fg=default,bold]]#[nobold,fg=colour255] %H:%M %d-%b-%Y '
set -g window-status-format '#[fg=colour235,bg=colour252,nobold] #(~/.local/bin/tmux-window-icon #{window_index}) #(pwd="#{pane_current_path}"; echo ${pwd####*/}) #W '
set -g window-status-current-format '#[fg=colour234,bg=colour39,bold] [#[fg=colour232,bold]#{?window_zoomed_flag,#[fg=colour228],} #(~/.local/bin/tmux-window-icon #{window_index}) #(pwd="#{pane_current_path}"; echo ${pwd####*/}) #W #[fg=colour234,bold]] '
set-option -g status-interval 60

View File

@@ -210,7 +210,7 @@ def install_term_theme
message = "Which theme would you like to apply to your iTerm2 profile?"
color_scheme = ask message, iTerm_available_themes
return if color_scheme.nil? || color_scheme == 'None'
return if color_scheme == 'None'
color_scheme_file = File.join('iTerm2', "#{color_scheme}.itermcolors")
@@ -220,8 +220,6 @@ def install_term_theme
profiles << 'All'
selected = ask message, profiles
return if selected.nil?
if selected == 'All'
(profiles.size-1).times { |idx| apply_theme_to_iterm_profile_idx idx, color_scheme_file }
else
@@ -246,12 +244,7 @@ def ask(message, values)
puts message
while true
values.each_with_index { |val, idx| puts " #{idx+1}. #{val}" }
input = STDIN.gets
if input.nil?
puts "(no input available — skipping prompt)"
return nil
end
selection = input.chomp
selection = STDIN.gets.chomp
if (Float(selection)==nil rescue true) || selection.to_i < 0 || selection.to_i > values.size+1
puts "ERROR: Invalid selection.\n\n"
else

View File

@@ -36,7 +36,7 @@ PERSONAL_FILES=(
# untouched. This deliberately avoids wholesale-replacing $HOME/.local etc.,
# which would sweep away unrelated user data (fonts, app state, ...).
PERSONAL_DIRS=(
.fonts .irssi .nano .themes .local .mplayer .claude
.fonts .irssi .nano .themes .local .mplayer
)
have() { command -v "$1" >/dev/null 2>&1; }

View File

@@ -1,13 +0,0 @@
# Eagerly define `diff` as a real function instead of relying on prezto's
# autoload stub. The autoload stub emits
# "(eval):1: diff: function definition file not found"
# in non-interactive eval contexts where $fpath doesn't yet include the
# prezto utility module's functions directory. Defining a real function
# here bypasses the autoload path entirely.
function diff {
if (( $+commands[colordiff] )); then
command diff --unified "$@" | colordiff --difftype diffu
else
command diff --unified "$@"
fi
}