Coder Social home page Coder Social logo

display-agent's Introduction

display-agent

Daemon useful to manage orientation, resolution and payload of one or multiple screens over MQTT.

Run

Run go run . to build and run the project.

The following environment variables need to be set:

  • MQTT_SERVER_URL needs to point to an MQTT server (for example test.mosquitto.org:1883)
  • MQTT_TOPIC_PREFIX needs to specify a non-empty topic prefix to publish into (for example bornhack/2023/wip.bar)

MQTT Topics

For each connected output, the server (periodically) publishes to the following topics:

  • $topicPrefix/$outputName@$machineID/state contains the current configuration (display layout, currently active scenario).
  • $topicPrefix/$outputName@$machineID/info Info contains more general information about the connected display (make, model, serial, supported modes).

Check outputs/type.go for an exhaustive list of the fields.

They're published JSON-encoded.

The server listens on the following topics:

  • $topicPrefix/$outputName@$machineID/set

If a message is published to that topic, it is parsed as a (sparse) state, containing all fields that should be updated in the current state.

Backends

The server currently only supports Sway as a backend, by invoking swaymsg.

PRs for other backends welcome! In case you're stuck with X, adding support for i3 should probably be easiest (as the JSON i3-msg can emit should be fairly similar).

display-agent's People

Contributors

flokli avatar

Stargazers

Richard42Graham avatar

Watchers

 avatar  avatar

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.