You are not logged in.
Pages: 1
Aka:
when I type starfish -d duration
duration being whatever time I mean, sadly it does the same filename no matter what.
CLI is preferred, but in general, wondered if anyone knows how to do this.
Or for that matter, even doing something akin to, making a random directiory, cding to it, then transmitting the format and then cding and repeating again and again.
Or to put it another way...
mkdir random directory
cd to random directory
then make the wallpaper
cd
repeat
I have a love for the xstarfish wallpapers it creates.
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
Try the following (WARNING - untested code- WARNING):
#!/bin/bash
FLAG=0
until [[ $FLAG = "1" ]]
do
DIR=$(date +%N)
mkdir $DIR
if (($?>0)) ;then exit;fi
cd $DIR
if (($?>0)) ;then exit;fi
starfish -d duration
# Tidy up anything if you want here
cd ..
if (($?>0)) ;then exit;fi
rmdir $DIR # Optional
if (($?>0)) ;then exit;fi
done
date +%N returns the current time in nanoseconds, so will very rarely repeat.
But I don't have starfish, so I can't test this. Use at your own risk.
Last edited by chris2be8 (2022-11-09 17:19:40)
Offline
I've just fixed a bug in the above script (I had a do missing) and tested it after replacing "starfish -d duration" with "sleep 5". So it might work now.
Offline
I've just fixed a bug in the above script (I had a do missing) and tested it after replacing "starfish -d duration" with "sleep 5". So it might work now.
The above script, works in making multiple directories, but there is one thing:
After I make the directory, I want to output a file, which I seemed to have forgotten, requires the -o
option... after the duration.
After which, I want to make a new wallpaper in said location and when it does, have the command cd used, then repeat, etc...
The folder I want to be the wallpaper one, aka, where it makes new wallpapers:
would be called WallpaperZone or something like that...
So it seems I made some really silly blunders, in my explanation of what I wanted... sorry bout that...
That being said, you got most of this right already.
Although, I wonder if this can be done directly with, making random wallpapers just in the same directory itself...
Aka, having each wallpaper have a different date name.
I wonder...
Anywho, let me know if this is possible...
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
#!/bin/sh
dir="$HOME/WallpaperZone"
count="1"
mkdir -p "$dir"
while [ $count -lt 11 ] ; do
starfish -o "$dir"/Wallpaper"$count"
count=$((count+1)) # ah ha ha
done
Add set -eo pipefail as the first line (after the shebang) if you want the script to exit after any of the commands fail.
EDIT: that example provides 10 images, change the -lt 11 bit to modify that.
EDIT2: added counting Count reference. I love jokes in the comments.
Last edited by Head_on_a_Stick (2022-11-10 14:25:59)
Brianna Ghey — Rest In Power
Offline
#!/bin/sh dir="$HOME/WallpaperZone" count="1" mkdir -p "$dir" while [ $count -lt 11 ] ; do starfish -o "$dir"/Wallpaper"$count" count=$((count+1)) # ah ha ha done
Add set -eo pipefail as the first line (after the shebang) if you want the script to exit after any of the commands fail.
EDIT: that example provides 10 images, change the -lt 11 bit to modify that.
EDIT2: added counting Count reference. I love jokes in the comments.
This one is very good!
Just one small thing though, is there a finite limit?
Also, as a last question, how many files would be a bad idea to have in one folder for someone like me?
As a huge important hint, I should mention:
I have two libreboot X200 computers... one of them is in a very not so good shape, as an unneeded info...
One X230,, which mostly works, beyond a key missing, Dual core i5-3380M
one T430i which has a quad core processor i7-3632QM
I bring this, wondering how many files in a folder would cause me the same problem I have when I read a /etc/hosts type adblock filterlist with 1 million, or one hundred thousand lines on it...
One million takes a bit to load, on T430...
A lot Longer time on X230 but loadable.
However, if its the X200... forget about it!
xD
Although, beyond this, probably I am good for now.
But do you have any advice?
Waiting on that before I mark solved.
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
is there a finite limit?
No. Use this construct to start an infinite loop:
while : ; do
[stuff]
done
https://pubs.opengroup.org/onlinepubs/0 … colon.html
how many files would be a bad idea to have in one folder for someone like me?
Infinite files would be a bad idea. Otherwise the image tiles are about 100KiB in size so it depends how big your hard drive is. Many files would only cause a slowdown if you tried to view them all at once, for example in a graphical file manager with thumbnails enabled.
Last edited by Head_on_a_Stick (2022-11-11 08:30:43)
Brianna Ghey — Rest In Power
Offline
I bring this, wondering how many files in a folder would cause me the same problem I have when I read a /etc/hosts type adblock filterlist with 1 million, or one hundred thousand lines on it...
One million takes a bit to load, on T430...
A lot Longer time on X230 but loadable.
hi, Have you seen a noticable difference with host addblock?
I had been using ...
# This MVPS HOSTS file is a free download from: #
# http://winhelp2002.mvps.org/hosts.htm #
but unloaded it about 2 months ago and haven't really noticed a flood of adds. offtopic I know, but... ?
pic from 1993, new guitar day.
Offline
zapper wrote:I bring this, wondering how many files in a folder would cause me the same problem I have when I read a /etc/hosts type adblock filterlist with 1 million, or one hundred thousand lines on it...
One million takes a bit to load, on T430...
A lot Longer time on X230 but loadable.hi, Have you seen a noticable difference with host addblock?
I had been using ...
# This MVPS HOSTS file is a free download from: # # http://winhelp2002.mvps.org/hosts.htm #
but unloaded it about 2 months ago and haven't really noticed a flood of adds. offtopic I know, but... ?
Yeah... about that... your comment is in fact off topic quite a bit... nothing new for me tho...
With that out of the way, that host link you had, is beyond outdated if you look up their sources.
Just a heads up...
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
zapper wrote:is there a finite limit?
No. Use this construct to start an infinite loop:
while : ; do [stuff] done
https://pubs.opengroup.org/onlinepubs/0 … colon.html
zapper wrote:how many files would be a bad idea to have in one folder for someone like me?
Infinite files would be a bad idea. Otherwise the image tiles are about 100KiB in size so it depends how big your hard drive is. Many files would only cause a slowdown if you tried to view them all at once, for example in a graphical file manager with thumbnails enabled.
Can you show me an example of theloop you mentioned?
Something akin to, create new wallpaper via starfish per duration with a different name via date, then start over,
Been trying to get it to work, but it gives me the unexpected end issue when I try...
*sigh*
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
Can you show me an example of theloop you mentioned?
I already have. Replace [stuff] with the commands to be repeated.
Been trying to get it to work, but it gives me the unexpected end issue when I try...
Show us your attempts.
Last edited by Head_on_a_Stick (2022-11-14 06:04:11)
Brianna Ghey — Rest In Power
Offline
This was my latest attempt, more or less, I kind of wanted to have it occur every so often, via a specific duration...
#!/bin/sh
while : ; do
dir="$HOME/WallpaperZone"
count="1"
mkdir -p "$dir"
while [ $count -lt 11 ] ; do
starfish -o "$dir"/Wallpaper"$count"
count=$((count+1)) # ah ha ha
sleep 60000
done
Actually, this is going to sound insane, but I just found my error... stupid or not
insert embarrassed face here... __________
seems I have two different sets of "whiles" this doesn't work, does it...
xD
EDIT: FINAL hopefully?
#!/bin/sh
while : FLAG=0; do
touch=$(date +%N)
starfish -d 60 -o ~/Wallpaper/$(date +%N)
sleep 60000
done
I use this and it works, except for one thing...
*Keeps trying to change the most recent one and not create a new one from the CURRENT date*
Last edited by zapper (2022-11-15 01:08:18)
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
I think you need to explain exactly what you want to do here.
In respect of this:
#!/bin/sh
while : FLAG=0; do
touch=$(date +%N)
starfish -d 60 -o ~/Wallpaper/$(date +%N)
sleep 60000
done
Why FLAG=0? I think chris2be8 was using that to create an infinite loop but my while : bit does that already.
Why have you set the touch variable and then not used it?
Why are you using the -d flag for starfish? I think that controls the delay between switching wallpapers when it's run in daemon mode. It's not needed at all if you just want to create a bunch of wallpaper image files.
If you just want a random wallpaper switcher then run starfish as a daemon, then you won't have to save any image files at all because they will be generated on demand. I think this is the intended mode of operation anyway.
Brianna Ghey — Rest In Power
Offline
I think you need to explain exactly what you want to do here.
In respect of this:
#!/bin/sh while : FLAG=0; do touch=$(date +%N) starfish -d 60 -o ~/Wallpaper/$(date +%N) sleep 60000 done
Why FLAG=0? I think chris2be8 was using that to create an infinite loop but my while : bit does that already.
Why have you set the touch variable and then not used it?
Why are you using the -d flag for starfish? I think that controls the delay between switching wallpapers when it's run in daemon mode. It's not needed at all if you just want to create a bunch of wallpaper image files.
If you just want a random wallpaper switcher then run starfish as a daemon, then you won't have to save any image files at all because they will be generated on demand. I think this is the intended mode of operation anyway.
I actually, just realized something beyond stupid and possibly insane...
As long as I keep "using it" and the folder its being created in, is open, theoretically, it should keep pumping them out... and as long as I don't do what I usually do... aka, use bleachbit, nonstop, etc... to delete thumbnails, etc...
The problem is basically solved...
facepalm.jpeg seems appropriate here... like on an insane scale...
xD
So... my apologies, its solved. Btw, I think that was what you just said, right?
The funny thing is, for some unknown reason, a lightbulb went off when I was deleted files via bleachbit-gtk...
the .thumbnails folder... is the solution!
Anyways, thanks for the help... I appreciate it!
The only thing I really need to do which should be easy enough, is to make sure when I exit jwm, I have it set to paste those files elsewhere on shutdown...
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!
Offline
Pages: 1