mirror of https://github.com/davatorium/rofi.git
Add a y-offset.
This commit is contained in:
parent
1b9d4fb325
commit
82bdb5f348
|
@ -67,5 +67,6 @@ Settings config = {
|
||||||
.wmode = VERTICAL,
|
.wmode = VERTICAL,
|
||||||
// Padding of the window.
|
// Padding of the window.
|
||||||
.padding = 5,
|
.padding = 5,
|
||||||
.show_title = 1
|
.show_title = 1,
|
||||||
|
.y_offset = 0
|
||||||
};
|
};
|
||||||
|
|
|
@ -101,8 +101,10 @@ typedef struct _Settings
|
||||||
WindowLocation location;
|
WindowLocation location;
|
||||||
WindowMode wmode;
|
WindowMode wmode;
|
||||||
unsigned int padding;
|
unsigned int padding;
|
||||||
|
int y_offset;
|
||||||
|
|
||||||
unsigned int show_title;
|
unsigned int show_title;
|
||||||
|
|
||||||
} Settings;
|
} Settings;
|
||||||
|
|
||||||
extern Settings config;
|
extern Settings config;
|
||||||
|
|
|
@ -1227,6 +1227,8 @@ MenuReturn menu ( char **lines, char **input, char *prompt, Time *time, int *shi
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Apply offset.
|
||||||
|
y+= config.y_offset;
|
||||||
|
|
||||||
|
|
||||||
XMoveResizeWindow ( display, box, x, y, w, h );
|
XMoveResizeWindow ( display, box, x, y, w, h );
|
||||||
|
|
|
@ -63,7 +63,8 @@ XrmOption xrmOptions[] = {
|
||||||
{ xrm_Number, "padding", { .num = &config.padding } },
|
{ xrm_Number, "padding", { .num = &config.padding } },
|
||||||
{ xrm_Number, "borderwidth", { .num = &config.menu_bw } },
|
{ xrm_Number, "borderwidth", { .num = &config.menu_bw } },
|
||||||
{ xrm_String, "terminal", { .str = &config.terminal_emulator } },
|
{ xrm_String, "terminal", { .str = &config.terminal_emulator } },
|
||||||
{ xrm_Number, "location", { .num = &config.location} },
|
{ xrm_Number, "location", { .num = &config.location } },
|
||||||
|
{ xrm_Number, "yoffset", { .num = &config.y_offset } },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue