Skip to content

feat(screen-recorder): Add Hyprland focused monitor video source#257

Open
Cleboost wants to merge 1 commit intonoctalia-dev:mainfrom
Cleboost:screen-recorder/hyprland-focused-monitor
Open

feat(screen-recorder): Add Hyprland focused monitor video source#257
Cleboost wants to merge 1 commit intonoctalia-dev:mainfrom
Cleboost:screen-recorder/hyprland-focused-monitor

Conversation

@Cleboost
Copy link
Contributor

This pull request introduces enhanced support for the Hyprland compositor in the screen-recorder/Main.qml file, allowing for automatic detection of the focused monitor and optimized GPU usage when recording. Additionally, the codebase has been refactored for improved readability and consistency, with semicolons added and minor logic adjustments. The most important changes are grouped below:

Hyprland Support and Focused Monitor Detection

  • Added properties (isHyprland, detectedMonitor, usePrimeRun) and a process to detect if Hyprland is running, enabling special handling for Hyprland environments. [1] [2]
  • Implemented focused monitor detection using hyprctl and jq, allowing the recorder to target the monitor under the cursor in Hyprland. If an NVIDIA GPU is detected, recording is launched with prime-run for optimal performance. [1] [2]

Refactoring and Code Consistency

  • Added semicolons to all statements and improved function formatting for better readability and consistency throughout the file. [1] [2] [3] [4] [5] [6]
  • Refactored the recording launch logic to use a new launchRecorderWithSource function, supporting both standard and Hyprland-specific workflows. [1] [2]

Dependency Import

  • Added import Quickshell.Io to screen-recorder/Settings.qml, likely to support new or existing IO operations.

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.

1 participant