.dotfiles

Utility Scripts

Custom productivity tools that automate daily development tasks.

Scripts Overview

Script Purpose Usage
fixy Universal code formatter (20+ languages) fixy file.py
theme System-wide theme switcher theme dark
tmux-utils System monitoring for tmux status tmux-utils battery
tmux-auto Auto-create/attach tmux sessions tmux-auto [path]
scratchpad Quick temporary file editor scratchpad
extract Universal archive extractor extract file.tar.gz
fetch-quotes Inspirational quotes from APIs fetch-quotes
fallback Command fallback handler Internal use
install-ruby-lsp Ruby LSP installer install-ruby-lsp
bugreport Comprehensive diagnostic report bugreport
nvim-debug Neovim diagnostic tool nvim-debug
validate-configs Config standards validation validate-configs
cortex Local AI assistant wrapper cortex
displaysleep Keep the display asleep (macOS) displaysleep
common.sh Compatibility wrapper around src/lib/ Sourced by scripts

Key Features

fixy - Universal Formatter

fixy file.py              # Auto-detect and format
fixy --all src/           # Format with normalizations
fixy --check file.rs      # Check without modifying

theme - Theme Synchronization

theme              # Auto-detect from macOS
theme dark         # Force dark mode
theme light        # Force light mode

Synchronizes: Neovim, Alacritty, WezTerm, Kitty, tmux, Starship, bat, delta

update - System Updater (alias for src/setup/update.sh)

update             # Update everything
update --brew      # Only Homebrew packages
update --nvim      # Only Neovim plugins

Updates: Homebrew, Neovim plugins, Zsh plugins, tmux plugins, pip packages, LSPs. The update shell alias resolves to src/setup/update.sh — there is no script under src/scripts/ by that name.

tmux-utils - Status Bar Utilities

tmux-utils battery     # Battery status
tmux-utils cpu         # CPU usage
tmux-utils memory      # Memory usage

Smart icons, real-time monitoring, optimized for tmux status bar.

displaysleep - Keep the Display Asleep (macOS)

displaysleep                 # Keep the screen off (10s quit window)
displaysleep -t 5            # Shorter quit window
displaysleep -k              # Also keep the Mac awake (only the screen sleeps)
displaysleep --idle-resleep  # Don't slam the screen off during active use

Loops pmset displaysleepnow and watches HIDIdleTime so the display stays dark while the Mac keeps working. When you wake the screen, a countdown gives you a window to quit (Ctrl-C) before it sleeps again. A heartbeat re-sleep (every 30s) plus a startup warning handle apps (Theine, video players) that otherwise keep the display on. By default the Mac follows its normal power settings; --keep-awake blocks system idle sleep so only the display sleeps.

Quick Start

# Daily workflow
theme                  # Set theme
update                 # Update everything
fixy --all src/        # Format code

# Development
scratchpad             # Quick notes
extract archive.tar.gz # Extract files

Configuration

Performance

Troubleshooting

fixy not formatting: Check formatter installed with which <formatter>

theme not switching: Check lockfile ${XDG_CACHE_HOME:-$HOME/.cache}/theme/theme-switch.lock

update failing: Verify network and credentials

Testing

./test/runner.zsh unit/scripts/fixy
./test/runner.zsh unit/scripts/displaysleep_test.zsh
./test/runner.zsh functional/scripts