Fixxxer: AppleScript to Set and Clear Prefixes in OmniFocus

Another nifty script for OmniFocus. It’s called Fixxxer. It does two things. If you run it with no arguments, it will remove colonized prefixes from task names. If you pass it an argument, it will add that argument as a prefix to selected tasks. It’s LaunchBar-ready. If you want to turn off the confirmation dialog, set nagMePlease to false.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
use O : script "omnifocus"
use OmniFocus : application "OmniFocus"
-- If you want to play it safe, set nagMePlease to true
property nagMePlease : true

on run
    if nagMePlease then
        set question to display dialog "Do you want to remove all prefixes?"
        if button returned of question is "OK" then
            removePrefixes()
        end if
    else
        removePrefixes()
    end if
end run

on handle_string(argv)
    tell O to setPrefix(selectedItems(), argv)
end handle_string

on removePrefixes()
    tell O to clearPrefixAll(selectedItems())
    display notification ¬
        "All prefixes removed." with title "Fixxxer"
end removePrefixes

Considered: AppleScript to Wrangle Considered Tasks in OmniFocus

I wrote another cool little tool using my AppleScript library. It’s called Considered. It also handles things having to do with colons and prefixes, but specifically the Consider: prefix. If you’re unfamiliar with considered tasks, read all about them here. Instead of trying to set task names to something like “Consider reviewing” with the ing, I opted for Kourosh Dini’s prefix-style considered tasks where you just add Consider: as a prefix. It’s simpler and easier to script. Here’s the code (using my OmniFocus library, of course.)

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
use O : script "omnifocus"
use OmniFocus : application "OmniFocus"

on run
    tell O to toggleConsider(selectedItems())
end run

on handle_string(argv)
    if argv is "set" then
        tell O to setConsider(selectedItems())
    else if argv is "clear" then
        tell O to clearConsider(selectedItems())
    end if
end handle_string

It’s a pretty nifty script that will toggle consider prefixes on and off. It’s set up to accept an argument with LaunchBar (either “set” or “clear”) to flip the considered switch one way or the other no matter what the current state.


Colonize: AppleScript to Wrangle Prefixed Tasks in OmniFocus

I just whipped up a neat little script that uses the latest version of my OmniFocus Library. It’s called Colonize. You can use it to select some tasks in OmniFocus, and then if you run Colonize.scpt, it’ll switch the first word of the task name into a prefix or into a bare word if the first word is already a prefix. This makes handling tasks like Review daily logs and Review: daily logs easy.

Here’s the code:

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
use O : script "omnifocus"
use OmniFocus : application "OmniFocus"

on run
    tell O to toggleColon(selectedItems())
end run

on handle_string(argv)
    if argv is "set" then
        O's setColon(selectedItems() of O)
    else if argv is "clear" then
        O's clearColon(selectedItems() of O)
    end if
end handle_string

You will, of course, need my library installed first. This script is set up to work with LaunchBar already. If you pass “set” or “clear” to the script (or on the command line), instead of toggling, it’ll blank set or clear colons.


Tom Bihn Daylight Backpack

Daylight Backpack

The last bag on my list of Tom Bihn bags to write about is the Daylight Backpack (DLBP). Like its cousin the Daylight Briefcase, it’s cheap, lightweight and lacking a lot of the niceities of its more expensive brethren. That’s not to say it’s a bad bag though. In fact, since I purchased the DLBP, I’ve used it more than all my other previously purchases—and more expensive—backpacks. The main reason being, because it lacks a lot of the heavier parts of the more expensive bags and because it is 99% made of Dyneema, the DLBP is really lightweight.

The DLBP has a diagonal zip on the front of the bag and inside the main compartment, there are two staggered pockets of shallow to medium depth and one main area that goes all the way down the bag. Aaaaaaand that’s it. You’re done. No more organization. The backpack straps are plain nylon webbing. There’s no mesh back panel. No hooks for chest or waist straps. It’s as barebones as it can be. But that’s okay. Because it’s light and if purchased in Dyneema, you can roll it up and stick it inside a larger bag and make it purely a day pack. The lack of bulk and weight, which could only be achieved by removing all the fancy schmancy parts of most Tom Bihn, is key to the DLBP’s utility. Don’t buy it as your only bag. Don’t buy it to be a laptop backpack, because it doesn’t use the Cache/Rails system. But it’s perfect when you need an extra bag just in case you need one, but don’t want to carry another bag because you might not need one. It’s an awesome “backup bag”. And it’s only $80 bucks.


Going Primal

I started trying to live by the Primal Blueprint since last week. If you haven’t heard of the Primal Blueprint, the crux of it is simple.

  • No grains
  • No processed sugars
  • Eat lots of plants and animals
  • Move frequently at a slow pace (walking and hiking)
  • Sprint once in a while (every 7–10 days)
  • Lift heavy things twice a week

It’s as simple as that. We’ve known for a while that cutting carbs will cause you to lose weight, but Mark Sisson also made that claim that grains are pro-inflammatory. While that seemed hard to fathom at first, I noticed after 4 or 5 days of eating Primally, the eczema on the palms of my hands went away. It was a huge change. I’ve been fighting that for about 18 months. I got creams from a doctor, used lots of lotion and used bath salts in hopes of making it better to no avail. After a few days of carbohydrate restriction, it cleared up. I continue to see improvement on other parts of my body where I’ve had eczema for longer and over the next few days, those body parts started to clear up as well.

Also due to carb restriction, I’ve lost a little bit of weight and my body fat percentage has gone down about 1%. That’s not a huge change, but my clothes are looser and my belt is getting cinched up tighter than before. My love handles are visibly smaller.

I’ve also noticed I don’t get as hungry as quickly as I used to. As your body gets used to fewer carbs, it gets better at using your existing fat reserves and that’s why you’re losing weight. Fat burns more slowly than sugar, so I don’t feel the need to eat as much as I used to. I’ve found I wake up less hungry in the mornings after a high protein/high fat dinner.

It’s been a little annoying trying to eat around other people, especially at work. In Japan, rice is a part of life. Everyone expects you to eat it. While rice isn’t as bad as wheat-based foods, it’s still a lot of carbs that your body doesn’t really need. It’s even harder because at the schools where I teach, the children are told they have to eat at least a little of everything, and apparently, if their teachers don’t eat rice, they’re going to start questioning authority. So, I’m expected to eat rice, potatoes, beans and corn all in the same meal even if I don’t want to. It’s definitely making me think hard about packing my lunch. I have to explain on a daily basis why I’m not eating the rice, soy beans, corn, noodles or bread that’s being stuffed down everyone’s throats. Everyone asks if I’m “on a diet”. It’s more like I’ve changed my lifestyle. At first, I looked into the Primal Blueprint as a diet, but after seeing my eczema disappear and seeing how you can feel satiated longer on a low-carb diet, I’m a real believer in the Primal Blueprint. Just need to start doing more rigorous exercise bits of it!

Further reading

Check out Mark’s Daily Apple for almost daily recipe ideas and tidbits about living Primally.