feat: video/state_machine unit tests and on_video_completed logic fix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,8 @@ impl ScreenPlugin {
|
||||
}
|
||||
|
||||
match Command::new("systemd-inhibit")
|
||||
.arg("--what=idle")
|
||||
.arg("--what=idle:sleep")
|
||||
.arg("--mode=block")
|
||||
.arg("--who=ShowenV2")
|
||||
.arg("--why=Prevent screen lock during playback")
|
||||
.arg("sleep")
|
||||
@@ -66,6 +67,13 @@ impl ScreenPlugin {
|
||||
}
|
||||
|
||||
if hidden {
|
||||
let _ = Command::new("pkill")
|
||||
.args(["-f", "unclutter"])
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::null())
|
||||
.stderr(Stdio::null())
|
||||
.status();
|
||||
|
||||
match Command::new("unclutter")
|
||||
.arg("-idle")
|
||||
.arg("0")
|
||||
@@ -80,7 +88,7 @@ impl ScreenPlugin {
|
||||
}
|
||||
} else {
|
||||
match Command::new("pkill")
|
||||
.arg("unclutter")
|
||||
.args(["-f", "unclutter"])
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::null())
|
||||
.stderr(Stdio::null())
|
||||
@@ -118,6 +126,10 @@ impl Plugin for ScreenPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
fn dependencies(&self) -> Vec<&'static str> {
|
||||
vec![]
|
||||
}
|
||||
|
||||
fn init(&mut self, ctx: PluginContext) -> Result<()> {
|
||||
self.ctx = Some(ctx);
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user