aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/apprt/gtk/ipc
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-01 23:05:23 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-01 23:05:51 +0300
commit5bd21b7ed468b5ff4d1a5b2ed7e211f401eb138a (patch)
tree672fa4625cca0ecb3e9376fc7f8e33d7b0e9deef /vendor/libghostty-vt/src/apprt/gtk/ipc
parent32abb3776668ee768200019c170956f67fe33a86 (diff)
chore: update libghostty vendor
refs #276
Diffstat (limited to 'vendor/libghostty-vt/src/apprt/gtk/ipc')
-rw-r--r--vendor/libghostty-vt/src/apprt/gtk/ipc/toggle_quick_terminal.zig24
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/apprt/gtk/ipc/toggle_quick_terminal.zig b/vendor/libghostty-vt/src/apprt/gtk/ipc/toggle_quick_terminal.zig
new file mode 100644
index 00000000..702ad3df
--- /dev/null
+++ b/vendor/libghostty-vt/src/apprt/gtk/ipc/toggle_quick_terminal.zig
@@ -0,0 +1,24 @@
+const std = @import("std");
+const Allocator = std.mem.Allocator;
+
+const apprt = @import("../../../apprt.zig");
+const DBus = @import("DBus.zig");
+
+/// Use a D-Bus method call to toggle the quick terminal on GTK.
+///
+/// `ghostty +toggle-quick-terminal` is equivalent to the following command
+/// (on a release build):
+///
+/// ```sh
+/// gdbus call --session \
+/// --dest com.mitchellh.ghostty \
+/// --object-path /com/mitchellh/ghostty \
+/// --method org.gtk.Actions.Activate \
+/// toggle-quick-terminal [] []
+/// ```
+pub fn toggleQuickTerminal(alloc: Allocator, target: apprt.ipc.Target) (Allocator.Error || std.Io.Writer.Error || apprt.ipc.Errors)!bool {
+ var dbus = try DBus.init(alloc, target, "toggle-quick-terminal");
+ defer dbus.deinit(alloc);
+ try dbus.send();
+ return true;
+}