How to use the blessed.message function in blessed

To help you get started, we’ve selected a few blessed examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jhotmann / node-rename-cli / lib / ui.js View on Github external
let selected = infoList.selected;
  if (selected < OPTIONS.length) {
    let optionKey = OPTIONS[selected].split(',')[0].replace(/\W/g, '');
    helpText = yargsOptions[optionKey].describe;
    boxTitle = optionKey + ' option';
  } else {
    let replacementObj = REPLACEMENTS[Object.keys(REPLACEMENTS)[selected - OPTIONS.length]];
    helpText = replacementObj.description;
    boxTitle = replacementObj.name + ' Variable';
    if (replacementObj.parameters) {
      helpText += '\n\nParameters: ' + replacementObj.parameters.description;
    }
  }
  helpText += '\n\n{center}Press space to close{/center}';

  let msg = blessed.message({
    parent: screen,
    label: boxTitle,
    border: 'line',
    height: 'shrink',
    width: 'half',
    top: 'center',
    left: 'center',
    tags: true,
    keys: true
  });
  msg.display(helpText, 0, function() { msg.destroy(); });
});
// ========== END EVENT HANDLERS  ==========
github chjj / termcoin / lib / ui.js View on Github external
parent: screen,
    top: 'center',
    left: 'center',
    height: 5,
    align: 'center',
    width: '50%',
    tags: true,
    hidden: true,
    border: 'line'
  });

  /**
   * Message
   */

  screen._.msg = blessed.message({
    parent: screen,
    top: 'center',
    left: 'center',
    // Fixed in blessed:
    // height: '50%',
    height: 'shrink',
    width: '50%',
    align: 'center',
    tags: true,
    hidden: true,
    border: 'line',
    // "q" will not make the box disappear on display()
    ignoreKeys: ['q']
  });

  /**
github chjj / termcoin / lib / ui.js View on Github external
// height: '50%',
    height: 'shrink',
    width: '50%',
    align: 'center',
    tags: true,
    hidden: true,
    border: 'line',
    // "q" will not make the box disappear on display()
    ignoreKeys: ['q']
  });

  /**
   * Details
   */

  screen._.details = blessed.message({
    parent: screen,

    // Fixed in blessed.
    // top: 'center',
    // left: 'center',
    // height: 'shrink',
    // width: 'shrink',

    //top: 2,
    //left: 4,
    //right: 4,
    //bottom: 2,

    top: 'center',
    left: 'center',
    width: '70%',
github taurusai / kungfu / cli / src / assets / components / Dashboard.js View on Github external
initMessage(){
        const t = this;
        t.message = blessed.message({
            parent: t.screen,
            top: '100%-5',
            left: '100%-30',
            height: 5,
            padding: DEFAULT_PADDING,
            align: 'left',
            valign: 'center',
            width: 30,
            tags: true,
            hidden: true,
            border: 'line'
        });
    }
github RX14 / discord-curses / src / display.ts View on Github external
parent: this.screen,

            bottom: 0,
            right: 0,
            height: 1
        })

        this.chatInputSeperator = Blessed.line({
            parent: this.screen,

            bottom: 1,
            right: 0,
            orientation: 'horizontal'
        })

        this.loginMessage = Blessed.message({
            parent: this.screen,

            top: "center",
            left: "center",
            height: "shrink",
            width: "half",

            tags: true,
            keys: true,
            hidden: true,

            border: "line"
        })
    }
github ewnd9 / badtaste / src / tui / components / message.js View on Github external
export default (parent, label) => blessed.message({
  parent,
  ...stylesheet,
  label
});
github taurusai / kungfu / cli / src / components / monitor / index.js View on Github external
initLoader(){
        const t = this;
        t.message = blessed.message({
            parent: t.screen,
            top: '100%-5',
            left: '100%-30',
            height: 5,
            align: 'left',
            valign: 'center',
            width: 30,
            tags: true,
            hidden: true,
            border: 'line'
        });
    }
github infinitered / reactotron / legacy / reactotron-cli / src / ui / layout.js View on Github external
const messageBox = blessed.message({
  parent: screen,
  top: 'center',
  left: 'center',
  height: 'shrink',
  width: 'shrink',
  border: 'line',
  label: ' {blue-fg}Message{/} ',
  tags: true,
  keys: true,
  mouse: true,
  hidden: true
})

const infoBox = blessed.message({
  parent: screen,
  top: 'center',
  left: 'center',
  height: 'shrink',
  width: '40%',
  border: 'line',
  label: ' {blue-fg}Info{/} ',
  tags: true,
  keys: true,
  mouse: true,
  hidden: true,
  style: {
    bg: '#023f00',
    border: {
      fg: '#f0f0f0'
    }
github taurusai / kungfu / app / src / cli / public / Dashboard.js View on Github external
initMessage(){
        const t = this;
        t.message = blessed.message({
            parent: t.screen,
            top: '100%-5',
            left: '100%-30',
            height: 5,
            padding: DEFAULT_PADDING,
            align: 'left',
            valign: 'center',
            width: 30,
            tags: true,
            hidden: true,
            border: 'line'
        });
    }
github baumhoto / FeedlyTerminal / index.js View on Github external
content: 'Feedly Terminal'
});

var loader = blessed.loading({
  parent: screen,
  top: 'center',
  left: 'center',
  height: 5,
  align: 'center',
  width: '50%',
  tags: true,
  hidden: true,
  border: 'line'
});

var msg = blessed.message({
  parent: screen,
  top: 'center',
  left: 'center',
  height: 'shrink',
  width: '50%',
  align: 'center',
  tags: true,
  hidden: true,
  border: 'line'
});

var prompt = blessed.prompt({
  parent: screen,
  top: 'center',
  left: 'center',
  height: 'shrink',