mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Allow xoffset, fix bottom/right edge.
This commit is contained in:
parent
82bdb5f348
commit
3ebd0d9001
4 changed files with 9 additions and 5 deletions
|
@ -68,5 +68,6 @@ Settings config = {
|
||||||
// Padding of the window.
|
// Padding of the window.
|
||||||
.padding = 5,
|
.padding = 5,
|
||||||
.show_title = 1,
|
.show_title = 1,
|
||||||
.y_offset = 0
|
.y_offset = 0,
|
||||||
|
.x_offset = 0
|
||||||
};
|
};
|
||||||
|
|
|
@ -102,6 +102,7 @@ typedef struct _Settings
|
||||||
WindowMode wmode;
|
WindowMode wmode;
|
||||||
unsigned int padding;
|
unsigned int padding;
|
||||||
int y_offset;
|
int y_offset;
|
||||||
|
int x_offset;
|
||||||
|
|
||||||
unsigned int show_title;
|
unsigned int show_title;
|
||||||
|
|
||||||
|
|
|
@ -1206,18 +1206,18 @@ MenuReturn menu ( char **lines, char **input, char *prompt, Time *time, int *shi
|
||||||
y = mon.y;
|
y = mon.y;
|
||||||
|
|
||||||
case WL_EAST:
|
case WL_EAST:
|
||||||
x = mon.x + mon.w - w;
|
x = mon.x + mon.w - w-config.menu_bw*2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WL_EAST_SOUTH:
|
case WL_EAST_SOUTH:
|
||||||
x = mon.x + mon.w - w;
|
x = mon.x + mon.w - w-config.menu_bw*2;
|
||||||
|
|
||||||
case WL_SOUTH:
|
case WL_SOUTH:
|
||||||
y = mon.y + mon.h - h;
|
y = mon.y + mon.h - h-config.menu_bw*2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WL_SOUTH_WEST:
|
case WL_SOUTH_WEST:
|
||||||
y = mon.y + mon.h - h;
|
y = mon.y + mon.h - h-config.menu_bw*2;
|
||||||
|
|
||||||
case WL_WEST:
|
case WL_WEST:
|
||||||
x = mon.x;
|
x = mon.x;
|
||||||
|
@ -1229,6 +1229,7 @@ MenuReturn menu ( char **lines, char **input, char *prompt, Time *time, int *shi
|
||||||
}
|
}
|
||||||
// Apply offset.
|
// Apply offset.
|
||||||
y+= config.y_offset;
|
y+= config.y_offset;
|
||||||
|
x+= config.x_offset;
|
||||||
|
|
||||||
|
|
||||||
XMoveResizeWindow ( display, box, x, y, w, h );
|
XMoveResizeWindow ( display, box, x, y, w, h );
|
||||||
|
|
|
@ -65,6 +65,7 @@ XrmOption xrmOptions[] = {
|
||||||
{ 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 } },
|
{ xrm_Number, "yoffset", { .num = &config.y_offset } },
|
||||||
|
{ xrm_Number, "xoffset", { .num = &config.x_offset } },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue