chore: clean up dotfiles and add gitignore whitelist

Switch to whitelist-based .gitignore to only track essential configs:
nvim, yazi, kitty, zsh, ideavim, karabiner, tmux, scripts, starship.
Remove history, compiled files, and plugin dirs from tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Naderer
2026-03-11 12:57:14 +01:00
parent 61b1e3d2a9
commit d8a20d620a
32 changed files with 1471 additions and 2868 deletions

View File

@@ -1,20 +1,47 @@
#!/bin/zsh
set -euo pipefail
# Auto-remount TN shares when network changes.
# Credentials should be stored in macOS Keychain (connect once via Finder, remember password).
# User Configuration
USER="AK127132" # Insert Your AK Number
PASSWORD="enzfcj4bhg!mwr8BUH" # Insert your password
SERVER="140.78.8.107"
SHARE1="TNGROUP/tn-group/ipec"
SHARE2="TNHOME/home/AK127132"
# Mount TNGROUP
echo "Mounting TNGROUP..."
osascript -e "try" -e "mount volume \"smb://$USER:$PASSWORD@$SERVER/$SHARE1\"" -e "end try"
# Use URL-encoded path segments for spaces if needed.
SHARE1_URL="smb://$SERVER/TNGROUP/tn-group/ipec"
SHARE2_URL="smb://$SERVER/TNHOME/home/AK127132"
# Mount TNHOME
echo "Mounting TNHOME..."
osascript -e "try" -e "mount volume \"smb://$USER:$PASSWORD@$SERVER/$SHARE2\"" -e "end try"
# Expected mount points under /Volumes (adjust if your Finder mount names differ)
MOUNT1="/Volumes/ipec"
MOUNT2="/Volumes/AK127132"
echo "Mounting complete."
log() {
echo "[tnmount] $*"
}
is_mounted() {
local mountpoint="$1"
mount | grep -q " on ${mountpoint} "
}
mount_if_missing() {
local mountpoint="$1"
local url="$2"
if is_mounted "$mountpoint"; then
log "Already mounted: $mountpoint"
else
log "Mounting: $url"
open "$url"
fi
}
# Skip when server is unreachable (offsite/no VPN), try again on next interval.
if ! nc -zw2 "$SERVER" 445 >/dev/null 2>&1; then
log "Server $SERVER:445 not reachable; skipping"
exit 0
fi
mount_if_missing "$MOUNT1" "$SHARE1_URL"
mount_if_missing "$MOUNT2" "$SHARE2_URL"
log "Done"