Files
niri-ai-sidebar/sidebar_window.py
2025-10-24 20:12:51 +02:00

38 lines
1.1 KiB
Python

"""GTK sidebar window definitions."""
from __future__ import annotations
import gi
gi.require_version("Gtk", "4.0")
from gi.repository import Gtk # noqa: E402
class SidebarWindow(Gtk.ApplicationWindow):
"""Minimal window placeholder to confirm the GTK application starts."""
def __init__(self, **kwargs) -> None:
super().__init__(**kwargs)
self.set_default_size(360, 640)
self.set_title("Niri AI Sidebar")
layout = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
layout.set_margin_top(24)
layout.set_margin_bottom(24)
layout.set_margin_start(24)
layout.set_margin_end(24)
title = Gtk.Label(label="AI Sidebar")
title.set_halign(Gtk.Align.START)
title.get_style_context().add_class("title-1")
message = Gtk.Label(
label="GTK app is running. Replace this view with the chat interface."
)
message.set_wrap(True)
message.set_halign(Gtk.Align.START)
layout.append(title)
layout.append(message)
self.set_child(layout)