mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-26 09:13:56 +00:00
Introduce action for copying into clipboard
This commit is contained in:
@@ -379,6 +379,10 @@ pub const Action = union(enum) {
|
||||
///
|
||||
/// Valid actions are:
|
||||
///
|
||||
/// - `copy`
|
||||
///
|
||||
/// Copy the file path into the clipboard.
|
||||
///
|
||||
/// - `paste`
|
||||
///
|
||||
/// Paste the file path into the terminal.
|
||||
@@ -813,6 +817,7 @@ pub const Action = union(enum) {
|
||||
};
|
||||
|
||||
pub const WriteScreenAction = enum {
|
||||
copy,
|
||||
paste,
|
||||
open,
|
||||
};
|
||||
|
||||
@@ -204,6 +204,11 @@ fn actionCommands(action: Action.Key) []const Command {
|
||||
}},
|
||||
|
||||
.write_screen_file => comptime &.{
|
||||
.{
|
||||
.action = .{ .write_screen_file = .copy },
|
||||
.title = "Copy Screen to Temporary File and Copy Path",
|
||||
.description = "Copy the screen contents to a temporary file and copy the path to the clipboard.",
|
||||
},
|
||||
.{
|
||||
.action = .{ .write_screen_file = .paste },
|
||||
.title = "Copy Screen to Temporary File and Paste Path",
|
||||
@@ -217,6 +222,11 @@ fn actionCommands(action: Action.Key) []const Command {
|
||||
},
|
||||
|
||||
.write_selection_file => comptime &.{
|
||||
.{
|
||||
.action = .{ .write_selection_file = .copy },
|
||||
.title = "Copy Selection to Temporary File and Copy Path",
|
||||
.description = "Copy the selection contents to a temporary file and copy the path to the clipboard.",
|
||||
},
|
||||
.{
|
||||
.action = .{ .write_selection_file = .paste },
|
||||
.title = "Copy Selection to Temporary File and Paste Path",
|
||||
|
||||
Reference in New Issue
Block a user