diff --git a/bin/test-mouse-grab.py b/bin/test-mouse-grab.py new file mode 100755 index 0000000..872d7cf --- /dev/null +++ b/bin/test-mouse-grab.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python3 + +import tkinter as tk + + +def release_and_exit(event=None): + try: + root.grab_release() + except tk.TclError: + # The XKB grab-breaking action may already have released the grab. + pass + root.destroy() + + +def grab_mouse(): + root.grab_set_global() + status.config(text="Mouse grabbed. Test the XKB ungrab action.") + grab_button.config(state=tk.DISABLED) + + +root = tk.Tk() +root.title("Mouse Grab Test") +root.geometry("420x140") +root.protocol("WM_DELETE_WINDOW", release_and_exit) +root.bind("", release_and_exit) + +status = tk.Label( + root, + text="Click the button to globally grab the mouse.", + padx=20, + pady=20, +) +status.pack() + +grab_button = tk.Button(root, text="Grab mouse", command=grab_mouse) +grab_button.pack() + +tk.Label(root, text="Press Escape to release the grab and exit.").pack(pady=10) + +root.mainloop() diff --git a/codex/config.toml b/codex/config.toml index f2566b4..0051f15 100644 --- a/codex/config.toml +++ b/codex/config.toml @@ -14,6 +14,9 @@ trust_level = "trusted" [projects."/home/jyelon/jbashrc"] trust_level = "trusted" +[projects."/home/jyelon"] +trust_level = "trusted" + [notice.model_migrations] "gpt-5.3-codex" = "gpt-5.4" "gpt-5.4" = "gpt-5.5" diff --git a/install.py b/install.py index fe6bcc9..006fd83 100755 --- a/install.py +++ b/install.py @@ -48,3 +48,4 @@ install("kwalletd/kdewallet.kwl.blank", "~/.local/share/kwalletd/kdewallet.kwl.b install("kwalletd/kdewallet.salt.blank", "~/.local/share/kwalletd/kdewallet.salt.blank") install("ssh/config", "~/.ssh/config") install("bin/clean-vscode.sh", "~/bin/clean-vscode.sh") +install("bin/test-mouse-grab.py", "~/bin/test-mouse-grab.py")