Monorepo for Aesthetic.Computer aesthetic.computer
at main 27 lines 513 B view raw
1import blessed from 'blessed'; 2 3// Create a screen object 4const screen = blessed.screen({ 5 smartCSR: true, 6 title: 'Blue Square' 7}); 8 9// Create a box to represent the blue square 10const blueSquare = blessed.box({ 11 top: 'center', 12 left: 'center', 13 width: '50%', 14 height: '50%', 15 style: { 16 bg: 'blue' 17 } 18}); 19 20// Append the blue square to the screen 21screen.append(blueSquare); 22 23// Quit the program when 'q' is pressed 24screen.key(['q', 'C-c'], () => process.exit(0)); 25 26// Render everything 27screen.render();