At Mon, 14 Sep 2026 09:09:42 -0600, "DTB" <trinity@tebibyte.media> wrote: Subject: Re: Cooless with feh > > On Mon Sep 14, 2026 at 6:45 AM MDT, Todd Gruhn wrote: > > OOOOH. What is '$y' ? > > The $y variable in the sh(1) script refers to the Y-coordinate offset, > which changes to apparently slide the wallpaper down. Here's a version > of the script which way work better (as $y is unassigned when the script > first invokes feh(1), making the invocation invalid and terminating the > script prematurely): > > sh -ec ' > while :; do > pkill feh || true > > y=$(echo $y 1 + p | dc) # +1 per round > test $y -gt 100 && y=0 # 0-100 > > feh --class wallpaper -g +0+$y /path/to/wallpaper.tif > > sleep 5 > done' & BTW, the NetBSD shell(s) can do arithmetic without need for external commands: y=$((y + 1)) e.g. counting 1-5: sh -c 'y=0; while [ $y -lt 5 ]; do y=$((y + 1)); echo $y; done' -- Greg A. Woods <gwoods%acm.org@localhost> Kelowna, BC +1 250 762-7675 RoboHack <woods%robohack.ca@localhost> Planix, Inc. <woods%planix.com@localhost> Avoncote Farms <woods%avoncote.ca@localhost>
Attachment:
pgpz7feXzKsTo.pgp
Description: OpenPGP Digital Signature