mu-player
Version:
Play music from vk.com and soundcloud.com via Music Player Daemon
52 lines (44 loc) • 907 B
JavaScript
var blessed = require('blessed');
// Create a screen object.
var screen = blessed.screen({
smartCSR: true
});
screen.title = 'my window title';
// Create a box perfectly centered horizontally and vertically.
var box = blessed.box({
top: 0,
left: 0,
width: '100%',
height: '100%',
//content: 'Hello {bold}world{/bold}!',
tags: true,
border: {
type: 'line'
},
style: {
fg: 'white',
bg: 'magenta',
border: {
fg: '#f0f0f0'
},
hover: {
bg: 'green'
}
}
});
// Append our box to the screen.
screen.append(box);
// Add a png icon to the box
var icon = blessed.image({
parent: box,
// top: 0,
// left: 0,
//type: 'overlay',
//width: '100%',
//height: '100%',
//file: __dirname + '/unnamed.png',
file: 'http://img2-ak.lst.fm/i/u/64s/accadf273c414b859441d2a5e5514cf7.png',
search: false
});
//screen.append(icon);
screen.render();