Skip to content

feat(screen-shot-and-record): add sway support, save-path settings, and recording UX fixes#334

Closed
Mathew-D wants to merge 11 commits intonoctalia-dev:mainfrom
Mathew-D:main
Closed

feat(screen-shot-and-record): add sway support, save-path settings, and recording UX fixes#334
Mathew-D wants to merge 11 commits intonoctalia-dev:mainfrom
Mathew-D:main

Conversation

@Mathew-D
Copy link
Copy Markdown
Contributor

@Mathew-D Mathew-D commented Mar 7, 2026

Extends plugin to work on Sway
Refactors screenshot/ocr/search/record flows to use direct grim region capture paths.
Adds configurable save locations and recording notification controls.
Improves bar/widget UX with settings context menu and recording state indicator.

I have tested it on Sway but could someone test it on Hyprland just to make sure I didn't break something

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 7, 2026

@Pulsar33550336 - this PR modifies your plugin. Please review when you have a chance.

@Mathew-D
Copy link
Copy Markdown
Contributor Author

Mathew-D commented Mar 7, 2026

@Pulsar33550336 please take a look and try it on Hyprland. I hope you don't mind that I decided to work on your plugin to make it work in Sway.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 7, 2026

@Pulsar33550336 - this PR modifies your plugin. Please review when you have a chance.

@Mathew-D
Copy link
Copy Markdown
Contributor Author

Mathew-D commented Mar 7, 2026

I have tested it in Hyprland now and added Niri support and tested it. I have also tested it in mangoWC and it works great.

@github-actions
Copy link
Copy Markdown
Contributor

@Pulsar33550336 - this PR modifies your plugin. Please review when you have a chance.

Copy link
Copy Markdown
Contributor

@Pulsar33550336 Pulsar33550336 left a comment

Choose a reason for hiding this comment

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

Additionally, under Hyprland, window detection is malfunctioning, displaying window frames from all workspaces.

Everything else should be fine.

Comment thread screen-shot-and-record/Main.qml Outdated
Comment thread screen-shot-and-record/ScreenShot.qml
@Pulsar33550336
Copy link
Copy Markdown
Contributor

Pulsar33550336 commented Mar 11, 2026

Additionally, due to academic commitments, I will likely have very little time to review PRs for my own plugins in the near future. Therefore, I am temporarily allowing this PR to be merged without further review from me, as long as the functionality works.

BTW, thank you very much for your contribution to this plugin.

Comment thread screen-shot-and-record/Main.qml Outdated
Comment thread screen-shot-and-record/Main.qml Outdated
@Mathew-D Mathew-D marked this pull request as draft March 11, 2026 11:07
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

Automatic Manifest Check


File: screen-shot-and-record/manifest.json

   "repository": "https://github.com/Pulsar33550336/pulsar-ns-plugins",

@Mathew-D
Copy link
Copy Markdown
Contributor Author

Mathew-D commented Apr 2, 2026

I had to use AI for new keys in the i18n files.

@Mathew-D Mathew-D marked this pull request as ready for review April 2, 2026 23:32
@Mathew-D Mathew-D requested a review from Pulsar33550336 April 2, 2026 23:49
@Mathew-D
Copy link
Copy Markdown
Contributor Author

Mathew-D commented Apr 2, 2026

@Pulsar33550336 I’ve updated this quite a bit, incorporating your earlier feedback and building on your original work. It should be working well, but if you have time to take a look, I’d appreciate it—no worries if not.

@Pulsar33550336
Copy link
Copy Markdown
Contributor

Pulsar33550336 commented Apr 3, 2026

@Pulsar33550336 I’ve updated this quite a bit, incorporating your earlier feedback and building on your original work. It should be working well, but if you have time to take a look, I’d appreciate it—no worries if not.

@Mathew-D I noticed that it fails to handle display scaling correctly when capturing screenshots, and window detection doesn't work under Hyprland.

@Mathew-D
Copy link
Copy Markdown
Contributor Author

