Skip to content

anand-testcompare/scripts-prompts-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

scripts-prompts-config

A comprehensive configuration management system for development environments, supporting Linux and macOS. This repository contains backup/restore scripts, shell configurations, development tools setup, and AI prompts for maintaining consistent development environments.

Current Platform Focus

  • Primary: osx/ and linux-omarchy/
  • Deprecated: linux-popos/ (kept for historical reference; avoid adding new configs there)

Quick Start

macOS Setup

# Clone the repository
git clone https://github.com/yourusername/scripts-prompts-config.git
cd scripts-prompts-config

# Apply backed-up macOS configs
cp osx/config/.aerospace.toml ~/.aerospace.toml
cp osx/config/.skhdrc ~/.skhdrc
mkdir -p ~/.config/ghostty
cp osx/config/.config/ghostty/config ~/.config/ghostty/config
mkdir -p ~/.config/wezterm
cp osx/config/.config/wezterm/wezterm.lua ~/.config/wezterm/wezterm.lua
mkdir -p ~/.config/zed
cp osx/config/zed/keymap.json ~/.config/zed/keymap.json

# Apply macOS defaults that fit AeroSpace workflows
./osx/scripts/configure_macos_defaults.sh

# Resolve macOS screenshot shortcut conflicts with AeroSpace Cmd+Shift+3/4
./osx/scripts/configure_screenshot_shortcuts.sh

Legacy Pop!_OS Scripts (Deprecated)

The linux-popos/ directory remains available, but is deprecated for ongoing updates. Prefer osx/ and linux-omarchy/ for new changes.

Backup Current Configurations

cd scripts-prompts-config/linux-popos
./backup-configs.sh

Features

Development Environment

Both Bash and Zsh configurations include:

  • Version Managers: NVM (Node.js), Bun runtime
  • Git Aliases: gs (status), ga (add), gc (commit), gp (push), gl (log), gd (diff), gco (checkout), gb (branch)
  • Navigation: Quick directory navigation (.., ..., ....)
  • Safety: Interactive mode for destructive commands (rm -i, cp -i, mv -i)
  • Development Tools: Local server (serve), IP info (myip), port checker (ports)
  • System Info: Memory (meminfo), CPU (cpuinfo), disk usage (diskinfo)
  • Clipboard: Cross-platform clipboard support (pbcopy, pbpaste via xclip)
  • Secure Credentials: Automatic loading from .shell_secrets
  • Modern CLI Tools: eza (ls replacement), bat (cat replacement with automatic secret masking for .env files), ripgrep, fd

Zsh-Specific Enhancements

  • Oh My Posh: Git-aware prompt with custom themes
  • Syntax Highlighting: Real-time command syntax validation
  • Auto-suggestions: Intelligent command completion
  • FZF Integration: Fuzzy file and history search

Terminal Configuration (Kitty)

  • Tokyo Night color scheme
  • 85% background transparency
  • JetBrains Mono Nerd Font
  • Custom key bindings (Ctrl+C copy, Ctrl+V paste)
  • Dynamic transparency controls (Ctrl+Shift+A + M/L)

Repository Structure

scripts-prompts-config/
├── CLAUDE.md                   # AI assistant instructions
├── README.md                   # This file
├── TODO.md                     # Development tasks
├── linux-popos/             # Deprecated (legacy Pop!_OS/Ubuntu)
│   ├── backup-configs.sh      # Backup script (Pop!_OS/Ubuntu)
│   ├── restore-configs.sh     # Restore script (Pop!_OS/Ubuntu)
│   ├── config/                # Configuration files (local backups)
│   │   ├── README.md          # Linux-specific documentation
│   │   └── .shell_secrets.template
│   ├── prompts/               # AI maintenance prompts
│   │   └── sync-shell-configs.md
│   └── scripts/               # Utility scripts
│       └── emulate_osx_setups.sh
├── linux-omarchy/             # Arch/Omarchy docs and scripts
│   ├── REPLICATION-GUIDE.md
│   ├── .shell_secrets.template
│   └── scripts/
│       └── emulate_osx_setups_arch_permanent.sh
├── osx/                       # macOS configurations/scripts
│   ├── README.md
│   └── scripts/
│       ├── configure_macos_defaults.sh
│       ├── configure_screenshot_shortcuts.sh
│       └── update_packages.sh
└── universal/                 # Cross-platform scripts, hooks, and troubleshooting playbooks
    ├── convert_to_svg.sh
    ├── kill-dev.sh
    ├── optimize_logos.sh
    ├── pi-google-code-assist-antigravity-troubleshooting.md
    └── git-hooks/
        ├── commit-msg
        └── README.md

Security

Best Practices

  1. Never commit .shell_secrets, .mcp.json, or .claude.json - The repository .gitignore blocks these
  2. Use the template - .shell_secrets.template shows the structure without real values
  3. Rotate exposed credentials - Immediately rotate any accidentally exposed keys
  4. Proper permissions - Scripts automatically set 600 on sensitive files

