Good Evening,
I am pretty new to Unix so maybe this mini project is too ambitious. Hoping someone could point in in the right direction.
Working in a cubicle and I can’t see how light it is outside. In general I use a yellow terminal in the morning (sunny) and a black/green past 3:00 (night).
What I would like to do (partly just to practice my bash). Is to write a script that will at 3:00 change the color of all of my terminals. If that works maybe I will make them change every hour or something like that. Would that be safe? Is this possible?
Here are some of my specs:
Solaris 10
Bash shell
Gnome
I am looking at this right now:
Change Gnome terminal theme programmatically
If I were doing this, I’d start with PROMPT_COMMAND. Bash will run that script just before displaying a prompt.
You have a couple of choices. You could have a script itself inside PROMPT_COMMAND:
Or you could have PROMPT_COMMAND run an external command (which could also be a bash script or you could use a different language if you wanted) to do all the work there:
The only hole I see in this is that if you have a program running when the time changes over (for example, using
tail -fto watch a file), the background won’t change until you return to the bash prompt.