Quote:
Originally Posted by ownedbycats
On the topic of that single-column rule:
Code:
program:
if readstatus()=='currentlyreading' then
read = $$#lastread;
updated = $$#fanficupdated;
if fanfic_unreadchaps()==#1 && $$#percentread==#99 then '#00aaff'
elif fanfic_unreadchaps()==#1 && days_between (read, updated) <#0 then '#00d400'
elif fanfic_unreadchaps()>=#1 && days_between (read, updated) <#0 then '#ffff7f'
fi
else colours_daysbetween($#lastread, '#00aaff', '#69cfff', '#9bdeff')
fi
If the colours_daybetween on line 12 is outside the inner fi (line 10), it doesn't colour currentlyreadings that don't match the other rules. But if I put it inside the fi it only colours currentlyreadings. Do I need to duplicate that line? 
|
It isn't clear to me what you want to do. If you want the color in the else clause to be used if no other color is selected then this would do it.
Code:
program:
colour = if readstatus()=='currentlyreading' then
read = $$#lastread;
updated = $$#fanficupdated;
if fanfic_unreadchaps()==#1 && $$#percentread==#99 then '#00aaff'
elif fanfic_unreadchaps()==#1 && days_between (read, updated) <#0 then '#00d400'
elif fanfic_unreadchaps()>=#1 && days_between (read, updated) <#0 then '#ffff7f'
fi
fi;
if !colour then colour = colours_daysbetween($#lastread, '#00aaff', '#69cfff', '#9bdeff')
fi;
colour