gitwtfhub

wtf is hyprland-codex-background-computer-use?

gabriel-kahen/hyprland-codex-background-computer-use — explained in plain English

Analysis updated 2026-05-18

0PythonAudience · developerComplexity · 5/5Setup · hard

TL;DR

Lets Codex control existing Hyprland desktop windows in the background, without stealing focus or moving the mouse, with a fallback for stubborn apps.

Mindmap

mindmap
  root((hyprland-codex-background))
    What it does
      Background window control
      No focus stealing
      Screenshot inactive windows
      Headless fallback
    Tech stack
      Python
      Hyprland
      Wayland
      XWayland
      AT-SPI
    Use cases
      AI desktop automation
      Codex agent control
      Background app testing
    Safety
      Locked screen refusal
      Drag-drop refusal
      State recovery

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Let an AI agent inspect and screenshot background windows on a Hyprland desktop without disturbing the user.

REASON 2

Automate clicks, scrolls, and drags inside a background Wayland or XWayland app while the user works elsewhere.

REASON 3

Fall back to a temporary hidden screen for apps that refuse to cooperate with true background control.

What's in the stack?

PythonHyprlandWaylandXWaylandAT-SPIC++

How it stacks up

gabriel-kahen/hyprland-codex-background-computer-use0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultyhardmoderatemoderate
Complexity5/52/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1day+

Requires building a native extension matched to the exact Hyprland ABI version plus several system-level dependencies.

No license information is provided in the README.

Wtf does this do

This project lets an AI automation agent called Codex control applications that are already running on someone's real desktop, without stealing keyboard focus or moving windows around. It works specifically with Hyprland, a Wayland-based desktop environment on Linux, and its goal is to interact with a user's actual signed-in session, files, and open windows instead of spinning up a separate virtual machine or a fresh, disconnected environment. The tool can list all the windows currently open on the desktop and which workspace they belong to, then take a screenshot of a specific window even if that window is sitting on a workspace the user is not currently looking at, all without bringing it to the front. It can send keyboard shortcuts to a specific window by address, and it can click, scroll, and drag inside background windows, whether those windows are native to Wayland or running through XWayland, a compatibility layer for older X11 style applications. For actions that need deeper understanding of what is on screen, it hands off to AT-SPI, an accessibility system built into Linux that lets software read and control user interface elements semantically rather than by guessing pixel coordinates. Some applications will not cooperate with background control no matter what, so the project includes a fallback: it can temporarily create a hidden virtual screen, briefly move the target application there to interact with it, and then restore everything, including its original screen, workspace, and focus, once finished. The project is careful to document that this fallback is the one case where there could be brief interference with whatever the user is actually doing on their real screen. Setting it up requires building a native Hyprland extension from source on the machine that will run it, since the extension has to exactly match that machine's Hyprland version. Beyond that, it needs several system-level dependencies like a screenshot tool, X11 automation tooling, and Python. It also includes clear safety limits: it will not act while the screen is locked, a physical mouse button is held down, or during drag-and-drop, and it is explicitly not meant to bypass logins or anti-cheat systems.

Yoink these prompts

Prompt 1
Walk me through building the native Hyprland extension and loading it with hyprctl plugin load.
Prompt 2
Explain how this project avoids stealing window focus when controlling background Wayland vs XWayland apps.
Prompt 3
What system dependencies do I need installed before running the same-session-computer-use MCP broker?
Prompt 4
Describe the safety boundary that stops this tool from acting during a locked screen or drag-and-drop.

Frequently asked questions

wtf is hyprland-codex-background-computer-use?

Lets Codex control existing Hyprland desktop windows in the background, without stealing focus or moving the mouse, with a fallback for stubborn apps.

What language is hyprland-codex-background-computer-use written in?

Mainly Python. The stack also includes Python, Hyprland, Wayland.

What license does hyprland-codex-background-computer-use use?

No license information is provided in the README.

How hard is hyprland-codex-background-computer-use to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is hyprland-codex-background-computer-use for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.