Battery Information
Monitor your Mac’s battery status including charge level, time remaining, cycle count, and charger wattage.battery-info.sh - Comprehensive Battery Monitoring
battery-info.sh - Comprehensive Battery Monitoring
This script displays detailed battery information in Raycast’s menu bar, automatically refreshing every 3 minutes.How it works:
- Uses
pmset -g battto get current battery status - Uses
system_profiler SPPowerDataTypeto retrieve battery cycle count - Formats output differently based on charging state (charging, discharging, charged)
- Displays time remaining in human-readable format (hours and minutes)
- Shows charger wattage when connected to power
Network Information
Get your current IP address, ISP, and location information.Network Info.sh - Display Network Details
Network Info.sh - Display Network Details
This Python script fetches your public IP address and location data from an external API.How it works:
- Makes HTTP request to ip-api.com to get network information
- Parses JSON response containing IP, ISP, and geolocation data
- Displays formatted output in Raycast
Power Management
Control your Mac’s power settings including caffeinate mode and low power mode.caffeinate-enable.sh - Prevent Mac from Sleeping
caffeinate-enable.sh - Prevent Mac from Sleeping
Keep your Mac awake for a specified duration.How it works:
- Takes optional time argument (e.g., “2h”, “30m”, “1d”)
- Defaults to 1 hour if no time specified
- Parses time unit (s, m, h, d) and converts to seconds
- Uses macOS
caffeinatecommand to prevent sleep - Kills any existing caffeinate process before starting new one
Low Power Mode.sh - Toggle Low Power Mode
Low Power Mode.sh - Toggle Low Power Mode
Enable or disable Low Power Mode with automatic brightness adjustment.How it works:
- Checks current low power mode status using
pmset -g - Toggles the mode on/off using
pmset -a lowpowermode - Requires administrator privileges to change system settings
- Automatically restores brightness when disabling low power mode
Audio Controls
Quickly control your Mac’s audio settings.toggle-mic.applescript - Toggle Microphone On/Off
toggle-mic.applescript - Toggle Microphone On/Off
Instantly mute or unmute your microphone.How it works:
- Gets current microphone input volume
- Sets volume to 0 (muted) or 100 (unmuted) based on current state
- Provides immediate visual feedback with emoji indicators
Display Controls
brightness.sh - Set Screen Brightness
brightness.sh - Set Screen Brightness
Adjust your screen brightness from Raycast.How it works:
- Requires the
brightnessCLI tool (install with Homebrew) - Takes brightness value as percentage (0-100)
- Converts percentage to decimal value for the brightness command
Storage Management
disk-usage.sh - Monitor Disk Space
disk-usage.sh - Monitor Disk Space
View available disk space in your menu bar.How it works:
- Uses
df -hto get disk usage in human-readable format - Parses output to extract available space and total size
- Refreshes every minute to keep information current
- Displays in inline mode for menu bar visibility
Screenshot Management
copy-last-screenshot.swift - Copy Latest Screenshot
copy-last-screenshot.swift - Copy Latest Screenshot
Quickly copy your most recent screenshot to the clipboard.How it works:
- Uses macOS Spotlight metadata query (
NSMetadataQuery) to find screenshots - Filters files by
kMDItemIsScreenCaptureattribute - Sorts by creation date to get the most recent
- Copies file URL to clipboard using
NSPasteboard - Written in Swift for native macOS integration
See Also
Developer Utils
Git, Docker, and encoding utilities
App Integrations
Control Bear, Spotify, Safari, and more
Media Controls
Music, volume, and playback controls
Productivity
Todo lists, timers, and password managers

