Skip to content

feat(capture): add control center hide toggle - #217

Merged
hthienloc merged 2 commits into
hthienloc:mainfrom
korbash:feat/hide-control-center-toggle
Aug 11, 2026
Merged

feat(capture): add control center hide toggle#217
hthienloc merged 2 commits into
hthienloc:mainfrom
korbash:feat/hide-control-center-toggle

Conversation

@korbash

@korbash korbash commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds option don't close Control Center before starting a screenshot capture.

Use Case

Some users want screenshots to include the current shell UI, such as Control Center/quick settings, without waiting for the popout close animation before capture begins.

Changes

  • QuickCaptureSettings.qml: add a Hide Control Center toggle under Capture Options, enabled by default to preserve existing behavior
  • QuickCaptureDaemon.qml: only close Control Center and wait for the capture delay when hideControlCenter is enabled
  • When the toggle is disabled, capture starts immediately without closing Control Center first

Checklist

  • I have tested these changes on my setup
  • I have updated the documentation (README, IPC/settings docs) if needed
  • I have verified the plugin loads without errors

@sourcery-ai

sourcery-ai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a user-configurable setting to control whether the Control Center is automatically hidden before starting a screenshot capture, and updates the capture daemon logic to respect this setting and adjust the capture flow accordingly.

Sequence diagram for capture flow with hideControlCenter toggle

sequenceDiagram
    participant QuickCaptureDaemon
    participant ControlCenter
    participant captureDelayTimer

    QuickCaptureDaemon->>QuickCaptureDaemon: startCapture(finalAction, finalMode)
    QuickCaptureDaemon->>QuickCaptureDaemon: [pluginData.hideControlCenter !== false]
    alt hideControlCenter enabled
        QuickCaptureDaemon->>ControlCenter: closeControlCenter()
        QuickCaptureDaemon->>captureDelayTimer: captureDelayTimer.start()
    else hideControlCenter disabled
        QuickCaptureDaemon->>QuickCaptureDaemon: startActualCapture()
    end
Loading

File-Level Changes

Change Details Files
Add a "Hide Control Center" Capture Option setting and integrate it into the existing reset behavior.
  • Include the new hideControlCenter setting in the Capture Options section reset and dirty-state handling.
  • Define a ToggleSettingPlus entry for hideControlCenter with a default of true, label, and description under Capture Options.
  • Insert separators to maintain visual grouping around the new toggle.
QuickCaptureSettings.qml
Change capture start behavior to conditionally close Control Center and delay capture based on the new setting.
  • Track the hideControlCenter pluginData setting when initializing a capture.
  • Only call closeControlCenter and start the captureDelayTimer when hideControlCenter is enabled (or unset).
  • Start the actual capture immediately without closing Control Center when hideControlCenter is explicitly disabled.
QuickCaptureDaemon.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The condition if (pluginData.hideControlCenter !== false) is slightly counterintuitive; consider using a more explicit boolean check (e.g., === true or handling null/undefined separately) so the behavior is clearer when the setting is unset or has unexpected values.
  • When hideControlCenter is disabled you bypass captureDelayTimer; if there are any expectations elsewhere that the delay timer always runs before startActualCapture, it might be safer to factor the delay logic so both paths go through a single, consistent flow.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The condition `if (pluginData.hideControlCenter !== false)` is slightly counterintuitive; consider using a more explicit boolean check (e.g., `=== true` or handling `null/undefined` separately) so the behavior is clearer when the setting is unset or has unexpected values.
- When `hideControlCenter` is disabled you bypass `captureDelayTimer`; if there are any expectations elsewhere that the delay timer always runs before `startActualCapture`, it might be safer to factor the delay logic so both paths go through a single, consistent flow.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@korbash
korbash force-pushed the feat/hide-control-center-toggle branch from 5237ab6 to c38063c Compare August 11, 2026 12:09
@hthienloc
hthienloc merged commit d11cc8f into hthienloc:main Aug 11, 2026
1 check passed
@hthienloc

Copy link
Copy Markdown
Owner

@korbash I changed it so users can toggle this directly from Control Center, while the Settings option controls the default state.
1786454061677680568

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