Skip to content

Instantly share code, notes, and snippets.

@andreivasiliu
Created December 17, 2018 20:49
Show Gist options
  • Save andreivasiliu/9c842fad5b6f0f43616a1eff4bce6963 to your computer and use it in GitHub Desktop.
Save andreivasiliu/9c842fad5b6f0f43616a1eff4bce6963 to your computer and use it in GitHub Desktop.
iogui

iogui

A GUI library that is less of a library and more of a binary, with communication done solely through stdin/stdout. A client would spawn iogui as a child process, send a description of what the GUI should look like in a compact TCL-like manner, and iogui will then send back events whenever something happens (e.g. a button was pressed, an input's text was changed).

Given that communication will be done via text, the following limitations will exist:

  • No custom widgets or canvas surfaces
  • No custom image support
  • No video/audio support
  • No mouse pointer motion events (at least not by default)
  • No custom animations (although "move x to y over n seconds using y function", should be possible)

However, it would have the following features:

  • The ability to lose and later restart the GUI by respawning iogui and resending interface data
  • The ability to have a DISPLAY-like variable and/or option to change the iogui command
    • E.g. --iogui "ssh me@elsewhere iogui"
    • Or a special display-less iogui used for automated testing
    • Or a grep filter to make buttons disappear (e.g. --iogui "grep -v dontshowthis | iogui | grep -v dontdothis")
    • Or a proxy that changes the GUI entirely
    • Or a wrapper that saves state and keeps retrying iogui until a display becomes available again
    • Or a web-hook to a remote server that stores the GUI and presents it as HTML
  • The ability to make complex GUIs in any language with no dependencies, even Bash
  • Highly cross-platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment