How to use the blessed.listbar 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 aws / aws-iot-device-sdk-js / examples / temperature-control / temperature-control.js View on Github external
} else {
      title = blessed.text({
         top: 0,
         left: 'center',
         align: 'center',
         content: 'MOBILE APPLICATION SIMULATOR'
      });
   }
   var help = blessed.text({
      top: 1,
      left: 'center',
      align: 'center',
      content: '(use arrow keys to change temperature)'
   });

   var bar = blessed.listbar({
      //parent: screen,
      bottom: 0,
      left: 'center',
      //  right: 3,
      height: 'true' ? 'shrink' : 3,
      //  mouse: true,
      keys: true,
      autoCommandKeys: false,
      border: 'line',
      vi: true,
      style: {
         bg: 'black',
         item: {
            bg: 'black',
            hover: {
               bg: 'blue'
github shobrook / BitVision / bitvision / index.js View on Github external
blessed.ListTable,
    createListTable("left", padding)
  );
  transactionsTable = grid.set(
    26,
    20,
    10,
    9,
    blessed.ListTable,
    createListTable("left", padding)
  );

  headlinesTable.focus();

  // Create menu
  menubar = blessed.listbar({
    parent: screen,
    keys: true,
    bottom: 0,
    left: 0,
    height: 1,
    style: { item: { fg: "yellow" }, selected: { fg: "yellow" } },
    commands: {
      Login: {
        keys: ["l", "L"],
        callback: () => {
          loginEntryStatus = true;
          displayLoginScreen();
        }
      },
      "Toggle Autotrading": {
        keys: ["a", "A"],
github groupon / DotCi / src / main / jsx / terminal / src / build.js View on Github external
function buildHeader(serverUrl,onBack,axisList,screen,logWidget){
  const header = blessed.listbar({
    height: 'shrink',// : 3,
    mouse: true,
    width: '100%',
    keys: true,
    autoCommandKeys: true,
    border: 'line',
    vi: true,
    style: {
      // bg: 'green',
      item: {
        // bg: 'red',
        hover: {
          bg: 'blue'
        },
        focus: {
          bg: 'blue'
github node-opcua / opcua-commander / index.js View on Github external
let lines;
    const format = util.format;

    console.log = function () {

        const str = format.apply(null, arguments);
        lines = str.split("\n");
        lines.forEach(function (str) {
            logWindow.addItem(str);
        });
        logWindow.select(logWindow.items.length - 1);
    };

    area2.append(logWindow);

    const menuBar = blessed.listbar({
        parent: area2,
        top: "100%-2",
        left: "left",
        width: "100%",
        height: 2,
        keys: true,
        style: {
            prefix: {
                fg: "white"
            }
        },
        //xx label: " {bold}{cyan-fg}Info{/cyan-fg}{/bold}",
        //xx border: "line",
        bg: "cyan"
    });
github kicumkicum / vknplayer / app / ui / console / widgets / lib / controls.js View on Github external
var Controls = function() {
	this._node = blessed.listbar({
		parent: app.ui.console.screen,
		bottom: 0,
		left: 0,
		right: 0,
		height: 3,
		width: 'shrink',
		mouse: true,
		keys: true,
		autoCommandKeys: true,
		scrollable: true,
		border: {
			type: 'line'
		},
		style: {//todo it needed
			item: {
				hover: {}
github golbin / git-commander / view / branch.js View on Github external
var init = function (screen) {
  styles.layout.parent = screen;

  layout = blessed.layout(styles.layout);

  styles.list.parent    = layout;
  styles.menubar.parent = layout;

  list    = blessed.list(styles.list);
  menubar = blessed.listbar(styles.menubar);

  styles.prompt.parent  = list;
  prompt  = blessed.prompt(styles.prompt);

  return {
    layout : layout,
    list   : list,
    menubar: menubar,
    prompt : prompt
  };
};
github astefanutti / kubebox / lib / ui / dashboard.js View on Github external
label  : 'Resources',
      parent : screen,
      left   : '50%',
      top    : 1,
      right  : 0,
      height : '50%-1',
      tags   : true,
      border : 'line',
      style  : {
        label  : { bold: true },
        border : { fg: 'white' },
        text   : 'white',
      },
    });

    const tabs = blessed.listbar({
      parent : resources,
      top    : 0,
      left   : 1,
      right  : 1,
      height : 'shrink',
      mouse  : true,
      keys   : true,
      style  : {
        bg   : 'white',
        item : {
          fg : 'blue',
          bg : 'white',
          hover : {
            fg : 'white',
            bg : 'lightblue',
          },
github golbin / git-commander / view / main.js View on Github external
var title = {
  staged  : blessed.box(styles.title.staged),
  unstaged: blessed.box(styles.title.unstaged)
};

var list = {
  staged  : blessed.list(styles.list.staged),
  unstaged: blessed.list(styles.list.unstaged)
};

list.staged.name   = "staged";
list.unstaged.name = "unstaged";

var branchbox = blessed.box(styles.branchbox);

blessed.listbar(styles.menubar1);
blessed.listbar(styles.menubar2);

var loading = blessed.loading(styles.loading);

var popup = blessed.text(styles.popup);

module.exports = {
  screen   : screen,
  title    : title,
  list     : list,
  branchbox: branchbox,
  loading  : loading,
  popup    : popup
};
github Tibing / platform-terminal / projects / platform-terminal / src / lib / adapters / listbar.ts View on Github external
export function listbarAdapter(options?: Widgets.ListbarOptions) {
  return blessed.listbar({ ...options, ...defaultOptions });
}