* custom module updates to class based. * Finish poller logic. * Use composition for pollers * Rename poller * Handle recorder polling. * Fix quotes in bash command * Remove logs
23 lines
558 B
TypeScript
23 lines
558 B
TypeScript
import options from 'options';
|
|
|
|
globalThis.isWindowVisible = (windowName: string): boolean => {
|
|
const appWindow = App.getWindow(windowName);
|
|
|
|
if (appWindow === undefined) {
|
|
return false;
|
|
}
|
|
return appWindow.visible;
|
|
};
|
|
|
|
globalThis.setLayout = (layout: string): string => {
|
|
try {
|
|
const layoutJson = JSON.parse(layout);
|
|
const { layouts } = options.bar;
|
|
|
|
layouts.value = layoutJson;
|
|
return 'Successfully updated layout.';
|
|
} catch (error) {
|
|
return `Failed to set layout: ${error}`;
|
|
}
|
|
};
|