Essentials of arbtt Setup

The two most important things in arbtt are making sure you’re always logging and making sure you’re capturing the right information. Before you spend hours on your categorize.cfg, make arbtt start automatically and get your window titles right. You’ve got the activity logs so can worry about categorizing later.

For many programs I use, the xwindows title works well enough, but for browsers and terminals, I take special care to get them into a parseable format. For browsers, the title is derived from the <title> of the active tab and doesn’t always tell enough information about to be helpful in categorizing. Though many websites have <title> schemas like

[video name] - YouTube
[article name] - The New York Times
[meetup name] | [location] | Meetup

many sites like facebook and reddit don’t have a fixed schema for their titles. To make sure I can easily classify as SocialMedia or reddit as ScrewingAround, I use a chrome extension that appends the beginning of the url to the window title.

Cambridge Town Hall - - Chromium
Jekyll Static Site Generator - - Chromium

Then I can easily write rules for without having to specify every possible subreddit title or facebook page title.

For the most part, I write code in vim inside tmux inside a terminal, all of which might try to set the terminal’s title. I’ve ended up on a configuation that shows me the current path of my active tmux pane and whatever program is open. You’re probably doing something different, so you’ll have to make sure the window title is useable for your setup.

Now that I have the browser and vim titles set, I can write rules like

# .arbtt/categorize.cfg
current window $program == "gnome-terminal-server" ==> {
    current window $title =~ m!blog! ==> tag Programming:Blog