summaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/xterm-kitty.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/xterm-kitty.el b/lisp/xterm-kitty.el
index ea88cc2..ed26b91 100644
--- a/lisp/xterm-kitty.el
+++ b/lisp/xterm-kitty.el
@@ -459,5 +459,14 @@ function is almost equivalent to 'event-convert-list'."
(advice-add 'next-window :around #'xterm-kitty-visible-window-advice)
(advice-add 'previous-window :around #'xterm-kitty-visible-window-advice))
+(defvar xterm-kitty--new-os-window-command-string
+ "\eP@kitty-cmd{\"cmd\":\"new-window\",\"version\":[0,19,3],\"no_response\":true,\"payload\":{\"window_type\":\"os\"}}\e\\"
+ "Command string to send to kitty to make new kitty window")
+(defun xterm-kitty-new-os-window ()
+ "Open new xterm-kitty os window"
+ (interactive)
+ (when xterm-kitty-in-use
+ (send-string-to-terminal xterm-kitty--new-os-window-command-string)))
+
(provide 'xterm-kitty)
;;; xterm-kitty.el ends here