Skip to content

Commit f30a825

Browse files
committed
Removed main menu from grid
1 parent e26f0bc commit f30a825

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed

Diff for: .config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Add here the settings you wish to override
22
INPUT_L: "PulseAudio JACK Sink:front-left"
3+
INPUT_R: "PulseAudio JACK Sink:front-right"
34
INPUT_MODE: "stereo"

Diff for: src/layout.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ function setUpLayout(screen) {
3434
mainScreen = screen;
3535

3636
var grid = new contrib.grid({ rows: 28, cols: 18, screen: mainScreen });
37-
this.mainMenu = MainMenuWidget.make(grid, 0, 0, 18, 2, 0);
38-
this.logWidget = LogWidget.make(grid, 13, 8, 5, 20);
39-
this.statusWidget = StatusWidget.make(grid, 13, 2, 5, 6);
37+
this.mainMenu = MainMenuWidget.make(screen, 0, 0, 18, 2, 0);
38+
this.logWidget = LogWidget.make(grid, 13, 7, 5, 21);
39+
this.statusWidget = StatusWidget.make(grid, 13, 1, 5, 6);
4040

4141
const Page = function (...widgets) {
4242
this.widgets = widgets;
@@ -60,22 +60,22 @@ function setUpLayout(screen) {
6060
* @param {*} screen
6161
*/
6262
const page0 = new Page(
63-
new CategoriesWidget(grid, 0, 2, 2, 26),
64-
new PluginListWidget(grid, 2, 2, 5, 26),
65-
new RackWidget(grid, 7, 2, 6, 12),
66-
new PluginInfo(grid, 7, 14, 6, 7)
63+
new CategoriesWidget(grid, 0, 1, 2, 27),
64+
new PluginListWidget(grid, 2, 1, 5, 27),
65+
new RackWidget(grid, 7, 1, 6, 12),
66+
new PluginInfo(grid, 7, 13, 6, 7)
6767
);
6868

6969
/**
7070
*
7171
* Perform Page
7272
*/
7373
const page2 = new Page(
74-
new RackWidget(grid, 0, 2, 5, 9),
74+
new RackWidget(grid, 0, 1, 5, 9),
7575
// new PluginInfoWidget(grid, 0, 14, 6, 7),
76-
new PluginPresetsWidget(grid, 0, 11, 5, 6),
76+
new PluginPresetsWidget(grid, 0, 10, 5, 7),
7777
new PluginMonitor(grid, 0, 17, 5, 11),
78-
new PluginControlWidget(grid, 5, 2, 8, 26)
78+
new PluginControlWidget(grid, 5, 1, 8, 27)
7979
);
8080

8181
/**
@@ -84,8 +84,8 @@ function setUpLayout(screen) {
8484
* @param {*} screen
8585
*/
8686
const page4 = new Page(
87-
new AudioIO(grid, 0, 2, 6, 26, "input"),
88-
new AudioIO(grid, 7, 2, 6, 26, "output")
87+
new AudioIO(grid, 0, 1, 13, 14, "input"),
88+
new AudioIO(grid, 0, 15, 13, 13, "output")
8989
);
9090

9191
const pageSwitcher = new PageSwitcher(mainScreen, [

Diff for: src/widgets/mainMenu.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ const store = require("../store");
66
var mainMenu = {};
77

88
function make(grid, x, y, xSpan, ySpan, page = -1) {
9-
mainMenu = grid.set(y, x, ySpan, xSpan, blessed.listbar, {
9+
mainMenu = blessed.listbar({
10+
top: 0,
11+
left: 0,
12+
right: 0,
13+
height: 1,
1014
items: {
1115
Choose: () => {
1216
store.setCurrentPage(0);
@@ -41,18 +45,21 @@ function make(grid, x, y, xSpan, ySpan, page = -1) {
4145
autoCommandKeys: true,
4246
tags: true,
4347
style: {
48+
bg: "#28492a",
4449
selected: {
4550
bg: "#689d6a",
4651
fg: "#f0f0f0",
4752
bold: true,
4853
},
54+
item: {
55+
bg: "#28492a",
56+
},
4957
focus: {
5058
border: { fg: "red" },
5159
enabled: false,
5260
selected: {
5361
bg: "#689d6a",
5462
fg: "#f0f0f0",
55-
5663
bold: true,
5764
},
5865
},
@@ -63,6 +70,7 @@ function make(grid, x, y, xSpan, ySpan, page = -1) {
6370
mainMenu.select(page);
6471
}
6572

73+
grid.append(mainMenu);
6674
return mainMenu;
6775
}
6876

0 commit comments

Comments
 (0)