NoFOMO
Search 中EN Sign in Sign up

Peaked at #3 Off the board

Rex UI feature

Mitchell Hashimoto announced Rex's Lua scripting now includes rex.ui for building user-interactive automations across multiple clients.

Rank over time

Key points

  • Rex added new `rex.ui` primitives for building interactive scripts that require user interaction, per @almonk.
  • @mitchellh said the choice prompt pops up on all attached clients and the first client to respond wins, hiding the prompt from the rest.
  • @mitchellh said if a client is already showing a prompt, Rex responds with a "busy" error code and lets the Lua script decide what to do.
  • @almonk wrote docs detailing how the feature works and linked them.

Key points and the reaction summary are written by AI from the posts on this page. Check the original post. How we use AI

Original post

Mitchell Hashimoto @mitchellh 242.9K followers

Rex has really powerful Lua scripting that our beta group has been using to huge effect. We expanded it today with `rex.ui`: a way to build automations that require user interaction. The way this works with multiple clients: the choice pops up on all attached clients. The first client to respond wins (and hides the prompt from the rest). If any client is already showing a prompt, we respond with a "busy" error code and let the Lua script decide what it wants to do (sleep, try again, force it, etc.). This will surely improve, but the API gives us flexibility to improve it later. If no clients exist, another error code Lua can detect is returned noting that no user is attached, and it can decide what it wants to do.Quoting @almonk: posted this into our Rex discord today... the new `𝚛𝚎𝚡.𝚞𝚒` primitives provides a new set of simple but powerful methods to build interactive scripts within Rex that require user interaction. Now you can build the workflow of your dreams, that little action you always wanted or just a pizza topping selector. I wrote some docs up that go into detail about how this feature works https://t.co/4UXo1z
408likes 7reposts 27replies 21.8Kviews

View on X Save

Top replies on X

Reaction on X: Replies are positive: users say they converted a small TUI and ported a tmux sessionizer's session picker to the feature, calling it nice and sleek. The original poster also joked that this doubles as an ad for @paper.

Sign in to see 3 top replies from X

From @almonk, @kungfusheep, @baggiiiie and others. Spam removed, with English and Chinese translations.

Sign up free Have an account? Sign in

Discussion 0

No comments yet. Start the conversation.

Suggest a source

Is there a first-hand source we're missing, or a topic we should watch? Tell us. Once approved, everyone's board covers it.

@username or profile link