sxiv icon indicating copy to clipboard operation
sxiv copied to clipboard

allow window title to be set at runtime with -T option

Open defaultxr opened this issue 4 years ago • 2 comments

This commit allows the user to set the title of the window with the -T command line flag. If -T is not provided, sxiv defaults to the usual sxiv window title.

I query my image collection with various scripts and I find it useful to be able to set the title to the query string that generated the list of images provided per sxiv invocation.

defaultxr avatar Dec 03 '20 05:12 defaultxr

This also needs a man page update along the lines of:

diff --git a/sxiv.1 b/sxiv.1
index eff3d66..8eddf99 100644
--- a/sxiv.1
+++ b/sxiv.1
@@ -14,6 +14,8 @@ sxiv \- Simple X Image Viewer
 .IR GEOMETRY ]
 .RB [ \-N
 .IR NAME ]
+.RB [ \-T
+.IR TITLE ]
 .RB [ \-n
 .IR NUM ]
 .RB [ \-S
@@ -64,6 +66,9 @@ more information on GEOMETRY argument.
 .BI "\-N " NAME
 Set the resource name of sxiv's X window to NAME.
 .TP
+.BI "\-T " TITLE
+Set the window title of sxiv's X window to TITLE.
+.TP
 .BI "\-n " NUM
 Start at picture number NUM.
 .TP

nagy avatar Apr 06 '21 15:04 nagy

@nagy Thanks! Fixed.

defaultxr avatar Apr 06 '21 22:04 defaultxr