You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the tag has a category, it will only be assigned if no other tag of that category has been assigned.
However it is important that these sum up to 100% , and the question occurs how does this work precisely?
The answer is that the first rule that applies , then stops
(acutally it does not stop evaluating, since other Category could be assigned later, but not to the same category, it is not overwritten, but the other way round! - first match applies)
Working example:
version1:
current window $program == ["Navigator", "chromium"] ==> tag Graph:browsing,
current window $title =~ /(?i).*Radio.*/ ==> tag Graph:radio,
version2: (the two lines interchanged)
current window $title =~ /(?i).*Radio.*/ ==> tag Graph:radio,
current window $program == ["Navigator", "chromium"] ==> tag Graph:browsing,
Running arbtt-stats in each case , one obtains:
ad1) no radio (because I only listened to radio via webradio using browser)
ad2) radio, and browsing (which is not radio) , this is of course in realworld application the preferred solution, always set this browser related line last
The behavior your describe is expected, so I am not sure what this issue is about. Do you want confirmation that this is indendet behaviour, suggest better documentation, or do you suggest that the behaviour changes?
This, because it was not clear for me, so I tried it out and the example above is proof of concept. Maybe just add this to the docs that the first match per category is the one that is used. (so put general rules after specific ones whereby the last rules are for thos that were not detected before)
A useful example (at least for me to detect whether I use E-Mail actively or just in the background), the order matters
current window $title =~ [/.*Thunderbird.*/, /.*Outlook.*/, /.*GMX.*/, /.*Webmail.*/] ==> tag Mail:aktiv,
any window $title =~ [/.*Thunderbird.*/, /.*Outlook.*/, /.*GMX.*/, /.*Webmail.*/] ==> tag Mail:inaktiv,
Then analyze using arbtt-stats -c "Mail" --for-each=day -m0
Is there the possibility to define a variable for pattern matching?
In the docs there is written
However it is important that these sum up to 100% , and the question occurs how does this work precisely?
The answer is that the first rule that applies , then stops
(acutally it does not stop evaluating, since other Category could be assigned later, but not to the same category, it is not overwritten, but the other way round! - first match applies)
Working example:
version1:
version2: (the two lines interchanged)
Running
arbtt-stats
in each case , one obtains:ad1) no radio (because I only listened to radio via webradio using browser)
ad2) radio, and browsing (which is not radio) , this is of course in realworld application the preferred solution, always set this browser related line last
see also:
related issue on bitbucket
user guide docs
The text was updated successfully, but these errors were encountered: