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

Set window size option #50

Open
Vosjedev opened this issue Nov 17, 2023 · 15 comments
Open

Set window size option #50

Vosjedev opened this issue Nov 17, 2023 · 15 comments
Labels
bug Something isn't working question Further information is requested

Comments

@Vosjedev
Copy link

Vosjedev commented Nov 17, 2023

Hi!
I would like to have an option to set the window size either in the config or as commandline argument.
Being able to set the window location when that wayland protocol arrives would be nice as well.

This is because I am using tinywl as compositor for regreet. It opens regreet as window on my laptop, which is smaller, but regreet is sized to the size of my external monitor. So I tried without any background image. That made the window small, but smaller than the 'popup' for user and session. I had to resize it to see the total thing.

I will try to make some screenshots and attach those in a moment.

tinywl didn't support screenshots, but I took 2 photos with my phone. Here they are:
20231117_152250
(No background: window to small)
20231117_152508
(with background: window to big)

@rharish101
Copy link
Owner

That is weird, since ReGreet should be full-screened on a single monitor. Are there any gotchas for tinywl regarding full-screen or multi-monitor support?

@rharish101 rharish101 added bug Something isn't working question Further information is requested labels Dec 31, 2023
@Vosjedev
Copy link
Author

Vosjedev commented Jan 8, 2024

Tinywl is a very basic implementation usil wl-roots, maybe it does not support fullscreen hints? The reason I am using tinywl is because it is tiny, and it puts regreet in a window. I like to drag my loginscreen around :D .

@rharish101
Copy link
Owner

Could you try gtkgreet and see if it goes into full-screen?

@Vosjedev
Copy link
Author

Yes I will do so later, but I currently have a lot of stuff open so I need to organise that first before being able to play with greeters again.

@YaroKasear
Copy link

Unless I'm mistaken, tinywl was never meant for serious usage but just to teach people how to program a compositor.

@Vosjedev
Copy link
Author

Vosjedev commented Jan 20, 2024

I know, but I want my login screen to be as small as possible, and as cage and regreet doesn't work nicely with multimonitor, I thought a small compositor with floating windows was better.

@max-ishere
Copy link
Contributor

https://man.archlinux.org/man/extra/cage/cage.1.en#ENVIRONMENT

There's WAYLAND_DISPLAY that you can use to tell cage what display to use. Idk how consistent the value is and where it comes from tho...

Have you tried it?

@max-ishere
Copy link
Contributor

And also there's cage -mlast but imo it's pretty annoying

@Vosjedev
Copy link
Author

Oh, I'll try it. Maybe that can bring back a login screen for me... regreet was broken for me recently (using the tinywl-git AUR package gave problems, as expected :D), so I tried qtgreet which wouldn't even start, so now I'm manually starting my WM from the tty.

@max-ishere
Copy link
Contributor

Cool. I use these cage args: -dsmlast, the -s is for VT switching, I think VT are the tty1,2,3... And I dont feel like getting locked out if cage or regreet does something stupid.

@Vosjedev
Copy link
Author

getting locked out

Me neither :D

It at least provided a login screen, thanks! Although I'd still like to do stuff some other way, but I guess having the login screen how I imagined it when setting this system up is going to be harder.

@max-ishere
Copy link
Contributor

Can you describe what you expect a bit more?

I know, but I want my login screen to be as small as possible

Is this referring to window size or amount of code? If security is a concern, cage is a good option because it's purpose is to be used as a kiosk, like on a self-checkout machine. Its minimal and secure.

As for widow size, you can use a black image to mimic the small window look. I haven't tested it yet, but I think if you don't use an image the background will probably be gtk background color. A custom color as a background can be PR'd in if you want.

@Vosjedev
Copy link
Author

Sorry for the really late response, I haven't gone though my notifications in a while.

Is this referring to window size or amount of code?
Window size.

you can use a black image to mimic the small window look
Basically my goal was to have a background image and be able to drag the greeter around as a normal window would behave in a floating window manager. I now solved this by forcing the window to behave how I want using Hyprland with a few window rules as compositor.

Thanks!
If this should be closed now feel free to do so. I'm (as usual) not sure.

@max-ishere
Copy link
Contributor

Well, with cage there is another option - spanning over all the monitors. Theoretically what we could do is add a special config section that would support the span mode1.

Consider this layout (defined by cage, I don't think there's a way to influence it in any way: not the order, not the position). The regreet window would span the bounding box of all the monitors.

       1920    1080
     +-------+-----+
1080 |   1   |  2  | 720
     |       |-----+
     +-------+XXXXXX
_____________________________
XXX - not visible to the user

The config could specify a list of "virtual" monitors like this:

[[cage.span_areas]]
w = 1920
h = 1080
x = 0
y = 0

[[cage.span_areas]]
w = 1080
h = 720
x = 1920
y = 0

Then regreet would have to be started in cage mode (cmd flags/config/both). It would then duplicate the background image over all the monitors (or each vmonitor could have it's own background, details don't really matter). Then whatever area is hovered over shows the UI.

I am not sure how to implement this though... Is it really possible? This would definitely require some wild trickery but I think it should be doable with enough dedication.

Footnotes

  1. man cage.1#OPTIONS

@max-ishere
Copy link
Contributor

Is this referring to window size or amount of code?

Window size.

Unless the above would implement your usecase, the "moving the window around" bit is best implemented by the compositor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants