Questions tagged [blessed]

Blessed is a "curses-like library with a high level terminal interface API for Node.js."

Blessed is a JavaScript library, similar to (n)curses in C/C++. It makes it possible to create CLI (Command Line Interface) applications using Node.js.

The library is organized around widgets which provide a convenient way to build text interfaces:

  • Base Nodes: Node, Screen, Element
  • Boxes: Box, Text, Line, BigText
  • Lists: List, FileManager, ListTable, Listbar
  • Forms: Form, Input, Textarea, Textbox, Button, Checkbox, RadioSet, RadioButton
  • Prompts: Prompt, Question, Message, Loading
  • Data Display: ProgressBar, Log, Table
  • Special Elements: Terminal, Image, ANSIImage, OverlayImage, Video, Layout

This project is available on GitHub and npm.

29 questions
8
votes
1 answer

Blessed server (Node.js) over websocket to Xterm.js client in Browser

What I have: Node.js script running Blessed, and http/websocket server. Browser running Xterm.js and websocket client. What I want to do: Render blessed to the xterm window over websockets. Server Code: "use strict"; process.title =…
7
votes
1 answer

Drawing a line that's always as wide as its parent BoxElement?

I'm using a BoxElement from blessed to display a chat history. Sentences are added using pushLine. For clarity, days are divided by lines (another string added using pushLine). Each line is as wide as the parent BoxElement. If the TUI is resized…
Martin Cowie
  • 3,208
  • 6
  • 36
  • 71
6
votes
1 answer

Blessed: Make a log widget scrollable

I'm using the Blessed library to make a dashboard in the terminal. I'm logging things into a log widget, and would like to make the widget scrollable. With the below code, the scrollbar is appearing, but I can't actually scroll using my mouse wheel,…
Rich
  • 5,316
  • 9
  • 35
  • 58
5
votes
2 answers

Blessed "Prompt" is black on black by default - how do I style it?

I am using blessed and I am trying to add a prompt to my application. It works fine, but I can't read its text. I have prepared a minimal example, that illustrates, what I see. I would like to know how I can style the text in the inputs. The…
amenthes
  • 2,817
  • 30
  • 37
4
votes
1 answer

How to create a scrollable box with blessed/nodejs

I cannot figure out, how to create a scrollable box with blessed. https://github.com/chjj/blessed According to the docs, it should be like this: "use strict"; const blessed = require('blessed'); const screen = blessed.screen({ smartCSR:…
Tanel Tammik
  • 11,289
  • 3
  • 17
  • 29
2
votes
1 answer

node.js - How to spawn a child process without blocking stdin of parent process?

I'm making an interactive CLI in node (and blessed.js) that spawns child processes every couple of seconds to run some Python scripts. These scripts modify a set of JSON files that the CLI pulls from. The problem is that the CLI must be able to…
2
votes
1 answer

Blessed objects conversion to JSON

How do I convert a blessed object into JSON in Perl? Following is the array I have: @x = ({ 'notificationtype' => 'TRAP', 'receivedfrom' => 'UDP: [10.127.34.212]:48909->[10.127.34.182]:162', 'version' => 1, }, …
1
vote
0 answers

How to create click listener for grid?

I'm trying to create grid (for example 5x5). After creating grid I want to click on an item and pass coordinates into my onClick(i,j) method. How can I do this using blessed and blessed-contrib? This is my code. This is Gomoku game or Five in a…
1
vote
0 answers

importing python's Blessed library causes a regex error?

I wanted to learn about python's Blessed library, maybe make a text-based game or some useful thing. but no matter what code write, whenever I import blessed I get an error report. Ive tried various code, including examples of complete code which…
Drew LR
  • 11
  • 1
1
vote
0 answers

Can't use stream in onclick callback

const ToneStream = require('tone-stream') const Speaker = require('speaker'); const blessed…
GameKyuubi
  • 591
  • 1
  • 6
  • 17
1
vote
1 answer

Why does my python blessings print statement not print in the same spot?

I am using blessings (or blessed) to try to print in the same spot in a for-loop. However, I find that this only works if I print 3 above the bottom of the terminal, but if I print 1 or two lines above the bottom it prints a new line for each…
1
vote
1 answer

How to have 2 "areas" in python blessed/blessings/ncurses

I want to be tailing a file and at the same time provide an overlay with keys that can be pressed. How can I make sure that data will be displayed and updated immediately? I hope it wouldn't have to redraw the keys at the bottom all the time. I also…
PascalVKooten
  • 18,070
  • 15
  • 82
  • 140
1
vote
0 answers

How to navigate between forms in Blessed?

I have written code for a terminal UI application using blessed package in NodeJS which contains 2 forms, say form1 and form2 with some widgets like list and checkboxes in each form. So how can I navigate between the forms with keyboard? var…
1
vote
1 answer

How to use the search option in list in Blessed?

I'm building a terminal application using blessed application in NodeJS. Can anyone explain how to use the search option in list? This is the list object I used: var numlist = blessed.List({ top: 23, left: 18, parent: screen, height: 8, …
1
vote
1 answer

How to read STDIN and start blessed terminal app?

I am building a Node.js App. I'm trying to read STDIN buffer, parse it and then start my blessed program, but if I trying to read STDIN my blessed program closed instantly. Also, input doesn't work. Here is an example: // Read stdin into buff const…
Anton Medvedev
  • 2,631
  • 2
  • 21
  • 36
1
2