Mathew-D commented Apr 3, 2026

What do you mean about the window detection? I don't normally run Hyprland so I don't understand. I see the problem with the scale and that should fix it.

@Mathew-D
Copy link
Copy Markdown
Contributor Author

Mathew-D commented Apr 3, 2026

@Pulsar33550336 This has grown a bit beyond what I can reasonably maintain right now, so I’m going to close this PR. I may reuse parts of it to build something more focused for Sway. Thanks again for your original work —I really appreciate it.

@Mathew-D Mathew-D closed this Apr 3, 2026
@Mathew-D
Copy link
Copy Markdown
Contributor Author

Mathew-D commented Apr 3, 2026

@Pulsar33550336 I know I mentioned closing this, but I ended up fixing the issue I was stuck on and have reopened the PR. It should be in a much better state now. No pressure to review—just wanted to keep things updated. I rewrote all the screens support so niri, sway and hyrpland all use the same path. I also have the overall follow the mouse onto whatever screen you are going to select from. I also included scaling .

@Mathew-D Mathew-D reopened this Apr 3, 2026
@Pulsar33550336
Copy link
Copy Markdown
Contributor

@Mathew-D Looks good, but there seems to be a slight issue with the indentation.

I think we still need to add window detection functionality—it's very practical. I believe we can separate the implementations for different WMs into a separate file to prevent this file from becoming too long.

I'm currently confident that the above operations can be implemented for Hyprland and Niri. For Sway, I'm not sure.

I also have the overall follow the mouse onto whatever screen you are going to select from.

I'm not sure what you mean by that.

# Main.qml
# ...
    Instantiator {
        id: selectorInstantiator
        active: root.active
        model: Quickshell.screens
        delegate: Loader {
            required property int index
            source: "ScreenShot.qml"
            onLoaded: {
                item.pluginApi = root.pluginApi
                item.screen = Quickshell.screens[index]
                Logger.d("ScreenShot", (root.target))
                item.target = root.target
                item.closed.connect(() => root.close())
                item.startCapture()
            }
        }
        onObjectAdded: (index, object) => Logger.d("ScreenShot", ("Selector added for screen", index))
        onObjectRemoved: (index, object) => Logger.d("ScreenShot", ("Selector removed for screen", index))
    }

This should launch a selection interface for every monitor.

@Mathew-D
Copy link
Copy Markdown
Contributor Author

Mathew-D commented Apr 4, 2026

I’m not really interested in adding window detection. When I closed the PR, I removed all the Hyprland and Niri-specific code and focused on writing for Sway. Interestingly, when I finished, the implementation worked on all three systems (Sway, Hyprland, and Niri) without any changes. So, I prefer to keep it simple and avoid window detection

The code you asked about launches a selection interface for every monitor, freezing the display of each at the moment selection starts. The selection overlay is only shown on the screen where the mouse is, and after the user selects a region, only that region from the relevant screen is kept and processed. This was the best way I could find for multi-screens.

Since this was originally your plugin, would you prefer if I published my version as a remix or fork instead? That way, your original work is credited, and users can choose which approach fits their needs.

@Pulsar33550336
Copy link
Copy Markdown
Contributor

Since this was originally your plugin, would you prefer if I published my version as a remix or fork instead? That way, your original work is credited, and users can choose which approach fits their needs.

@Mathew-D That's fine. I'm currently not using the version from the official repository but maintaining my own fork.

However, I suggest at least adding the Hyprland window detection back, or wait until I have time to complete this feature. Remove it will almost certainly cause user experience issues. I think it just requires writing a small amount of WM-specific code and storing it in a variable for use.

@Mathew-D
Copy link
Copy Markdown
Contributor Author

Mathew-D commented Apr 5, 2026

Will rename and add remix. Will updatee readme and support as new plugin when done.

@Mathew-D Mathew-D closed this Apr 5, 2026
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

Successfully merging this pull request may close these issues.

2 participants