Skip to content

Conversation

@nicolo-mn
Copy link

This PR adds a GUI area selector, able to select either screens (outputs) or windows (toplevels). It's started from waysip with the flag -g, and it was added to libwaysip to be used by external applications as well. For each output and toplevel it attemps to take a screenshot to show, but it handles the cases where the capture fails (for example, if there's no toplevel capture support, which is my case).

Please see a demonstration below. There might be a bug in iced_layershell that results in the theme being applied only after a first interaction from the user (as can be seen from the video, the background is initially white). The dark theme could be removed to avoid the bug being shown, but I think it makes sense as buttons are better distinguishable from the background with a dark theme.

Right now the dimensions of the selector are hardcoded, which might result in it being very small on high resolution screens.

gui_selector.mp4

@Decodetalkers
Copy link
Collaborator

I am afraid that this gui cannot invoke twice in the same thread

@Decodetalkers
Copy link
Collaborator

Ok, it is quite cool and no problem!!, but you need to export the feature by iced, especially tokio and async-std, and also , you should let areaselectgui can accept a waylandconnection.

Greate job!

@Decodetalkers
Copy link
Collaborator

Decodetalkers commented Dec 12, 2025

And because if we use the iced, it may become too heavy, we need to make this feature selectable. and maybe you also need to add a example for it

And maybe also i18n in the feature.

So only silint has that problem.. that was too bad

(
t.clone(),
// can fail if toplevel capture is not supported
match conn.screenshot_toplevel(t, false) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here the menu should open first, and then the pictures should load in one by one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants