adi1090x / dynamic-wallpaper

A simple bash script to set wallpapers according to current time, using cron job scheduler.
GNU General Public License v3.0
1.91k stars 116 forks source link

Scripts do not reset colour and bolding at end of output #12

Closed chuahou closed 4 years ago

chuahou commented 4 years ago

In both dwall.sh and test.sh, colour codes are set (e.g. for different lines of usage) with most of them being bold, but the bold attribute is not later reset at the end of the script. This means that prompts without colour codes will be left incorrectly bolded after running the script:

incorrect bolding

or prompts that set colour without setting / unsetting the bold attribute will be incorrectly bolded:

incorrect bolding 2

Usually other programs will reset attributes / colour such that such behaviour does not happen, for example ls:

correct reset by ls

We can see that despite changing colour and attributes multiple times ls eventually resets the colour and bold attribute for the following output to be formatted.