From e26c81fe9ab43ef0148f51464dbae0f7a0e2b91e Mon Sep 17 00:00:00 2001 From: N-R-K <79544946+N-R-K@users.noreply.github.com> Date: Wed, 23 Feb 2022 09:23:22 +0000 Subject: use win-title script for customizing window title (#213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this removes the cli flag `-T` as well as related config.h options. Co-authored-by: Berke Kocaoğlu --- nsxiv.1 | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'nsxiv.1') diff --git a/nsxiv.1 b/nsxiv.1 index 6c8d8e6..3262827 100644 --- a/nsxiv.1 +++ b/nsxiv.1 @@ -20,8 +20,6 @@ nsxiv \- Neo Simple X Image Viewer .IR DELAY ] .RB [ \-s .IR MODE ] -.RB [ \-T -.IR TITLE ] .RB [ \-z .IR ZOOM ] .IR FILE ... @@ -101,19 +99,6 @@ may be a floating point number. Set scale mode according to MODE character. Supported modes are: [d]own, [f]it, [F]ill, [w]idth, [h]eight. .TP -.BI "\-T " TITLE -Set the window title to TITLE. Use the format `prefix:suffixmode'. Any string -literal is accepted for prefix, and the format of suffixmode is: - -.EX - Value Format - 0 Empty - 1 Basename of file - 2 Full path to file -.EE - -By default, prefix is set to "nsxiv - " and suffixmode is set to 1 (basename). -.TP .B \-t Start in thumbnail mode. .TP @@ -439,6 +424,24 @@ Color of the bar foreground. Defaults to window.foreground Color of the mark foreground. Defaults to window.foreground .TP Please see xrdb(1) on how to change them. +.SH WINDOW TITLE +The window title can be replaced with the output of a user-provided script, +which is called by nsxiv whenever there's a redraw. The path of this script is +.I $XDG_CONFIG_HOME/nsxiv/exec/win-title +and the arguments given to it (where "Optional" arguments might be empty) are: +1) resolved absolute path of the current file, +2) current file number, +3) total file count, +4) image width (Optional: Disabled on thumbnails mode), +5) image height (Optional: Disabled on thumbnails mode), +6) current zoom (Optional: Disabled on thumbnails mode). +.P +The term file is used rather than image as nsxiv does not precheck that the +input files are valid images. Total file count may be different from the actual +count of valid images. +.P +There is also an example script installed together with nsxiv as +.IR EGPREFIX/win-title . .SH STATUS BAR The information displayed on the left side of the status bar can be replaced with the output of a user-provided script, which is called by nsxiv whenever an -- cgit v1.2.3