qtile-expanded

Getting Started

  • Getting Started
    • What is qtile-expanded?
    • Quick Example
    • Next Steps
  • Installation
    • Prerequisites
    • Install from PyPI
    • Install from Source
    • Development Installation
    • Verification
    • Troubleshooting
    • Uninstalling

User Guide

  • StateStorage
    • Basic Usage
    • Automatic Saving
    • Convenience Methods
    • Context Manager
    • Dict-like Interface
    • Multiple Namespaces
    • Hook Integration
    • Storage Location
    • Thread Safety
    • Singleton Pattern
    • API Reference
      • StateStorage
        • StateStorage.__init__()
        • StateStorage.clear()
        • StateStorage.decrement()
        • StateStorage.delete()
        • StateStorage.get()
        • StateStorage.get_instance()
        • StateStorage.has()
        • StateStorage.increment()
        • StateStorage.items()
        • StateStorage.keys()
        • StateStorage.save()
        • StateStorage.save_all()
        • StateStorage.set()
        • StateStorage.toggle()
        • StateStorage.update()
        • StateStorage.values()
      • setup_qtile_hooks()
  • NotificationBell Widget
    • Basic Usage
    • Configuration Options
    • Notification Popup
    • Persistent State
    • NotificationCenter Integration
    • Manual Control
    • DBus Integration
    • Notification Data Structure
    • API Reference
      • NotificationBell
        • NotificationBell.__init__()
        • NotificationBell.add_notification()
        • NotificationBell.button_press()
        • NotificationBell.calculate_length()
        • NotificationBell.clear_notifications()
        • NotificationBell.defaults
        • NotificationBell.dismiss_notification()
        • NotificationBell.info()
        • NotificationBell.set_notifications()
        • NotificationBell.update_text()
  • Popup Utilities
    • NotificationPopup
      • Basic Usage
      • Configuration Options
      • Methods
      • Notification Structure
    • SimplePopup
      • Basic Usage
      • Configuration Options
      • Methods
    • API Reference
      • NotificationPopup
        • NotificationPopup.__init__()
        • NotificationPopup.defaults
        • NotificationPopup.draw()
        • NotificationPopup.show()
        • NotificationPopup.update_notifications()
      • SimplePopup
        • SimplePopup.__init__()
        • SimplePopup.defaults
        • SimplePopup.draw()
        • SimplePopup.show()
  • NotificationCenter
    • Features
    • Basic Usage
    • Integration with NotificationBell
    • Manual Notification Management
    • Popup Control
    • Custom Configuration
    • DBus Integration
    • Notification Replacement
    • API Reference
      • NotificationCenter
        • NotificationCenter.__init__()
        • NotificationCenter.add_notification()
        • NotificationCenter.clear()
        • NotificationCenter.dismiss_notification()
        • NotificationCenter.get_count()
        • NotificationCenter.get_instance()
        • NotificationCenter.get_unread_count()
        • NotificationCenter.hide_popup()
        • NotificationCenter.mark_all_as_read()
        • NotificationCenter.show_popup()
        • NotificationCenter.toggle_popup()

