-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic monitors #56
Comments
Its true you can't register new windows at runtime, but you can definitely make new ones with just calling |
Added the option to register windows on runtime. Now it is also possible to pass a |
you can also get the monitor associated with each window, so it can be removed on |
// example
const display = imports.gi.Gdk.Display.get_default();
display.connect('monitor-added', (_, monitor) => {
const win = ags.Widget.Window({
name: 'test',
child: ags.Widget.Label('test'),
monitor,
});
ags.App.addWindow(win);
});
display.connect('monitor-removed', (_, monitor) => {
for (const [name, win] of ags.App.windows) {
if (win.monitor == monitor)
ags.App.removeWindow(name);
}
}); you will still have to makes sure that Window.name is unique |
All windows have to be defined inside the windows array of the default export of config.js, and we can't register new windows at runtime (I think). I would like to automatically create new bars for newly plugged in monitors so to do that ags should either:
The text was updated successfully, but these errors were encountered: