From 3120a848f6ce663dbbe200835dc03b588568a8a0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 22 Jul 2019 18:22:50 +0200 Subject: Use --no-fehbg in .fehbg commandline This ensures that X11 layout or other changes do not affect the .fehbg contents, which are meant to only be updated when a --bg-option is used manually. Closes #482 --- man/feh.pre | 6 ++++++ src/wallpaper.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/man/feh.pre b/man/feh.pre index a313fd4..3fecb00 100644 --- a/man/feh.pre +++ b/man/feh.pre @@ -1075,6 +1075,12 @@ So to have your background restored every time you start X, you can add .Qq ~/.fehbg & to your X startup script .Pq such as Pa ~/.xinitrc . +Note that the commandline written to +.Pa ~/.fehbg +always includes the +.Cm --no-fehbg +option to ensure that it is not inadvertently changed by differences in +X11 screen layout or similar. . .Pp . diff --git a/src/wallpaper.c b/src/wallpaper.c index 96b4f90..6a94879 100644 --- a/src/wallpaper.c +++ b/src/wallpaper.c @@ -463,7 +463,7 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled, } else { fputs("#!/bin/sh\n", fp); fputs(cmdargv[0], fp); - fputs(" --bg-", fp); + fputs(" --no-fehbg --bg-", fp); if (centered) fputs("center", fp); else if (scaled) -- cgit v1.2.3