MCPcopy
hub / github.com/paperwm/PaperWM / lteSpacesThanMonitors

Method lteSpacesThanMonitors

tiling.js:2524–2533  ·  view source on GitHub ↗

* Return true if there are less-than-or-equal-to spaces than monitors.

(onFalseCallback)

Source from the content-addressed store, hash-verified

2522 * Return true if there are less-than-or-equal-to spaces than monitors.
2523 */
2524 lteSpacesThanMonitors(onFalseCallback) {
2525 const cb = onFalseCallback ?? function (_nSpaces, _nMonitors) { };
2526 const nSpaces = [...this].length;
2527 const nMonitors = Main.layoutManager.monitors.length;
2528
2529 if (nSpaces <= nMonitors) {
2530 cb(nSpaces, nMonitors);
2531 }
2532 return nSpaces <= nMonitors;
2533 }
2534
2535 switchMonitor(direction, move, warp = true) {
2536 let focus = display.focus_window;

Callers 2

moveToMonitorMethod · 0.95
swapMonitorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected