diff options
Diffstat (limited to 'client/common')
| -rw-r--r-- | client/common/common.c | 6 | ||||
| -rw-r--r-- | client/common/common.h | 2 | 
2 files changed, 4 insertions, 4 deletions
diff --git a/client/common/common.c b/client/common/common.c index 982f89a..14837cb 100644 --- a/client/common/common.c +++ b/client/common/common.c @@ -68,7 +68,7 @@ usage(FILE *out, const char *name)            " -p, --prompt          defines the prompt text to be displayed.\n"            " -P, --prefix          text to shown before highlighted item.\n"            " -I, --index           select item at index automatically.\n" -          " --scrollbar           display scrollbar.\n\n" +          " --scrollbar           display scrollbar. (always, autohide)\n\n"            "Use BEMENU_BACKEND env variable to force backend:\n"            " curses               ncurses based terminal backend\n" @@ -117,7 +117,7 @@ parse_args(struct client *client, int *argc, char **argv[])          { "prompt",      required_argument, 0, 'p' },          { "index",       required_argument, 0, 'I' },          { "prefix",      required_argument, 0, 'P' }, -        { "scrollbar",   no_argument,       0, 0x113 }, +        { "scrollbar",   required_argument, 0, 0x113 },          { "bottom",      no_argument,       0, 'b' },          { "grab",        no_argument,       0, 'f' }, @@ -177,7 +177,7 @@ parse_args(struct client *client, int *argc, char **argv[])                  client->selected = strtol(optarg, NULL, 10);                  break;              case 0x113: -                client->scrollbar = true; +                client->scrollbar = (!strcmp(optarg, "always") ? BM_SCROLLBAR_ALWAYS : (!strcmp(optarg, "autohide") ? BM_SCROLLBAR_AUTOHIDE : BM_SCROLLBAR_NONE));                  break;              case 'b': diff --git a/client/common/common.h b/client/common/common.h index 914ddf0..eafbb3a 100644 --- a/client/common/common.h +++ b/client/common/common.h @@ -5,6 +5,7 @@  struct client {      enum bm_filter_mode filter_mode; +    enum bm_scrollbar_mode scrollbar;      const char *colors[BM_COLOR_LAST];      const char *title;      const char *prefix; @@ -15,7 +16,6 @@ struct client {      bool bottom;      bool grab;      bool wrap; -    bool scrollbar;  };  void parse_args(struct client *client, int *argc, char **argv[]);  | 