API Reference

  • API Reference
    • Main Package
      • NotificationBell
        • NotificationBell.__init__()
        • NotificationBell.add_notification()
        • NotificationBell.button_press()
        • NotificationBell.calculate_length()
        • NotificationBell.clear_notifications()
        • NotificationBell.defaults
        • NotificationBell.dismiss_notification()
        • NotificationBell.info()
        • NotificationBell.set_notifications()
        • NotificationBell.update_text()
      • NotificationCenter
        • NotificationCenter.__init__()
        • NotificationCenter.add_notification()
        • NotificationCenter.clear()
        • NotificationCenter.dismiss_notification()
        • NotificationCenter.get_count()
        • NotificationCenter.get_instance()
        • NotificationCenter.get_unread_count()
        • NotificationCenter.hide_popup()
        • NotificationCenter.mark_all_as_read()
        • NotificationCenter.show_popup()
        • NotificationCenter.toggle_popup()
      • NotificationPopup
        • NotificationPopup.__init__()
        • NotificationPopup.defaults
        • NotificationPopup.draw()
        • NotificationPopup.drawer
        • NotificationPopup.show()
        • NotificationPopup.update_notifications()
        • NotificationPopup.win
      • SimplePopup
        • SimplePopup.__init__()
        • SimplePopup.defaults
        • SimplePopup.draw()
        • SimplePopup.drawer
        • SimplePopup.show()
        • SimplePopup.win
      • StateStorage
        • StateStorage.__init__()
        • StateStorage.clear()
        • StateStorage.decrement()
        • StateStorage.delete()
        • StateStorage.get()
        • StateStorage.get_instance()
        • StateStorage.has()
        • StateStorage.increment()
        • StateStorage.items()
        • StateStorage.keys()
        • StateStorage.save()
        • StateStorage.save_all()
        • StateStorage.set()
        • StateStorage.toggle()
        • StateStorage.update()
        • StateStorage.values()
      • setup_qtile_hooks()
    • Submodules
      • StateStorage API
        • StateStorage
        • setup_qtile_hooks()
        • Classes
        • Functions
      • Extensions API
        • BasePopup
        • NotificationCenter
        • NotificationPopup
        • PopupRegistry
        • SimplePopup
        • close_all_popups()
        • get_open_popups()
        • is_popup_open()
        • Popup Module
        • NotificationCenter Module
      • Widgets API
        • NotificationBell
        • NotificationBell
  • StateStorage API
    • StateStorage
      • StateStorage.__contains__()
      • StateStorage.__delitem__()
      • StateStorage.__enter__()
      • StateStorage.__exit__()
      • StateStorage.__getitem__()
      • StateStorage.__init__()
      • StateStorage.__len__()
      • StateStorage.__setitem__()
      • StateStorage.clear()
      • StateStorage.decrement()
      • StateStorage.delete()
      • StateStorage.get()
      • StateStorage.get_instance()
      • StateStorage.has()
      • StateStorage.increment()
      • StateStorage.items()
      • StateStorage.keys()
      • StateStorage.save()
      • StateStorage.save_all()
      • StateStorage.set()
      • StateStorage.toggle()
      • StateStorage.update()
      • StateStorage.values()
    • setup_qtile_hooks()
    • Classes
      • StateStorage
        • StateStorage
    • Functions
      • setup_qtile_hooks()
  • Extensions API
    • BasePopup
      • BasePopup.__init__()
      • BasePopup.close_all()
      • BasePopup.is_any_open()
      • BasePopup.show()
    • NotificationCenter
      • NotificationCenter.__init__()
      • NotificationCenter.add_notification()
      • NotificationCenter.clear()
      • NotificationCenter.dismiss_notification()
      • NotificationCenter.get_count()
      • NotificationCenter.get_instance()
      • NotificationCenter.get_unread_count()
      • NotificationCenter.hide_popup()
      • NotificationCenter.mark_all_as_read()
      • NotificationCenter.show_popup()
      • NotificationCenter.toggle_popup()
    • NotificationPopup
      • NotificationPopup.__init__()
      • NotificationPopup.defaults
      • NotificationPopup.draw()
      • NotificationPopup.show()
      • NotificationPopup.update_notifications()
    • PopupRegistry
      • PopupRegistry.close_all_popups()
      • PopupRegistry.close_popup()
      • PopupRegistry.get_open_popups()
      • PopupRegistry.is_popup_open()
      • PopupRegistry.register()
      • PopupRegistry.unregister()
    • SimplePopup
      • SimplePopup.__init__()
      • SimplePopup.defaults
      • SimplePopup.draw()
      • SimplePopup.show()
    • close_all_popups()
    • get_open_popups()
    • is_popup_open()
    • Popup Module
      • NotificationPopup
        • NotificationPopup.__init__()
        • NotificationPopup.defaults
        • NotificationPopup.draw()
        • NotificationPopup.drawer
        • NotificationPopup.show()
        • NotificationPopup.update_notifications()
        • NotificationPopup.win
      • SimplePopup
        • SimplePopup.__init__()
        • SimplePopup.defaults
        • SimplePopup.draw()
        • SimplePopup.drawer
        • SimplePopup.show()
        • SimplePopup.win
      • NotificationPopup
        • NotificationPopup
      • SimplePopup
        • SimplePopup
    • NotificationCenter Module
      • NotificationCenter
        • NotificationCenter.__init__()
        • NotificationCenter.add_notification()
        • NotificationCenter.clear()
        • NotificationCenter.dismiss_notification()
        • NotificationCenter.get_count()
        • NotificationCenter.get_instance()
        • NotificationCenter.get_unread_count()
        • NotificationCenter.hide_popup()
        • NotificationCenter.mark_all_as_read()
        • NotificationCenter.show_popup()
        • NotificationCenter.toggle_popup()
      • NotificationCenter
        • NotificationCenter
  • Widgets API
    • NotificationBell
      • NotificationBell.__init__()
      • NotificationBell.add_notification()
      • NotificationBell.button_press()
      • NotificationBell.calculate_length()
      • NotificationBell.clear_notifications()
      • NotificationBell.defaults
      • NotificationBell.dismiss_notification()
      • NotificationBell.info()
      • NotificationBell.set_notifications()
      • NotificationBell.update_text()
    • NotificationBell
      • NotificationBell
        • NotificationBell.__init__()
        • NotificationBell.add_notification()
        • NotificationBell.button_press()
        • NotificationBell.calculate_length()
        • NotificationBell.clear_notifications()
        • NotificationBell.defaults
        • NotificationBell.dismiss_notification()
        • NotificationBell.info()
        • NotificationBell.set_notifications()
        • NotificationBell.update_text()
      • NotificationBell
        • NotificationBell.__init__()
        • NotificationBell.add_notification()
        • NotificationBell.button_press()
        • NotificationBell.calculate_length()
        • NotificationBell.clear_notifications()
        • NotificationBell.defaults
        • NotificationBell.dismiss_notification()
        • NotificationBell.info()
        • NotificationBell.set_notifications()
        • NotificationBell.update_text()

