Skip to content
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

How would I got about spawning the example for each monitor #48

Closed
Yaikava opened this issue Aug 18, 2023 · 6 comments
Closed

How would I got about spawning the example for each monitor #48

Yaikava opened this issue Aug 18, 2023 · 6 comments

Comments

@Yaikava
Copy link

Yaikava commented Aug 18, 2023

How would I got about spawning the example bar for each monitor? Cannot figure how I would do that.
I know how to spawn more of the bars. Right now it launches on the monitor that I am on when launching ags. Do I need to like add some padding or something?

@Aylur
Copy link
Owner

Aylur commented Aug 18, 2023

by making it a function and calling it as many times as you want

const bar = (monitor) => ({
    name: `bar${monitor}`, // make sure its still unique
    monitor,
    anchor: ['top', 'left', 'right'],
    exclusive: true,
    child: { /* stuff */ }
});

var config = { windows: [bar(0), bar(1), bar(2)] };

@Yaikava
Copy link
Author

Yaikava commented Aug 18, 2023

Thanks
I understand how to get more of them. But this just gets me 2 bars on 1 monitor. How can I move the 2nd bar to the other monitor?

@Yaikava
Copy link
Author

Yaikava commented Aug 18, 2023

Maybe am missing something obvious. Sorry if that is the case.
Am I supposed to like offset it via some css or something? I do not know.

@Aylur
Copy link
Owner

Aylur commented Aug 18, 2023

my bad, forgot to add monitor to the attributes
you have to set the monitor property of a window to a number which is the id of the monitor you want it to appear on

@Yaikava
Copy link
Author

Yaikava commented Aug 18, 2023

ok, got it to work. Thanks

@Yaikava Yaikava closed this as completed Aug 18, 2023
@Yaikava
Copy link
Author

Yaikava commented Aug 18, 2023

I will leave this here in case anyone needs it.

const bar = (monitor) => ({
    name: `bar${monitor}`, // make sure its still unique
    monitor,
    anchor: ['top', 'left', 'right'],
    exclusive: true,
    child: { /* stuff */ },
    monitor,
});

var config = { windows: [bar(0), bar(1), bar(2)] };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants