mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 05:54:59 +02:00
Refactoring to allow using kitty in other projects
This commit is contained in:
@@ -34,6 +34,7 @@ def _get_config_dir():
|
||||
|
||||
config_dir = _get_config_dir()
|
||||
del _get_config_dir
|
||||
defconf = os.path.join(config_dir, 'kitty.conf')
|
||||
|
||||
|
||||
class ViewportSize:
|
||||
@@ -116,4 +117,11 @@ def selection_clipboard_funcs():
|
||||
return ans
|
||||
|
||||
|
||||
def x11_window_id(window):
|
||||
lib = glfw_lib()
|
||||
lib.glfwGetX11Window.restype = ctypes.c_int32
|
||||
lib.glfwGetX11Window.argtypes = [ctypes.c_void_p]
|
||||
return lib.glfwGetX11Window(window.window_id())
|
||||
|
||||
|
||||
iswayland = not isosx and hasattr(glfw_lib(), 'glfwGetWaylandDisplay')
|
||||
|
||||
Reference in New Issue
Block a user