mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Remote control: Allow matching for self window even over sockets when run inside a kitty window
Have kitty-tool send the value of KITTY_WINDOW_ID if present.
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode/utf16"
|
||||
@@ -268,6 +269,10 @@ func send_rc_command(io_data *rc_io_data) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
wid, err := strconv.Atoi(os.Getenv("KITTY_WINDOW_ID"))
|
||||
if err == nil && wid > 0 {
|
||||
io_data.rc.KittyWindowId = uint(wid)
|
||||
}
|
||||
err = create_serializer(global_options.password, "", io_data)
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user