A sleek, customizable desktop widget for macOS that displays security and privacy status indicators with a cyberpunk aesthetic.
- Desktop Integration: Embeds directly into the desktop background
- Security Monitoring: Real-time VPN, Tor, and DNS status indicators
- Privacy Level Bar: Visual representation of current privacy protection
- Panic Button: Emergency privacy protection (visible on hover)
- Cyberpunk Styling: Glowing borders with customizable colors
- Auto-positioning: Stays fixed on main display, never follows windows
- Auto-save: Automatic backup every 5 minutes
- Transparent: Blends seamlessly with desktop wallpaper
- macOS 11.0 or later
- Xcode Command Line Tools (for compilation)
-
Clone this repository:
git clone <repository-url> cd desktop-widget
-
Compile the widget:
swiftc -o desktop-widget desktop-widget.swift -framework Cocoa -framework SwiftUI
-
Run the widget:
./desktop-widget &
Edit the LinearGradient section in the Swift file to customize the glowing border colors:
LinearGradient(
gradient: Gradient(colors: [
Color.cyan.opacity(0.8),
Color.blue.opacity(0.6),
Color.purple.opacity(0.8),
Color.pink.opacity(0.6)
])
)The widget automatically positions itself in the upper-left area of your main display. Modify the positioning logic in resetWidgetToFixedPosition() to change location.
- VPN: Shows connection status with shield icon
- Tor: Displays Tor network connectivity
- DNS: Indicates DNS protection status
A 5-segment bar showing overall privacy protection level based on active security services.
Hidden button that appears on hover - can be customized to trigger emergency privacy actions like:
- Disconnect VPN
- Clear clipboard
- Close sensitive applications
- Trigger system lockdown
The widget uses aggressive positioning logic to:
- Stay fixed on the main display
- Never follow window movements
- Reset position every 0.5 seconds if displaced
- Handle screen configuration changes
desktop-widget.swift- Main application code- Auto-generated backups in
/tmp/DesktopWidget-AutoSave/
DesktopStatusWidgetApp- Main SwiftUI appAppDelegate- Window management and positioningWidgetContentView- Main UI layoutStatusIndicator- Individual status icon componentSecurityStatusModel- Status monitoring logic
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly on macOS
- Submit a pull request
MIT License - see LICENSE file for details
Philip S Wright
- Built with SwiftUI and AppKit
- Inspired by cyberpunk aesthetics
- Designed for privacy-conscious users
