summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi R Kiran <aine.marina@gmail.com>2021-04-11 20:05:24 (GMT)
committerRavi R Kiran <aine.marina@gmail.com>2021-04-11 20:05:24 (GMT)
commit628bec243c79e82bd4b1e5ce88dcbe433ed7c4af (patch)
tree5e1fe5728951460520ba72c37b42093d4bdb9a9a
parent5a04f24d497de167331b98337330c1b203c161ec (diff)
downloaddotemacs-628bec243c79e82bd4b1e5ce88dcbe433ed7c4af.zip
dotemacs-628bec243c79e82bd4b1e5ce88dcbe433ed7c4af.tar.gz
dotemacs-628bec243c79e82bd4b1e5ce88dcbe433ed7c4af.tar.bz2
Convenience function to create new window
-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