From c61b84975db9a6380ac02c4eba60cb8305065da5 Mon Sep 17 00:00:00 2001 From: NRK Date: Fri, 14 Jun 2024 00:46:16 +0000 Subject: [PATCH] add --bar to enable statusbar ref: https://codeberg.org/nsxiv/nsxiv/issues/404 --- etc/nsxiv.1 | 10 ++++++++-- options.c | 6 ++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/etc/nsxiv.1 b/etc/nsxiv.1 index 2c3c910..55ce0da 100644 --- a/etc/nsxiv.1 +++ b/etc/nsxiv.1 @@ -44,8 +44,14 @@ is set to 0 then animation playback is disabled. .B "\-a, \-\-animate" Play animations of multi-frame images. .TP -.B "\-b, \-\-no\-bar" -Do not show statusbar at the bottom of the window. +.B "\-b" +Do not show statusbar. +.TP +.B "\-\-bar, \-\-no\-bar" +Enables or disables statusbar. +.B "\-\-no\-bar" +is equivalent to +.BR "\-b" . .TP .B "\-c, \-\-clean\-cache" Remove all orphaned cache files from the thumbnail cache directory and exit. diff --git a/options.c b/options.c index af54103..49e5c1e 100644 --- a/options.c +++ b/options.c @@ -77,6 +77,7 @@ void parse_options(int argc, char **argv) OPT_AA, OPT_AL, OPT_THUMB, + OPT_BAR, OPT_BG, OPT_CA, OPT_CD @@ -85,6 +86,7 @@ void parse_options(int argc, char **argv) { "framerate", 'A', OPTPARSE_REQUIRED }, { "animate", 'a', OPTPARSE_NONE }, { "no-bar", 'b', OPTPARSE_NONE }, + { "bar", OPT_BAR, OPTPARSE_NONE }, { "clean-cache", 'c', OPTPARSE_NONE }, { "embed", 'e', OPTPARSE_REQUIRED }, { "fullscreen", 'f', OPTPARSE_NONE }, @@ -179,8 +181,8 @@ void parse_options(int argc, char **argv) case 'a': _options.animate = true; break; - case 'b': - _options.hide_bar = true; + case 'b': case OPT_BAR: + _options.hide_bar = (opt == 'b'); break; case 'c': _options.clean_cache = true;