sxiv
sxiv copied to clipboard
allow window title to be set at runtime with -T option
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.
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 Thanks! Fixed.