This directory contains a modular shell configuration for ZSH that separates functionality into dedicated files for better organization and maintainability.
# Clone the repository
git clone https://github.com/gitayam/dotfiles.git
cd dotfiles/macos
# Run the sync script
./sync_mac_dotfiles.sh
# Reload your shell
source ~/.zshrc.zshrc- Main shell configuration file that loads all modular files.zsh_aliases- Basic shell aliases for common commands.zsh_functions- General utility functions (video processing, downloads, file operations).zsh_git- Git-related functions and aliases.zsh_apps- Application launcher functions.zsh_network- Network-related utilities (MAC address management, VPN).zsh_transfer- File transfer utilities.zsh_security- Security-related functions (encryption, virus scanning).zsh_utils- Miscellaneous utility functions.zsh_docker- Docker-related aliases and functions.zsh_aws- AWS CLI utilities.zsh_encryption- Encryption/decryption utilities.zsh_handle_files- Advanced file handling operations
- Smart video downloads with format checking and automatic conversion
- Signal-optimized encoding - ensures videos display inline, not as file attachments
- Supports Instagram, YouTube, TikTok, and more via yt-dlp
- Quality selection (720p, 1080p, audio-only)
- Video format validation and fixing (H.264, AAC, yuv420p)
# Download video (no quotes needed!)
dl https://instagram.com/reel/ABC/?param=xyz
# Download and auto-fix for Signal
dlfix https://youtube.com/watch?v=xyz
# Check/fix existing video
signalfix video.mp4
vfix video.mp4- MAC address randomization with vendor lookup
- VPN connection shortcuts
- IP address utilities
- Network diagnostics
- Smart file location handling (defaults to /tmp/)
- Clipboard integration (copy/paste files and text)
- Timestamped backups
- Fuzzy history search
cd /path/to/dotfiles/macos
./sync_mac_dotfiles.shThe sync script will:
- Create symlinks for macOS-specific files
- Compare repository files with your home directory
- Prompt before overwriting (creates timestamped backups)
- Verify all files are properly installed
- Offer to reload your configuration
- Copy files from
macos/to your home directory - Ensure
.zshrcsources all.zsh_*files - Run
source ~/.zshrcto load configuration
zsh- Shell (macOS default)ffmpeg- Video processing:brew install ffmpegyt-dlp- Video downloads:brew install yt-dlp
python3- Enhanced MAC address managementfzf- Fuzzy history search:brew install fzfgh- GitHub CLI for PR creation:brew install gh
-
Add functions to the appropriate modular file:
- Video/downloads β
.zsh_functions - Network utilities β
.zsh_network - Git operations β
.zsh_git - etc.
- Video/downloads β
-
Test your changes:
source ~/.zsh_functions # Load updated file your_new_function # Test it
-
Commit and push:
git add <files> git commit -m "feat: description" git push origin main
# On development machine (after changes)
git push origin main
# On other machines
git pull origin main
./sync_mac_dotfiles.sh
source ~/.zshrc- LESSONS_LEARNED.md - Critical lessons, gotchas, and best practices
- MACOS_FEATURES.md - Complete feature inventory for macOS
- LINUX_FEATURES.md - Complete feature inventory for Linux
- FEATURE_COMPARISON.md - Platform feature comparison
- macOS_Configuration_Guide.md - Setup and configuration guide
# Make sure you have latest changes
git pull origin main
# Run sync script
./sync_mac_dotfiles.sh
# Reload shell
source ~/.zshrc# Check if file is sourced in .zshrc
grep "zsh_functions" ~/.zshrc
# Verify file exists
ls -la ~/.zsh_functions
# Check for syntax errors
zsh -n ~/.zsh_functions# Update yt-dlp (frequently needed)
brew upgrade yt-dlp
# Check ffmpeg is installed
ffmpeg -version
# Test with a known-good URL
dl https://www.youtube.com/watch?v=dQw4w9WgXcQ# Make sure aliases use noglob prefix
alias dl
# Should show: dl='noglob download_video'
# Reload config if needed
source ~/.zshrcsync_mac_dotfiles.sh- Sync repository files to home directorycheck_zsh_config.sh- Verify configuration is properly set upinitial_macos_setup.sh- Initial setup script for new macOS installations
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test thoroughly
- Update documentation (especially LESSONS_LEARNED.md if you learned something)
- Commit with descriptive message:
git commit -m "feat: add amazing feature" - Push and create a Pull Request
This project is open source and available for personal use.
- Video encoding best practices from Signal GitHub issues and mobile encoding standards
- Shell scripting patterns from the ZSH community
- yt-dlp for excellent video download support