xyb3rt / sxiv

Simple X Image Viewer
GNU General Public License v2.0
1.82k stars 261 forks source link

Add currently viewed file information to the window title #453

Open qsmodo opened 3 years ago

qsmodo commented 3 years ago

For those who use window managers (e.g. dwm, icewm) that show window titles, it may be useful to show the current file name in the title. This PR breaks the title in a string literal prefix and a suffix that shows a file path component, both X-resources configurable.

sxiv - fileInView.png
^^^^^^^
prefix ^^^^^^^^^^^^^^
           suffix

The suffix can be the filename, its full path, its directory name, its directory full path, or, to keep backwards compatibility, nothing. Please see the manual for more detailed information.

bakkeby commented 3 years ago

Thanks, this works great! Added to my own build.