T10: focus in and out reach a program under mode 1004; the window wears the program's title; a bell is logged and silent; the scrollback setting caps history and trims it live; Cmd-F finds in the scrollback with Ely's FindWidget, matches washed, Enter older, Shift-Enter newer, new output searched again
This commit is contained in:
11 files changed
+486
-35
No files matched your search
+19
-5
@@ -44,12 +44,14 @@ fn main() {
|
||||
.await;
|
||||
}
|
||||
cx.background_executor().timer(Duration::from_secs(1)).await;
|
||||
let number = window
|
||||
.update(cx, |_, window, _| capture::number(window))
|
||||
.expect("the window lives")
|
||||
.expect("a window number");
|
||||
let (number, title) = window
|
||||
.update(cx, |_, window, _| {
|
||||
(capture::number(window), window.window_title())
|
||||
})
|
||||
.expect("the window lives");
|
||||
let number = number.expect("a window number");
|
||||
capture::snapshot(number, std::path::Path::new(&out)).expect("a picture");
|
||||
log::info!("shot: wrote {out}");
|
||||
log::info!("shot: wrote {out}, titled {title:?}");
|
||||
cx.update(|cx| cx.quit());
|
||||
})
|
||||
.detach();
|
||||
@@ -337,6 +339,18 @@ mod typing {
|
||||
if let Some((call, text)) = spec.split_once(':') {
|
||||
return compose(call, text, number);
|
||||
}
|
||||
if let "activate" | "deactivate" = spec {
|
||||
unsafe {
|
||||
let app: *mut Object = msg_send![class!(NSApplication), sharedApplication];
|
||||
if spec == "activate" {
|
||||
let _: () = msg_send![app, activateIgnoringOtherApps: YES];
|
||||
} else {
|
||||
let _: () = msg_send![app, deactivate];
|
||||
}
|
||||
}
|
||||
log::info!("shot: {spec}");
|
||||
return Ok(());
|
||||
}
|
||||
let mut parts: Vec<&str> = spec.split('-').collect();
|
||||
let name = parts.pop().context("an empty key")?;
|
||||
let mut flags: u64 = 0;
|
||||
|
||||
Reference in new issue
Block a user