GithubHelp home page GithubHelp logo

happysmash27 / picom-xrdesktop-companion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yshui/picom-xrdesktop-companion

0.0 1.0 0.0 181 KB

picom's companion program to bring your desktop to XR

Shell 0.03% C 4.68% Rust 95.29%

picom-xrdesktop-companion's Introduction

picom-xrdesktop-companion

What is this

picom-xrdesktop-companion is a program that runs alongside picom, that mirrors your desktop windows to the VR/XR space.

To see what it would look like, you can watch this video by the developers of xrdesktop:

xrdesktop

There are also a bunch of example videos in this article.

How to use

First, you need to build this program

To use this program, you must have picom installed on your system. For now, only the latest git version of picom is supported. (AUR).

First, make sure picom is running with dbus support enabled:

picom --dbus

Then, make sure SteamVR is running. And after that, start this program. You should see your windows mirrored.

Installation

Dependencies

Building

Simply run

cargo build --release

The resulting binary will be at ./target/release/app

Limitations

Bugs

Both this program and xrdesktop are in their early stages, so bugs and crashes can often happen. Feel free to open an issue here for problems you have encountered.

Window stacking

When you move your pointer over a window in VR, the corresponding window must to raised to the top of the window stack to make sure it is not obscured and is able to receive input. This program makes best effort attempt to do that, but it might not work well with all window managers or programs.

It also changes how your windows are stacked and doesn't attempt to restore it after you stop window mirroring.

Scene mode

Scene mode isn't supported currently. Please change default mode to "overlay" in xrdesktop settings.

Questions

Why picom?

Believe it or not, this has nothing to do with picom being a compositor. Let me explain.

X has a very low level concept of "windows" and is not at all what we users would consider "windows". A set of conventions have developed over the decades to establish what we would consider as a window. These conventions are used by window managers to establish their internal knowledge of windows. Unfortunately this knowledge is only internal to the window manager, and if you want to, say, know what windows are open at the moment, you need to replicate at least part of what the window manager is doing.

And believe me, what it does is arcane. Besides that, your program also has to interact with the window manager and interpret its manipulations of windows correctly. The whole thing is really complex and complicated and you really don't want to do it. That's why xrdesktop developers chose to only integrate xrdesktop as part of the window manager (i.e. as a plugin, or by patching the window manager), instead of making it standalone. (BTW, please stop using X and switch to a wayland compositor if you can).

OTOH, picom, as a compositor, has already implemented the arcane window managing functionality just to function as a compositor. And fortunately, it also has a dbus interface that exposes its knowledge regarding windows. And that's what this program uses to mirror your windows. That's the only part of picom this program needs, so you don't even have to run picom as your compositor. If you want, you can run:

picom --dbus --experimental-backends --backend dummy

this way picom will provide the window information but not run as a compositor.

Acknowledgements

Thanks to the good people at Collabora that made xrdesktop. They also make a ton of interesting stuff and you have probably already heard of them if you are into Linux gaming, so check them out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.