#!/bin/bash # Launcher script for Niri AI Sidebar with proper Wayland configuration # Get the directory where this script is located SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" # Activate virtual environment if it exists if [ -f "$SCRIPT_DIR/.venv/bin/activate" ]; then source "$SCRIPT_DIR/.venv/bin/activate" fi # Force GTK to use native Wayland backend (not XWayland) export GDK_BACKEND=wayland # Preload GTK4 Layer Shell library to ensure proper initialization export LD_PRELOAD=/usr/lib/libgtk4-layer-shell.so # Run the application exec python3 "$SCRIPT_DIR/main.py" "$@"