Skip to content

Commit c2beb62

Browse files
authored
Merge pull request #10 from OneNoted/release-0-5-0-prep
chore(release): prepare 0.5.0
2 parents 726d100 + 94c09f1 commit c2beb62

22 files changed

Lines changed: 3110 additions & 251 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
build/
22
dist/
33
build/
4+
docs/
45
macos/Taskers.xcodeproj/
56
greenfield/target/

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ edition = "2024"
1919
homepage = "https://github.com/OneNoted/taskers"
2020
license = "MIT OR Apache-2.0"
2121
repository = "https://github.com/OneNoted/taskers"
22-
version = "0.4.0"
22+
version = "0.5.0"
2323

2424
[workspace.dependencies]
2525
adw = { package = "libadwaita", version = "0.9.1" }
@@ -46,13 +46,13 @@ ureq = "2.12.1"
4646
uuid = { version = "1.22.0", features = ["serde", "v7"] }
4747
webkit6 = { version = "0.6.1", features = ["v2_50"] }
4848
xz2 = "0.1"
49-
taskers-core = { version = "0.4.0", path = "crates/taskers-core" }
50-
taskers-cli = { version = "0.4.0", path = "crates/taskers-cli" }
51-
taskers-control = { version = "0.4.0", path = "crates/taskers-control" }
52-
taskers-domain = { version = "0.4.0", path = "crates/taskers-domain" }
53-
taskers-ghostty = { version = "0.4.0", path = "crates/taskers-ghostty" }
54-
taskers-host = { version = "0.4.0", path = "crates/taskers-host" }
55-
taskers-paths = { version = "0.4.0", path = "crates/taskers-paths" }
56-
taskers-runtime = { version = "0.4.0", path = "crates/taskers-runtime" }
57-
taskers-shell = { version = "0.4.0", path = "crates/taskers-shell" }
58-
taskers-shell-core = { version = "0.4.0", path = "crates/taskers-shell-core" }
49+
taskers-core = { version = "0.5.0", path = "crates/taskers-core" }
50+
taskers-cli = { version = "0.5.0", path = "crates/taskers-cli" }
51+
taskers-control = { version = "0.5.0", path = "crates/taskers-control" }
52+
taskers-domain = { version = "0.5.0", path = "crates/taskers-domain" }
53+
taskers-ghostty = { version = "0.5.0", path = "crates/taskers-ghostty" }
54+
taskers-host = { version = "0.5.0", path = "crates/taskers-host" }
55+
taskers-paths = { version = "0.5.0", path = "crates/taskers-paths" }
56+
taskers-runtime = { version = "0.5.0", path = "crates/taskers-runtime" }
57+
taskers-shell = { version = "0.5.0", path = "crates/taskers-shell" }
58+
taskers-shell-core = { version = "0.5.0", path = "crates/taskers-shell-core" }

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,21 @@ taskersctl browser snapshot
8888
taskersctl browser get title
8989
```
9090

91+
Enable shell completions for `taskersctl`:
92+
93+
```bash
94+
mkdir -p ~/.local/share/bash-completion/completions
95+
taskersctl completion bash > ~/.local/share/bash-completion/completions/taskersctl
96+
97+
mkdir -p ~/.zsh/completions
98+
taskersctl completion zsh > ~/.zsh/completions/_taskersctl
99+
100+
mkdir -p ~/.config/fish/completions
101+
taskersctl completion fish > ~/.config/fish/completions/taskersctl.fish
102+
```
103+
104+
Those generated scripts also complete live `--workspace`, `--pane`, and `--surface` ids when Taskers is running.
105+
91106
## Develop
92107

93108
On Ubuntu 24.04, install the Linux UI dependencies first:

crates/taskers-app/src/linux_install.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn exit_code_from_status(status: ExitStatus) -> i32 {
3636
{
3737
use std::os::unix::process::ExitStatusExt;
3838

39-
return status.signal().map_or(1, |signal| 128 + signal);
39+
status.signal().map_or(1, |signal| 128 + signal)
4040
}
4141

4242
#[cfg(not(unix))]
@@ -487,7 +487,7 @@ mod tests {
487487
let launcher = PathBuf::from("/home/notes/.cargo/bin/taskers");
488488
let release_root = temp.path().join("releases");
489489
let release_exec = release_root
490-
.join("0.4.0")
490+
.join("0.5.0")
491491
.join("x86_64-unknown-linux-gnu")
492492
.join("bin")
493493
.join("taskers-gtk");

crates/taskers-app/src/main.rs

Lines changed: 57 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ use std::{
2727
time::{Duration, Instant, SystemTime, UNIX_EPOCH},
2828
};
2929
use taskers_control::{
30-
BrowserControlCommand, ControlCommand, ControlError, ControlResponse, TerminalDebugCommand,
31-
bind_socket, default_socket_path, serve_with_handler,
30+
BrowserControlCommand, ControlCommand, ControlError, ControlResponse, ScreenshotCommand,
31+
TerminalDebugCommand, bind_socket, default_socket_path, serve_with_handler,
3232
};
3333
use taskers_core::{AppState, default_session_path, load_or_bootstrap};
3434
use taskers_domain::{AppModel, NotificationDeliveryState, NotificationId, SignalKind};
@@ -118,6 +118,7 @@ struct RuntimePathOverrides {
118118

119119
enum HostAutomationCommand {
120120
Browser(BrowserControlCommand),
121+
Screenshot(ScreenshotCommand),
121122
TerminalDebug(TerminalDebugCommand),
122123
}
123124

@@ -1443,14 +1444,14 @@ fn run_internal_surface_probe(
14431444
mode: GhosttyProbeMode,
14441445
config: TaskersConfig,
14451446
) -> glib::ExitCode {
1446-
if !gtk::is_initialized_main_thread() {
1447-
if let Err(error) = gtk::init() {
1448-
safe_eprintln(format!(
1449-
"ghostty {} self-probe failed during gtk init: {error}",
1450-
mode.as_arg()
1451-
));
1452-
return glib::ExitCode::FAILURE;
1453-
}
1447+
if !gtk::is_initialized_main_thread()
1448+
&& let Err(error) = gtk::init()
1449+
{
1450+
safe_eprintln(format!(
1451+
"ghostty {} self-probe failed during gtk init: {error}",
1452+
mode.as_arg()
1453+
));
1454+
return glib::ExitCode::FAILURE;
14541455
}
14551456

14561457
let settings = WebKitSettings::builder()
@@ -1801,6 +1802,15 @@ async fn handle_host_request(
18011802
)
18021803
.await
18031804
}
1805+
HostAutomationCommand::Screenshot(command) => handle_screenshot_request(
1806+
window,
1807+
core,
1808+
host,
1809+
last_revision,
1810+
last_size,
1811+
diagnostics,
1812+
command,
1813+
),
18041814
HostAutomationCommand::TerminalDebug(command) => handle_terminal_debug_request(
18051815
window,
18061816
core,
@@ -1866,6 +1876,21 @@ fn handle_terminal_debug_request(
18661876
Ok(ControlResponse::TerminalDebug { result })
18671877
}
18681878

1879+
fn handle_screenshot_request(
1880+
window: &adw::ApplicationWindow,
1881+
core: &SharedCore,
1882+
host: &Rc<RefCell<TaskersHost>>,
1883+
last_revision: &Rc<Cell<u64>>,
1884+
last_size: &Rc<Cell<(i32, i32)>>,
1885+
diagnostics: Option<&DiagnosticsWriter>,
1886+
command: ScreenshotCommand,
1887+
) -> Result<ControlResponse, ControlError> {
1888+
sync_window(window, core, host, last_revision, last_size, diagnostics);
1889+
let result = host.borrow_mut().execute_screenshot(command)?;
1890+
sync_window(window, core, host, last_revision, last_size, diagnostics);
1891+
Ok(ControlResponse::Screenshot { result })
1892+
}
1893+
18691894
fn browser_surface_id(command: &BrowserControlCommand) -> taskers_shell_core::SurfaceId {
18701895
match command {
18711896
BrowserControlCommand::Navigate { surface_id, .. }
@@ -1947,6 +1972,27 @@ fn spawn_control_server(
19471972
)
19481973
})?
19491974
}
1975+
ControlCommand::Screenshot { screenshot_command } => {
1976+
let (response_tx, response_rx) =
1977+
tokio::sync::oneshot::channel();
1978+
host_tx
1979+
.send(HostAutomationRequest {
1980+
command: HostAutomationCommand::Screenshot(
1981+
screenshot_command,
1982+
),
1983+
response_tx,
1984+
})
1985+
.map_err(|_| {
1986+
ControlError::internal(
1987+
"host automation bridge is unavailable",
1988+
)
1989+
})?;
1990+
response_rx.await.map_err(|_| {
1991+
ControlError::internal(
1992+
"host automation bridge dropped the response",
1993+
)
1994+
})?
1995+
}
19501996
ControlCommand::TerminalDebug { debug_command } => {
19511997
let (response_tx, response_rx) =
19521998
tokio::sync::oneshot::channel();
@@ -2434,7 +2480,7 @@ mod startup_tests {
24342480
#[test]
24352481
fn launcher_bundle_binary_does_not_use_dev_diagnostics() {
24362482
assert!(!looks_like_dev_install(Path::new(
2437-
"/home/notes/.local/share/taskers/releases/0.4.0/x86_64-unknown-linux-gnu/taskers-gtk"
2483+
"/home/notes/.local/share/taskers/releases/0.5.0/x86_64-unknown-linux-gnu/taskers-gtk"
24382484
)));
24392485
}
24402486

crates/taskers-cli/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ clap.workspace = true
1818
serde_json.workspace = true
1919
time.workspace = true
2020
tokio.workspace = true
21-
taskers-control = { version = "0.4.0", path = "../taskers-control" }
22-
taskers-domain = { version = "0.4.0", path = "../taskers-domain" }
21+
taskers-control = { version = "0.5.0", path = "../taskers-control" }
22+
taskers-domain = { version = "0.5.0", path = "../taskers-domain" }
2323
taskers-paths.workspace = true
24-
taskers-runtime = { version = "0.4.0", path = "../taskers-runtime" }
24+
taskers-runtime = { version = "0.5.0", path = "../taskers-runtime" }

0 commit comments

Comments
 (0)