diff options
author | nicm <nicm> | 2021-10-25 09:38:36 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-10-25 09:38:36 +0000 |
commit | ef46eb91a5e0b6e2b023544f45dbc98c8fe1377f (patch) | |
tree | 3d1e7eb8f3a6366f09c2fcc276233843e2975775 /cmd-display-menu.c | |
parent | 0cca695d6e75426e295e03668a4ed35ee62afe7c (diff) | |
download | rtmux-ef46eb91a5e0b6e2b023544f45dbc98c8fe1377f.tar.gz rtmux-ef46eb91a5e0b6e2b023544f45dbc98c8fe1377f.tar.bz2 rtmux-ef46eb91a5e0b6e2b023544f45dbc98c8fe1377f.zip |
Add -s and -S to display-popup to set popup and border style, from
Alexis Hildebrandt in GitHub issue 2931.
Diffstat (limited to 'cmd-display-menu.c')
-rw-r--r-- | cmd-display-menu.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cmd-display-menu.c b/cmd-display-menu.c index b350ca15..6ecfad29 100644 --- a/cmd-display-menu.c +++ b/cmd-display-menu.c @@ -53,11 +53,12 @@ const struct cmd_entry cmd_display_popup_entry = { .name = "display-popup", .alias = "popup", - .args = { "Bb:Cc:d:e:Eh:t:T:w:x:y:", 0, -1, NULL }, + .args = { "Bb:Cc:d:e:Eh:s:S:t:T:w:x:y:", 0, -1, NULL }, .usage = "[-BCE] [-b border-lines] [-c target-client] " "[-d start-directory] [-e environment] [-h height] " - CMD_TARGET_PANE_USAGE " [-T title] " - "[-w width] [-x position] [-y position] [shell-command]", + "[-s style] [-S border-style] " CMD_TARGET_PANE_USAGE + "[-T title] [-w width] [-x position] [-y position] " + "[shell-command]", .target = { 't', CMD_FIND_PANE, 0 }, @@ -355,6 +356,8 @@ cmd_display_popup_exec(struct cmd *self, struct cmdq_item *item) struct client *tc = cmdq_get_target_client(item); struct tty *tty = &tc->tty; const char *value, *shell, *shellcmd = NULL; + const char *style = args_get(args, 's'); + const char *border_style = args_get(args, 'S'); char *cwd, *cause = NULL, **argv = NULL, *title; int flags = 0, argc = 0; enum box_lines lines = BOX_LINES_DEFAULT; @@ -448,7 +451,7 @@ cmd_display_popup_exec(struct cmd *self, struct cmdq_item *item) else if (args_has(args, 'E')) flags |= POPUP_CLOSEEXIT; if (popup_display(flags, lines, item, px, py, w, h, env, shellcmd, argc, - argv, cwd, title, tc, s, NULL, NULL) != 0) { + argv, cwd, title, tc, s, style, border_style, NULL, NULL) != 0) { cmd_free_argv(argc, argv); if (env != NULL) environ_free(env); |