Development

  • Testing
    • Running Tests
      • Test Options
    • Xephyr Tests
    • Installing Xephyr
    • Test Structure
    • Test Fixtures
    • Writing Tests
    • Example Test
    • Test Dependencies
    • Continuous Integration
  • Contributing
    • Ways to Contribute
    • Getting Started
    • Making Changes
    • Submitting Changes
    • Code Style
    • Documentation
    • Testing
    • Merge Request Guidelines
    • Review Process
    • Code of Conduct
    • License

Additional Information

  • Changelog
    • Unreleased
      • Added
    • [0.1.0] - 2026-06-16
    • [0.0.1] - 2026-04-10
  • License
    • What This Means
    • No Warranty
    • Open Source
qtile-expanded
  • Popup Utilities

Popup Utilities

The popup module provides popup window functionality for displaying temporary UI elements in Qtile.

NotificationPopup

A full-screen popup for displaying notifications with a trash bin icon.

Basic Usage

from qtile_expanded import NotificationPopup

# In your config.py keybindings
def show_notifications(qtile):
    popup = NotificationPopup(
        qtile,
        notifications=[
            {"app_name": "Test", "summary": "Hello", "body": "World"}
        ],
        on_clear=lambda: print("All cleared"),
        on_dismiss=lambda idx: print(f"Dismissed {idx}"),
    )
    popup.show()

keys = [
    Key([], "F12", lazy.function(show_notifications)),
]

Configuration Options

popup = NotificationPopup(
    qtile,
    notifications=notifications,  # List of notification dicts
    background="#1a1a2e",        # Background color
    foreground="#eeeeee",        # Text color
    border_color="#333333",      # Border color
    border_width=2,             # Border width
    corner_radius=8,            # Corner radius
    opacity=0.95,               # Opacity (0.0 to 1.0)
    font="sans",                # Font family
    fontsize=14,                # Base font size
    title_fontsize=18,         # Title font size
    padding=20,                 # Padding
    item_padding=15,            # Padding between items
    max_width=800,              # Max content width
    max_notifications=10,       # Max notifications to display
    trash_icon="\u267b",        # Unicode trash bin icon
    trash_size=24,              # Trash icon size
    on_close=callback,          # Called when popup closes
    on_clear=callback,          # Called when trash is clicked
    on_dismiss=callback,        # Called when notification is dismissed
)

Methods

popup.show()                      # Show the popup
popup.hide()                      # Hide the popup
popup.update_notifications(lst)  # Update notification list
popup.draw()                      # Redraw the popup

Notification Structure

Each notification should be a dictionary with these optional fields:

{
    "app_name": "Application Name",
    "summary": "Notification Title",
    "body": "Notification body text",
    "icon": "/path/to/icon.png",
    "urgency": 1,  # 0=low, 1=normal, 2=critical
    "timestamp": "2026-01-01T12:00:00",
}

SimplePopup

A simple centered popup for any purpose.

Basic Usage

from qtile_expanded import SimplePopup

popup = SimplePopup(qtile, text="Hello, World!", timeout=5)
popup.show()

Configuration Options

popup = SimplePopup(
    qtile,
    text="Message",               # Text to display
    background="#1a1a2e",        # Background color
    foreground="#eeeeee",        # Text color
    border_color="#333333",      # Border color
    border_width=2,             # Border width
    corner_radius=8,            # Corner radius
    opacity=0.95,               # Opacity
    font="sans",                # Font family
    fontsize=14,                # Font size
    padding=20,                 # Padding
    max_width=400,              # Maximum width
    timeout=5,                  # Auto-close timeout in seconds (None for no timeout)
)

Methods

popup.show(text)    # Show the popup with optional new text
popup.hide()        # Hide the popup
popup.draw()        # Redraw the popup

API Reference

Popup utilities for Qtile Expanded.

This module provides popup window functionality for displaying notifications and other temporary UI elements.

Features: - NotificationPopup: Full-screen popup for displaying notifications - SimplePopup: General-purpose centered popup - Button: Clickable elements within popups - Layout helpers for organizing popup content

All popups inherit from BasePopup which provides: - Automatic registration when shown - Automatic unregistration when hidden - External control via close_all_popups() function

class qtile_expanded.extensions.popup.NotificationPopup(*args: Any, **kwargs: Any)[source]

Bases: BasePopup

A full-screen popup for displaying notifications.

This popup covers the entire screen and displays a list of notifications with the ability to dismiss them individually or all at once.

Inherits from BasePopup, which automatically registers the popup when shown and unregisters when hidden, enabling external control via close_all_popups().

Args:

qtile: The Qtile instance notifications: List of notification dicts with keys:

  • app_name: Application name

  • summary: Notification summary

  • body: Notification body text

  • icon: Optional icon path

  • urgency: Urgency level (0=low, 1=normal, 2=critical)

  • timestamp: When the notification was received

on_close: Callback when popup is closed on_clear: Callback when all notifications are cleared on_dismiss: Callback when a specific notification is dismissed

__init__(qtile, notifications=None, on_close=None, on_clear=None, on_dismiss=None, **config)[source]

Initialize the notification popup.

defaults = [('background', '#1a1a2e', 'Background color of the popup.'), ('foreground', '#eeeeee', 'Text color.'), ('border_color', '#333333', 'Border color.'), ('border_width', 2, 'Border width.'), ('corner_radius', 8, 'Corner radius for rounded corners.'), ('opacity', 0.95, 'Opacity of the popup (0.0 to 1.0).'), ('font', 'sans', 'Font family.'), ('fontsize', 14, 'Base font size.'), ('title_fontsize', 18, 'Font size for notification titles.'), ('padding', 20, 'Padding around the popup content.'), ('item_padding', 15, 'Padding between notification items.'), ('max_width', 800, 'Maximum width for notification content.'), ('max_notifications', 10, 'Maximum number of notifications to display.'), ('trash_icon', '♻', 'Unicode trash bin icon.'), ('trash_size', 24, 'Size of the trash icon.'), ('close_on_click_outside', True, 'Close popup when clicking outside.')]
draw()[source]

Draw the popup with all notifications.

show(notifications=None)[source]

Show the popup with the given notifications.

update_notifications(notifications)[source]

Update the list of notifications and redraw.

class qtile_expanded.extensions.popup.SimplePopup(*args: Any, **kwargs: Any)[source]

Bases: BasePopup

A simple popup dialog for Qtile.

This is a more general-purpose popup that can be used for any purpose.

Inherits from BasePopup, which automatically registers the popup when shown and unregisters when hidden, enabling external control via close_all_popups().

Args:

qtile: The Qtile instance text: Text to display **config: Additional Popup configuration

__init__(qtile, text='', **config)[source]

Initialize the simple popup.

defaults = [('background', '#1a1a2e', 'Background color.'), ('foreground', '#eeeeee', 'Text color.'), ('border_color', '#333333', 'Border color.'), ('border_width', 2, 'Border width.'), ('corner_radius', 8, 'Corner radius.'), ('opacity', 0.95, 'Opacity.'), ('font', 'sans', 'Font family.'), ('fontsize', 14, 'Font size.'), ('padding', 20, 'Padding.'), ('max_width', 400, 'Maximum width.'), ('timeout', None, 'Auto-close timeout in seconds, or None.')]
draw()[source]

Draw the popup.

show(text=None)[source]

Show the popup with optional new text.

Previous Next

© Copyright 2026, zordsdavini.

Built with Sphinx using a theme provided by Read the Docs.