Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ†˜ Panic Button - Window Focus Manager

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.

Application Preview Python GUI

โœจ Features

๐Ÿ–ฅ๏ธ Modern GUI Interface

  • Dark mode with modern customtkinter design
  • Tabbed interface for organized functionality
  • Real-time status indicators
  • Intuitive controls with visual feedback

๐ŸŽฏ Window Management

  • Save multiple windows for quick access
  • Emergency focus button for panic situations
  • Window detection with comprehensive information
  • Persistent storage of saved windows

โŒจ๏ธ Customizable Hotkeys

  • Configurable hotkey combinations
  • Global hotkeys that work from any application
  • Hotkey validation and testing
  • Default hotkey presets

๐Ÿ”ง Advanced Features

  • Administrator privilege detection
  • Configuration persistence
  • Thread-safe operations
  • Comprehensive error handling

๐Ÿš€ Quick Start

Prerequisites

  • Windows 10/11
  • Python 3.7 or higher
  • Administrator privileges (recommended)

Installation

  1. Clone or download this repository
  2. Create a virtual environment:
    python -m venv venv
    .\venv\Scripts\activate  # Windows
  3. Install dependencies:
    pip install -r requirements.txt

Running the Application

Method 1: GUI Application (Recommended)

python main.py

Method 2: Command Line (Legacy)

python helper/actions.py

๐Ÿ“– How to Use

๐ŸŽฎ Quick Actions Tab

  1. Click "Choose from List" to browse and select any window to save
  2. Use "Focus Last Saved Window" for quick switching to your most recent window
  3. Save multiple windows for easy access and management

๐ŸชŸ Saved Windows Tab

  • View all saved windows with details
  • Focus any saved window with one click
  • Delete unwanted windows from the list
  • Automatic timestamps for organization

โŒจ๏ธ Hotkey Settings Tab

  • Customize all hotkeys to your preference
  • Test hotkeys before saving
  • Save configurations for persistence

๐Ÿ”ง Advanced Tab

  • Check administrator status
  • Clear all saved data
  • Configure auto-start options
  • System tray integration (planned)

๐ŸŽฏ Default Hotkeys

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

๐Ÿ’ก Use Cases

๐Ÿšจ Emergency Situations

  • Quickly switch to a "safe" window when needed
  • Hide sensitive content instantly
  • Switch to desktop or neutral application

๐Ÿ’ผ Productivity

  • Fast switching between work applications
  • Quick access to frequently used windows
  • Efficient multitasking workflow

๐ŸŽฎ Gaming & Streaming

  • Quick ALT+TAB alternative
  • Stream-safe window switching
  • Audience-appropriate content management

๐Ÿ› ๏ธ Technical Details

Architecture

  • GUI Framework: CustomTkinter (modern tkinter)
  • Window Detection: Windows API (win32gui)
  • Hotkey Management: keyboard library
  • Configuration: JSON-based persistence
  • Threading: Async hotkey handling

Configuration File

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"
  }
}

๐Ÿ”’ Security & Permissions

Administrator Privileges

  • Required for: Global hotkey registration
  • Optional for: Basic GUI functionality
  • Automatic: Privilege elevation prompts

Privacy

  • No network connections
  • Local data storage only
  • No telemetry or tracking
  • Open source transparency

๐Ÿ› Troubleshooting

Common Issues

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

Error Messages

  • Import Error: Run pip install -r requirements.txt
  • Permission Error: Run as Administrator
  • Hotkey Conflict: Change hotkeys in settings

๐Ÿ›ฃ๏ธ Roadmap

  • System tray integration
  • Window preview thumbnails
  • Multi-monitor support
  • Automatic window detection
  • Profiles for different use cases
  • Portable executable

๐Ÿค Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Submit a pull request

๐Ÿ“„ License

MIT License - See LICENSE file for details

๐Ÿ™ Acknowledgments

  • CustomTkinter - Modern tkinter GUI framework
  • keyboard - Global hotkey management
  • pywin32 - Windows API integration

โš ๏ธ Note: This application is designed for Windows systems and requires appropriate permissions for global hotkey functionality. Always test in a safe environment before relying on it for critical situations.

About

๐Ÿ†˜ A Windows GUI app for quick window switching and emergency focus management โ€” customtkinter, global hotkeys, persistent config

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages