Cleaned up ColorSchemeTab, added program checks, added firefox template
Matugen: added firefox (pywalfox) template SidePanelToggle: use ProgramCheckerService for gpu-screen-recorder ColorSchemeTab: use NCollapsible for matugen templates, use ProgramCheckerService to detect available programs (for matugen templates) NCollapsible: create collapsible category
This commit is contained in:
parent
c0d6780c3d
commit
fa838ecdb1
8 changed files with 514 additions and 148 deletions
|
|
@ -13,16 +13,13 @@ Singleton {
|
|||
property bool isRecording: false
|
||||
property bool isPending: false
|
||||
property string outputPath: ""
|
||||
property bool isAvailable: false
|
||||
property bool isAvailable: ProgramCheckerService.gpuScreenRecorderAvailable
|
||||
|
||||
Component.onCompleted: {
|
||||
checkAvailability()
|
||||
}
|
||||
|
||||
function checkAvailability() {
|
||||
// Detect native or Flatpak gpu-screen-recorder
|
||||
availabilityCheckProcess.command = ["sh", "-c", "command -v gpu-screen-recorder >/dev/null 2>&1 || (command -v flatpak >/dev/null 2>&1 && flatpak list --app | grep -q 'com.dec05eba.gpu_screen_recorder')"]
|
||||
availabilityCheckProcess.running = true
|
||||
// Update availability when ProgramCheckerService completes its checks
|
||||
Connections {
|
||||
target: ProgramCheckerService
|
||||
function onChecksCompleted() {// Availability is now automatically updated via property binding
|
||||
}
|
||||
}
|
||||
|
||||
// Start or Stop recording
|
||||
|
|
@ -101,18 +98,6 @@ Singleton {
|
|||
}
|
||||
}
|
||||
|
||||
// Availability check process
|
||||
Process {
|
||||
id: availabilityCheckProcess
|
||||
command: ["sh", "-c", "true"]
|
||||
onExited: function (exitCode, exitStatus) {
|
||||
// exitCode 0 means available, non-zero means unavailable
|
||||
root.isAvailable = (exitCode === 0)
|
||||
}
|
||||
stdout: StdioCollector {}
|
||||
stderr: StdioCollector {}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: pendingTimer
|
||||
interval: 2000 // Wait 2 seconds to see if process stays alive
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue