mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-14 04:24:52 +02:00
Make the kitty window id available as the environment variable KITTY_WINDOW_ID
Fixes #532
This commit is contained in:
@@ -328,6 +328,10 @@ set_special_keys(PyObject *dict) {
|
||||
}}
|
||||
}
|
||||
|
||||
PYWRAP0(next_window_id) {
|
||||
return PyLong_FromUnsignedLongLong(global_state.window_id_counter + 1);
|
||||
}
|
||||
|
||||
PYWRAP1(handle_for_window_id) {
|
||||
id_type os_window_id;
|
||||
PA("K", &os_window_id);
|
||||
@@ -600,6 +604,7 @@ KK5I(add_borders_rect)
|
||||
|
||||
static PyMethodDef module_methods[] = {
|
||||
MW(current_os_window, METH_NOARGS),
|
||||
MW(next_window_id, METH_NOARGS),
|
||||
MW(set_options, METH_VARARGS),
|
||||
MW(set_in_sequence_mode, METH_O),
|
||||
MW(resolve_key_mods, METH_VARARGS),
|
||||
|
||||
Reference in New Issue
Block a user