# Script generated by Anthropic Claude AI
import gi
gi.require_version('Gio', '2.0')
from gi.repository import Gio, GLib

class SettingsMonitor:
    def __init__(self, schema_id):
        self.settings = Gio.Settings.new(schema_id)
        self.settings.connect("changed", self.on_settings_changed)

    def on_settings_changed(self, settings, key):
        value = settings.get_value(key)
        print(f"Key Changed: '{key}'\nNew value: {value}\n")

    def run(self):
        print(f"Monitoring changes for schema: {self.settings.props.schema_id}")
        print("Press Ctrl+C to stop.")
        try:
            GLib.MainLoop().run()
        except KeyboardInterrupt:
            print("\nMonitoring stopped.")

if __name__ == "__main__":
    import sys

    if len(sys.argv) != 2:
        print("Usage: python script.py <schema_id>")
        print("Example: python script.py org.gnome.desktop.interface")
        sys.exit(1)

    schema_id = sys.argv[1]
    monitor = SettingsMonitor(schema_id)
    monitor.run()