Tuesday, July 29, 2014
Bad headphones
Don't go near http://www.ifrogz.com/earbuds/luxe-buds-earphones-in-ear-mic or http://www.complyfoam.com/products/s-400/. I'll post more about headphones, but stick with Skullcandy on the low end and http://en-us.sennheiser.com/ and audio-technica, and http://www.monoprice.com/Product?c_id=108&cp_id=10823&cs_id=1082302&p_id=8323&seq=1&format=2 if you don't have the chedda for pricier 'cans.
Thursday, July 24, 2014
Applescript and Nerdtool for unread mail notification redux
Okay, so I also wanted to check mailboxes other than the inbox for different accounts. I extended the previous AppleScript to this:
Now, one can pass any number of "Account:Mailbox" tuples to check all the mailboxes one wishes.
-- http://erikslab.com/2007/08/31/applescript-how-to-split-a-string/
on split(theString, theDelimiter)
-- save delimiters to restore old settings
set oldDelimiters to AppleScript's text item delimiters
-- set delimiters to delimiter to be used
set AppleScript's text item delimiters to theDelimiter
-- create the array
set theArray to every text item of theString
-- restore the old setting
set AppleScript's text item delimiters to oldDelimiters
-- return the result
return theArray
end split
on run args
set a to 0
repeat with arg in args
set splitted to split(arg, ":")
set thisAccount to item 1 of splitted
set thisMailbox to item 2 of splitted
tell application "Mail"
if it is running then
set a to a + the (unread count of mailbox thisMailbox of account thisAccount)
end if
end tell
end repeat
return a
end run
Now, one can pass any number of "Account:Mailbox" tuples to check all the mailboxes one wishes.
Wednesday, July 23, 2014
Applescript and Nerdtool for unread mail notification
I previously blogged about updating Mail Unread Menu (http://loganrockmore.com/mailunreadmenu/) -- http://www.k336.org/2012/09/mail-unread-menu-and-53.html I've long liked the functionality (I really don't like notifications popping up all the time and distracting me -- much better to have an unobtrusive indicator that I can look at when I want), but that went away with my upgrade to Mavericks. I understand the work involved in keeping software up to date when OSs etc. change, so I have no problems with it falling behind. Instead, I wrote an AppleScript and connected it to Nerdtool (http://mutablecode.com/apps/nerdtool.html) that I really like. Here's the AppleScript:
One needs to call it with the Mail.app accounts one wants checked:
What would be even better is if some wrote a Cocoa/Objective C app that monitors a file or listens to a name FIFO and displays a short text string in the menubar. I wish I had time to write such a beast -- maybe when I retire...
on run argv
set a to 0
repeat with currentAccount in argv
tell application "Mail"
set a to a + the (unread count of mailbox "INBOX" of account currentAccount)
end tell
end repeat
end run
One needs to call it with the Mail.app accounts one wants checked:
What would be even better is if some wrote a Cocoa/Objective C app that monitors a file or listens to a name FIFO and displays a short text string in the menubar. I wish I had time to write such a beast -- maybe when I retire...
Monday, July 14, 2014
Notes from a Mavericks upgrade
Went pretty well, all in all. To get rid of a pesky "can't be opened because it is from an unidentified developer" error, I did:
xattr -dr com.apple.quarantine /Applications/ShellHere.app
Subscribe to:
Posts (Atom)