mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-15 04:54:14 +02:00
A new centered panel type that is sized
This commit is contained in:
@@ -25,6 +25,7 @@ GLFW_EDGE_BOTTOM: int
|
||||
GLFW_EDGE_LEFT: int
|
||||
GLFW_EDGE_RIGHT: int
|
||||
GLFW_EDGE_CENTER: int
|
||||
GLFW_EDGE_CENTER_SIZED: int
|
||||
GLFW_EDGE_NONE: int
|
||||
GLFW_FOCUS_NOT_ALLOWED: int
|
||||
GLFW_FOCUS_EXCLUSIVE: int
|
||||
|
||||
2
kitty/glfw-wrapper.h
generated
2
kitty/glfw-wrapper.h
generated
@@ -1040,7 +1040,7 @@ typedef struct GLFWkeyevent
|
||||
|
||||
typedef enum { GLFW_LAYER_SHELL_NONE, GLFW_LAYER_SHELL_BACKGROUND, GLFW_LAYER_SHELL_PANEL, GLFW_LAYER_SHELL_TOP, GLFW_LAYER_SHELL_OVERLAY } GLFWLayerShellType;
|
||||
|
||||
typedef enum { GLFW_EDGE_TOP, GLFW_EDGE_BOTTOM, GLFW_EDGE_LEFT, GLFW_EDGE_RIGHT, GLFW_EDGE_CENTER, GLFW_EDGE_NONE } GLFWEdge;
|
||||
typedef enum { GLFW_EDGE_TOP, GLFW_EDGE_BOTTOM, GLFW_EDGE_LEFT, GLFW_EDGE_RIGHT, GLFW_EDGE_CENTER, GLFW_EDGE_NONE, GLFW_EDGE_CENTER_SIZED } GLFWEdge;
|
||||
|
||||
typedef enum { GLFW_FOCUS_NOT_ALLOWED, GLFW_FOCUS_EXCLUSIVE, GLFW_FOCUS_ON_DEMAND} GLFWFocusPolicy;
|
||||
|
||||
|
||||
@@ -1231,7 +1231,7 @@ edge_spacing(GLFWEdge which) {
|
||||
case GLFW_EDGE_BOTTOM: edge = "bottom"; break;
|
||||
case GLFW_EDGE_LEFT: edge = "left"; break;
|
||||
case GLFW_EDGE_RIGHT: edge = "right"; break;
|
||||
case GLFW_EDGE_CENTER: case GLFW_EDGE_NONE: return 0;
|
||||
case GLFW_EDGE_CENTER: case GLFW_EDGE_NONE: case GLFW_EDGE_CENTER_SIZED: return 0;
|
||||
}
|
||||
if (!edge_spacing_func) {
|
||||
log_error("Attempt to call edge_spacing() without first setting edge_spacing_func");
|
||||
@@ -2690,6 +2690,7 @@ init_glfw(PyObject *m) {
|
||||
ADDC(GLFW_LAYER_SHELL_NONE); ADDC(GLFW_LAYER_SHELL_PANEL); ADDC(GLFW_LAYER_SHELL_BACKGROUND); ADDC(GLFW_LAYER_SHELL_TOP); ADDC(GLFW_LAYER_SHELL_OVERLAY);
|
||||
ADDC(GLFW_FOCUS_NOT_ALLOWED); ADDC(GLFW_FOCUS_EXCLUSIVE); ADDC(GLFW_FOCUS_ON_DEMAND);
|
||||
ADDC(GLFW_EDGE_TOP); ADDC(GLFW_EDGE_BOTTOM); ADDC(GLFW_EDGE_LEFT); ADDC(GLFW_EDGE_RIGHT); ADDC(GLFW_EDGE_CENTER); ADDC(GLFW_EDGE_NONE);
|
||||
ADDC(GLFW_EDGE_CENTER_SIZED);
|
||||
ADDC(GLFW_COLOR_SCHEME_NO_PREFERENCE); ADDC(GLFW_COLOR_SCHEME_DARK); ADDC(GLFW_COLOR_SCHEME_LIGHT);
|
||||
|
||||
/* start glfw functional keys (auto generated by gen-key-constants.py do not edit) */
|
||||
|
||||
@@ -601,20 +601,21 @@ Only works on macOS and Wayland compositors that supports the wlr layer shell pr
|
||||
|
||||
|
||||
--edge
|
||||
choices=top,bottom,left,right,background,center,none
|
||||
choices=top,bottom,left,right,background,center,center-sized,none
|
||||
default={edge}
|
||||
Which edge of the screen to place the panel on. Note that some window managers
|
||||
(such as i3) do not support placing docked windows on the left and right edges.
|
||||
The value :code:`background` means make the panel the "desktop wallpaper".
|
||||
Note that when using sway if you set a background in your sway config it will
|
||||
cover the background drawn using this kitten.
|
||||
Additionally, there are two more values: :code:`center` and :code:`none`.
|
||||
Additionally, there are three more values: :code:`center`, :code:`center-sized` and :code:`none`.
|
||||
The value :code:`center` anchors the panel to all sides and covers the entire
|
||||
display (on macOS the part of the display not covered by titlebar and dock).
|
||||
The panel can be shrunk and placed using the margin parameters.
|
||||
The value :code:`none` anchors the panel to the top left corner and should be
|
||||
placed and using the margin parameters. Its size is set by :option:`--lines`
|
||||
and :option:`--columns`.
|
||||
and :option:`--columns`. The value :code:`center-sized` is just like :code:`none` except
|
||||
that the panel is centered instead of in the top left corner and the margins have no effect.
|
||||
|
||||
|
||||
--layer
|
||||
|
||||
Reference in New Issue
Block a user