A modern GUI application for quick window switching and emergency focus management using customtkinter. Perfect for situations where you need to quickly switch to a "safe" window or manage multiple applications efficiently.
- Dark mode with modern customtkinter design
- Tabbed interface for organized functionality
- Real-time status indicators
- Intuitive controls with visual feedback
- Save multiple windows for quick access
- Emergency focus button for panic situations
- Window detection with comprehensive information
- Persistent storage of saved windows
- Configurable hotkey combinations
- Global hotkeys that work from any application
- Hotkey validation and testing
- Default hotkey presets
- Administrator privilege detection
- Configuration persistence
- Thread-safe operations
- Comprehensive error handling
- Windows 10/11
- Python 3.7 or higher
- Administrator privileges (recommended)
- Clone or download this repository
- Create a virtual environment:
python -m venv venv .\venv\Scripts\activate # Windows
- Install dependencies:
pip install -r requirements.txt
Method 1: GUI Application (Recommended)
python main.pyMethod 2: Command Line (Legacy)
python helper/actions.py- Click "Choose from List" to browse and select any window to save
- Use "Focus Last Saved Window" for quick switching to your most recent window
- Save multiple windows for easy access and management
- View all saved windows with details
- Focus any saved window with one click
- Delete unwanted windows from the list
- Automatic timestamps for organization
- Customize all hotkeys to your preference
- Test hotkeys before saving
- Save configurations for persistence
- Check administrator status
- Clear all saved data
- Configure auto-start options
- System tray integration (planned)
| Hotkey | Action | Description |
|---|---|---|
Ctrl+Alt+S |
Save Window | Save the currently focused window |
Ctrl+Alt+F |
Focus Window | Focus the last saved window |
Ctrl+Alt+E |
Emergency Focus | Immediate panic focus |
Ctrl+Alt+Q |
Quit | Exit the application |
- Quickly switch to a "safe" window when needed
- Hide sensitive content instantly
- Switch to desktop or neutral application
- Fast switching between work applications
- Quick access to frequently used windows
- Efficient multitasking workflow
- Quick ALT+TAB alternative
- Stream-safe window switching
- Audience-appropriate content management
- GUI Framework: CustomTkinter (modern tkinter)
- Window Detection: Windows API (win32gui)
- Hotkey Management: keyboard library
- Configuration: JSON-based persistence
- Threading: Async hotkey handling
Settings are automatically saved to panic_button_config.json:
{
"saved_windows": [
{
"window_title": "Example Window",
"process_name": "example.exe",
"class_name": "ExampleClass",
"saved_at": "2024-01-01 12:00:00"
}
],
"hotkeys": {
"select_window": "ctrl+alt+s",
"focus_window": "ctrl+alt+f",
"emergency_focus": "ctrl+alt+e",
"quit": "ctrl+alt+q"
}
}- Required for: Global hotkey registration
- Optional for: Basic GUI functionality
- Automatic: Privilege elevation prompts
- No network connections
- Local data storage only
- No telemetry or tracking
- Open source transparency
Hotkeys not working?
- Ensure administrator privileges
- Check for hotkey conflicts
- Verify keyboard library installation
Window focus failing?
- Try re-saving the window
- Check if target application allows focus
- Verify process is still running
GUI not loading?
- Install customtkinter:
pip install customtkinter - Check Python version (3.7+)
- Verify all dependencies installed
- Import Error: Run
pip install -r requirements.txt - Permission Error: Run as Administrator
- Hotkey Conflict: Change hotkeys in settings
- System tray integration
- Window preview thumbnails
- Multi-monitor support
- Automatic window detection
- Profiles for different use cases
- Portable executable
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
MIT License - See LICENSE file for details
- CustomTkinter - Modern tkinter GUI framework
- keyboard - Global hotkey management
- pywin32 - Windows API integration