diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2021-11-17 03:54:34 (GMT) |
|---|---|---|
| committer | Ravi R Kiran <aine.marina@gmail.com> | 2021-11-17 03:54:34 (GMT) |
| commit | e506f77fbee348ca7b4624d7d26c805195611f28 (patch) | |
| tree | fe63a85472df23247076c5df383d51273494bae9 | |
| parent | c6df89c9e1a393bab3fe2bc8e03ca053eaf9a7d5 (diff) | |
| download | dotemacs-e506f77fbee348ca7b4624d7d26c805195611f28.zip dotemacs-e506f77fbee348ca7b4624d7d26c805195611f28.tar.gz dotemacs-e506f77fbee348ca7b4624d7d26c805195611f28.tar.bz2 | |
Convenience function for remote browsing
| -rw-r--r-- | lisp/kitty-remote-control.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/kitty-remote-control.el b/lisp/kitty-remote-control.el index 6fe7d31..48fb3a3 100644 --- a/lisp/kitty-remote-control.el +++ b/lisp/kitty-remote-control.el @@ -84,6 +84,19 @@ `(("type" . "background") ("args" . ,cmd)))) +;; Common commands +(defvar kitty-rc-browser '("firefox") + "Browser arguments for kitty-rc-browse-url") +(defun kitty-rc-browse-url (url &rest args) + "Browse URL by launching browser remotely" + (kitty-rc-posted-command + (apply #'vector (append kitty-rc-browser + (list (browse-url-encode-url url)) + args)))) +(defun kitty-rc-browse-urls-remotely () + (interactive) + (setq browse-url-browser-function #'kitty-rc-browse-url)) + ;; Clipboard handling: could be generalized (defvar kitty-rc-clipboard-max-length 10000 "Maximum length of characters copied to clipboard") |
