Permalink
Browse files

Add %V format specifier (returns feh PID) - patch by 0ion9, closse #109

  • Loading branch information...
derf committed Nov 13, 2012
1 parent 96d5778 commit f9609945e76eef4ce36be9926e18b2383fbb67f3
Showing with 8 additions and 0 deletions.
  1. +4 −0 man/feh.pre
  2. +4 −0 src/slideshow.c
View
@@ -873,6 +873,10 @@ Image width
.Nm
version
.
+.It %V
+.
+Process ID
+.
.It %z
.
current image zoom
View
@@ -508,6 +508,10 @@ char *feh_printf(char *str, feh_file * file, winwidget winwid)
case 'v':
strcat(ret, VERSION);
break;
+ case 'V':
+ snprintf(buf, sizeof(buf), "%d", getpid());
+ strcat(ret, buf);
+ break;
case 'w':
if (file && (file->info || !feh_file_info_load(file, NULL))) {
snprintf(buf, sizeof(buf), "%d", file->info->width);

0 comments on commit f960994

Please sign in to comment.