Security Verification

All configuration files have been scanned and verified to contain:

  • NO API keys, tokens, or passwords in committed files
  • Only template files for sensitive configuration
  • Proper gitignore rules to prevent accidental commits

Shell Synchronization

Keep bash and zsh configurations synchronized using the included prompt:

# Use the sync prompt with your AI assistant
cat linux-popos/prompts/sync-shell-configs.md

This ensures consistent:

  • Development tools and version managers
  • PATH modifications
  • Environment variables
  • Aliases and functions
  • Third-party tool integrations

Installation Requirements

Essential Tools

# Package manager updates
sudo apt update && sudo apt upgrade  # Debian/Ubuntu
sudo dnf update                      # Fedora

# Core utilities
sudo apt install git curl wget xclip

# Zsh and enhancements
sudo apt install zsh zsh-syntax-highlighting zsh-autosuggestions

# Modern CLI tools
sudo apt install exa bat ripgrep fd-find fzf

# Terminal
sudo apt install kitty

Development Tools

# Node Version Manager
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

# Bun
curl -fsSL https://bun.sh/install | bash

# Oh My Posh
curl -s https://ohmyposh.dev/install.sh | bash -s

Fonts

# JetBrains Mono Nerd Font
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/JetBrainsMono.zip
unzip JetBrainsMono.zip -d ~/.fonts
fc-cache -fv

Troubleshooting

Commands not working after restore

source ~/.bashrc  # For bash
source ~/.zshrc   # For zsh

NVM not found

# Reinstall NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source ~/.bashrc

Oh My Posh prompt not displaying

  1. Ensure a Nerd Font is installed (see Fonts section)
  2. Configure your terminal to use the Nerd Font
  3. Restart your terminal

Permission denied errors

# Fix script permissions
chmod +x linux-popos/*.sh osx/scripts/*.sh universal/*.sh
chmod 600 ~/.shell_secrets

Utility Scripts

Universal Scripts

kill-dev.sh

Interactive development process killer with 5 escalating levels:

./universal/kill-dev.sh

Levels:

  1. Dev servers only - Kills processes on common dev ports (3000-3002, 5173, 8080, 4000, 8000)
  2. + Node processes - Adds Node, npm, yarn, pnpm and d3k/headless-Chrome cleanup
  3. + Build tools - Adds Vite, Next.js, Playwright, Jest, Vitest, Webpack
  4. + IDEs - Adds VSCode, WebStorm, IntelliJ IDEA, Cursor, Zed
  5. Nuclear option - Everything including Docker, databases (Redis, PostgreSQL, MongoDB)

Features:

  • Interactive menu-driven interface
  • Graceful shutdown attempts before force kill (level 1)
  • Confirmation required for nuclear option
  • Color-coded output for clarity

macOS Scripts

configure_macos_defaults.sh

Applies macOS defaults that improve AeroSpace workspace behavior:

./osx/scripts/configure_macos_defaults.sh

Applies:

  • Disable app-triggered Space switching (workspaces-auto-swoosh = false)
  • Keep Spaces in fixed order (mru-spaces = false)
  • Group windows by app in Mission Control (expose-group-apps = true)

Optional:

  • ./osx/scripts/configure_macos_defaults.sh --disable-separate-spaces
    • Also disables Displays have separate Spaces (spans-displays = true)
    • Requires logout/login to fully apply

update_packages.sh

Updates all package managers on macOS:

./osx/scripts/update_packages.sh

Updates:

  • Homebrew and all installed packages
  • Global npm packages
  • Global pnpm packages
  • Checks for macOS system updates

configure_screenshot_shortcuts.sh

Remaps screenshot shortcuts so AeroSpace can own Cmd+Shift+3/4:

./osx/scripts/configure_screenshot_shortcuts.sh

Applies:

  • Remap screenshot full screen to Cmd+Ctrl+3
  • Remap screenshot region to Cmd+Ctrl+4
  • Remap screenshot toolbar to Cmd+Ctrl+5

Git Hooks

Install the commit-msg hook from universal/git-hooks/ (see universal/git-hooks/README.md).

Platform-Specific Documentation

Contributing

When adding new configurations:

  1. Security check: Scan for sensitive data before committing
  2. Test thoroughly: Verify backup and restore scripts work
  3. Update documentation: Keep READMEs current
  4. Maintain compatibility: Ensure configs work across shells when possible

License

MIT License - See LICENSE file for details

About

dotfiles, skills, custom bindings. linux (arch or ubuntu based) for 'hard' work, OSX for web dev. all config is geared towards low cognitive overhead so what you won't see is 'how to run 6 agents in parallel with worktrees'. i liked terminal based workflows before it was cool.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors