mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
bar: catch async errors
This commit is contained in:
@@ -27,6 +27,10 @@ function forMonitors(widget) {
|
||||
const n = Gdk.Display.get_default()?.get_n_monitors() || 1;
|
||||
return range(n, 0).map(widget).flat(1);
|
||||
}
|
||||
function forMonitorsAsync(widget) {
|
||||
const n = Gdk.Display.get_default()?.get_n_monitors() || 1;
|
||||
return range(n, 0).forEach((n) => widget().catch(print))
|
||||
}
|
||||
|
||||
// SCSS compilation
|
||||
Utils.exec(`bash -c 'echo "" > ${App.configDir}/scss/_musicwal.scss'`); // reset music styles
|
||||
@@ -74,6 +78,6 @@ App.config({
|
||||
});
|
||||
|
||||
// Stuff that don't need to be toggled. And they're async so ugh...
|
||||
forMonitors(Bar);
|
||||
forMonitorsAsync(Bar);
|
||||
// Bar().catch(print); // Use this to debug the bar. Single monitor only.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user