Skip to content

Conversation

@devalentineomonya
Copy link

Pull Request: Refactor and Extend record Subcommand in Caelestia CLI

This pull request refactors and extends the record subcommand in the Caelestia CLI, improving flexibility, reliability, and user experience for screen recording. It introduces granular video and audio options, robust device handling, enhanced notifications, and cleaner code formatting.


Enhancements to record subcommand

  • Granular recording modes:

    • Video modes: fullscreen, region, window
    • Audio modes: none, mic, system, combined
      These replace previous simpler options, allowing more flexible recording scenarios, such as tutorials, presentations, or system-only captures.
  • Improved audio device selection:

    • Added a get_audio_device method that validates device availability and provides fallbacks, increasing reliability when recording audio.
    • Supports distinct selection for microphone, system audio, or both.
  • Backward compatibility:

    • Legacy flags like --sound are still supported for users upgrading from older versions.

User Experience Improvements

  • Status and control flags:

    • --status to check ongoing recording
    • --stop to terminate a recording gracefully
  • Enhanced notifications:

    • Non-blocking notifications on recording completion
    • Clear warnings if recording file is missing
  • Error handling improvements:

    • Friendly warnings for window selection failures or file operation errors

Code Quality and Maintainability

  • Refactored argument parsing for readability and maintainability
  • Improved docstrings and comments for clarity
  • Consistent formatting across subcommands

Usage Example Screenshot

Screen recording options example

These changes make the record subcommand more robust, flexible, and suitable for tutorials or professional recording workflows.

The changes work well with the shell fork on my repo: Caelestia Shell and can be forked and compiled directly.

@MateusAquino
Copy link

I'm interested on this feature, it also closes caelestia-dots/shell#945, but not sure if it's a great idea to replace the default "-s" argument from "sound" to "stop"; not to mention this change requires an existing "Combined" sink to work, which will not exist by default:

image




Also note that recording options overflows when no recordings exists + the list is collapsed:

image

Co-authored-by: Mateus <mateusaqb@gmail.com>
@MateusAquino

This comment was marked as resolved.

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