Add region screen recording (#791)

* Add region screen recording

* Update readme

* Use get-default-sink and software encoding

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>

* Remove log file creation logic

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>

---------

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
This commit is contained in:
Chase Taylor
2025-02-27 18:47:21 -07:00
committed by GitHub
parent 4f56dacf2b
commit 5075c94af2
3 changed files with 38 additions and 27 deletions

View File

@@ -29,13 +29,27 @@ const MonitorListDropdown = (): JSX.Element => {
App.get_window('dashboardmenu')?.set_visible(false);
execAsync(`${SRC_DIR}/scripts/screen_record.sh start ${monitor.name}`).catch((err) =>
execAsync(`${SRC_DIR}/scripts/screen_record.sh start screen ${monitor.name}`).catch((err) =>
console.error(err),
);
}}
/>
));
})}
<MenuItem
label="Region"
onButtonPressEvent={(_, event) => {
const buttonClicked = event.get_button()[1];
if (buttonClicked !== Gdk.BUTTON_PRIMARY) {
return;
}
App.get_window('dashboardmenu')?.set_visible(false);
execAsync(`${SRC_DIR}/scripts/screen_record.sh start region`).catch((err) => console.error(err));
}}
/>
</Menu>
);
};