arbtt
arbtt copied to clipboard
categroize.cfg rules tool , sums to 100%
Original report by Anonymous.
-
In how far is it guaranteed that stats will sum up to 100% ((total time) last row) . To put in the language of "rule-based", what happens when two rules apply?
-
How to create tag / category easily, is there a tool that builds regex. There are some aliases like Navigator in sample cfg file, it seems they are built-in because otherwise this would not work but it reports time
current window $program == ["Navigator", "chromium"] && !(current window $title =~ [m!YouTube!, m!Vi ... .... ) ==> tag Graph:browsing,
Original comment by nomeata (Bitbucket: nomeata, GitHub: nomeata).
To put in the language of "rule-based", what happens when two rules apply?
If you separte them with ,
, then both will set a tag. A sample can have more than one tag (but only one per category). So the question is which stats should sum up to 100%? (Maybe give a concrete example)
Navigator is not built-in; that was just the name of the firefox program 8 years ago or so… Besides that, I do not fully understand your question.
Original comment by Johnny Depp (Bitbucket: johnnydepp16, ).
Then category
vs tag
is not yet clear, it is separated via a colon :
? One can choose any text if I understood correctly like Desktop:…, Program:…, Graph:,…, Titel: ….
I have a list, once per line is something like `current window $program == "…" && current window $title =~ …. ==> tag ……,` At the end of each line there is a comma , all is within curly braces {}
Btw: ps -aux |grep -i navig
does not display anything, even when firefox is running
Original comment by nomeata (Bitbucket: nomeata, GitHub: nomeata).
Yes, if you want to use categories, write Category:Nameg
as the tag. You do not have to use categories.
Btw:
ps -aux |grep -i navig
does not display anything, even when firefox is running
But the above rule still fires? That’s odd then
Original comment by Johnny Depp (Bitbucket: johnnydepp16, ).
Thanks for clarification. So what happens in the following situation?
current window $title =~ [/.*MATLAB.*/, /.*Figure.*/] ==> tag Graph:code-matlab,
current window $title =~ [m!Facebook!, m!Google+!, m!Twitter!] ==> tag Graph:social,
And my window title is “Google Search - Figure“ (just an example, so that both regex matches apply, even though I dont know the m!
syntax?)
Then the tag in category “Graph” is given twice or the last overwrites the former? Unfortunately I couldnt find this in the docs
Btw what do these curly braces {}
do in the whole cfg file?
Original comment by nomeata (Bitbucket: nomeata, GitHub: nomeata).
Try it out! The docs say “If the tag has a category, it will only be assigned if no other tag of that category has been assigned.” so I assume the first one wins.
The curly braces can be used to group rules. This is useful for { rule1; rule2; rule3 }
which stops trying rules once one of them fires.
Original comment by Johnny Depp (Bitbucket: johnnydepp16, ).
Btw²: It is Program:Mail
logged (I use thunderbird, which is not logged at all) for the unconditional (i.e. always) rule tag Program:$current.program,
. So “Mail” and “Navigator” seem to be used internally somehow, how is $current.program
working internally? So it looked like an internal “alias” (c.f. docs where aliases are set, however the other way round from “Navigator” to “Firefox” for instance). Maybe one shall add an option to get the current program’s execution command (full command with paramters that led to execution of the current windows' program , see ps -aux
output). However on the other hand too much information would be misleading since arbtt aims to combine a broad set of conditions (which apply to many situations) to a given tag (in order to see how much time was spent on a broad collection of window titles/programs)
Original comment by nomeata (Bitbucket: nomeata, GitHub: nomeata).
There are no internal aliasing. Ah, but I remember: $current.program
is based on the xprop
’s set by the program (so not necessarily the binary name). Run xprop
and click on a window, and look for WM_CLASS
Original comment by Johnny Depp (Bitbucket: johnnydepp16, ).
Is it identical to the output of: xdotool getactivewindow getwindowname
?
Can be used with sleep 3 && ..
command to work a bit in order to find out how it works (btw works on the desktop - “Schreibtisch” for me - as well, might be used to set as inactive as well)
Original comment by Johnny Depp (Bitbucket: johnnydepp16, ).
see also: https://arbtt.nomeata.de/doc/users_guide/effective-use.html#idm45896929327008
Original comment by Johnny Depp (Bitbucket: johnnydepp16, ).
$ xprop | tail -5
WM_CLASS(STRING) = "Navigator", "Firefox"
WM_ICON_NAME(STRING) = "Effective Use of Arbtt - Mozilla Firefox"
_NET_WM_ICON_NAME(UTF8_STRING) = "Effective Use of Arbtt - Mozilla Firefox"
WM_NAME(STRING) = "Effective Use of Arbtt - Mozilla Firefox"
_NET_WM_NAME(UTF8_STRING) = "Effective Use of Arbtt - Mozilla Firefox"
Oh it has two entries in WM_CLASS(STRING)
Original comment by Johnny Depp (Bitbucket: johnnydepp16, ).
Same here
$ xprop | tail -5
WM_CLASS(STRING) = "Mail", "Thunderbird"
...
Btw is the issue tracker more active here or on GitHub, will these be merged once? Or move to github? https://github.com/nomeata/arbtt/issues
Original comment by nomeata (Bitbucket: nomeata, GitHub: nomeata).
Btw is the issue tracker more active here or on GitHub, will these be merged once? Or move to github? https://github.com/nomeata/arbtt/issues
You alone have cause more arbtt-related discussion activity than there was in the last 5 years or so :slight_smile:
I am somwhat inclined to move to Github only, just to have less tools to worry about. But maybe I’ll just let this running. Dunno yet.
Is this still relevant?