Skip to content
Draft
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
4 changes: 2 additions & 2 deletions zsh/functions/aa-inflight-wifi.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ aa-inflight-wifi() {

# Function to randomize MAC and reconnect
reconnect_wifi() {
echo "$(date '+%Y-%m-%d %H:%M:%S') - Randomizing MAC address..."
echo "${(%):-%D{%Y-%m-%d %H:%M:%S}} - Randomizing MAC address..."

# Source the MAC randomization function if not already loaded
if ! command -v randomize-mac-ifconfig &>/dev/null; then
Expand Down Expand Up @@ -140,7 +140,7 @@ aa-inflight-wifi() {
# Perform the reconnection
if reconnect_wifi; then
# Success - wait 20 minutes before next cycle
echo "$(date '+%Y-%m-%d %H:%M:%S') - Waiting 20 minutes before next reconnection..."
echo "${(%):-%D{%Y-%m-%d %H:%M:%S}} - Waiting 20 minutes before next reconnection..."
echo "Next reconnection at: $(date -v +${wait_time}S '+%Y-%m-%d %H:%M:%S')"
sleep $wait_time
else
Expand Down
2 changes: 1 addition & 1 deletion zsh/functions/claude/functions.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ merge-claude-settings() {
echo

# Create backup of global settings before any changes
local backup_file="${global_settings}.backup.$(date +%Y%m%d_%H%M%S)"
local backup_file="${global_settings}.backup.${(%):-%D{%Y%m%d_%H%M%S}}"
cp "$global_settings" "$backup_file" || { echo "Error: Failed to create backup at $backup_file" >&2; return 1; }

# Ask about each new permission and add immediately
Expand Down
4 changes: 2 additions & 2 deletions zsh/functions/migrate-laptop.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ EOF
local create_archive
read -r "create_archive?Create compressed archive? (y/n): "
if [[ "$create_archive" == "y" ]]; then
local archive_name="wifi-export-$(date +%Y%m%d-%H%M%S).tar.gz"
local archive_name="wifi-export-${(%):-%D{%Y%m%d-%H%M%S}}.tar.gz"
tar -czf "$HOME/$archive_name" -C "$export_dir" . || { warning "Failed to create archive $HOME/$archive_name"; return 1; }
success "Created archive: $HOME/$archive_name"
echo "Transfer this file to your new laptop"
Expand Down Expand Up @@ -579,7 +579,7 @@ verify-migration() {

# Function to backup current laptop before migration
backup-before-migration() {
local backup_dir="$HOME/laptop-migration-backup-$(date +%Y%m%d-%H%M%S)"
local backup_dir="$HOME/laptop-migration-backup-${(%):-%D{%Y%m%d-%H%M%S}}"

progress "Creating backup at $backup_dir..."
mkdir -p "$backup_dir" || { error "Failed to create backup directory $backup_dir"; return 1; }
Expand Down
2 changes: 1 addition & 1 deletion zsh/functions/symlink-sd.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function symlink-to-sd() {
local current_name="${current_dir:t}"
local parent_dir="${current_dir:h}"
local sd_target="/Volumes/SD$current_dir"
local sd_backup="/Volumes/SD$current_dir.backup.$(date +%Y%m%d%H%M%S)"
local sd_backup="/Volumes/SD$current_dir.backup.${(%):-%D{%Y%m%d%H%M%S}}"
local file

# Check if SD volume is mounted
Expand Down