

- Geektool center text cut off geeklet mac os#
- Geektool center text cut off geeklet full#
- Geektool center text cut off geeklet code#
- Geektool center text cut off geeklet password#
- Geektool center text cut off geeklet mac#
The END segment means to run the following command after you're done reading in standard input. (Unlike in some languages, awk's arrays can be labelled with text, not just numbers.) Whenever column 3 ($3) contains the word "Capacity" ($3~/Capacity), it runs the command "c=$5", which stores the fifth column into an array (a box) labelled with the contents of the third column. This awk command starts by reading in each line of ioreg -l, one at a time. The printf command calculates $10/$5*100 (that is, the 10th column divided by the 5th column, times 100) and prints it as a floating-point number with 2 decimal places ("%.2f") followed by a percentage sign ("%%").Īwk '$3~/Capacity/ ' (So $5 is the 5th column's data and $10 is the 10th column's). If your interested this is the work in progress script, hope you don’t mind I stripped some functions I didn’t need, I’m not a programmer so if I’m doing anything n00bish just let me know.This first awk command reads the standard input, one line at a time (if necessary I'm guessing only one line is being sent to it here), and splits the line into columns, the data in column c having the name $c. Next I’m looking at doing a search term function so I can monitor hashtags. I fixed this using ‘(“utf-8”)’ in the print command. (It seemed to run find in the terminal output but in GeekTool it would print all text up to the unicode character then stop). I’ve been doing some work to get the formatting to align columns, also there was an issue with GeekTool reading the Unicode characters because the default output of python is ASCII. I have GeekTool set to refresh the the script every 5 minutes (300 seconds). Hi, sorry I didn’t enable email notifications so I only just read your reply. Print "+mention.text+" : "+str(mention.id)Īpi.update_status(status=sys.argv, in_reply_to_status_id=sys.argv)
Geektool center text cut off geeklet full#
Here’s the full text of the revised script:ĬONSUMER_SECRET = keyring.get_password('CONSUMER_SECRET', 'parezcoydigo')ĪCCESS_KEY = '28424167-jwvywgfEjqcX圎bQU3Y36w2md5SyL6NC5JI5NR2bd'ĪCCESS_SECRET = keyring.get_password('ACCESS_SECRET', 'parezcoydigo')Īuth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)Īuth.set_access_token(ACCESS_KEY, ACCESS_SECRET)īitlyKey=keyring.get_password('bitly', 'parezcoydigo')īit = bitly_api.Connection('parezcoydigo', bitlyKey)Īpi.update_status(sys.argv+data) Simply pass the status ID in the terminal: The name of the person you are replying to is not automatically prepended to the message, so you have to enter that, but regardless the status will be linked from twitter’s perspective. To reply to the status, add the status ID as an argument. So, a status prints in the terminal like trying to decide on a family trip to LA or to DC in With that number, you can reply to or simply retweet a status. On functionality, I added status id numbers to the end of retrieved tweets and mentions.
Geektool center text cut off geeklet mac#
At any rate, the script now calls the Mac keychain to get the secret credentials for authorization for both the twitter and bit.ly APIs.
Geektool center text cut off geeklet code#
In fact, it would be easy to simply add the keyring code to the application authorization process described here so that you wouldn’t have to cut and paste anything at all. No need to put them directly in your code. You can exchange the name you gave your twitter app, your user name, and the ACCESS and CONSUMER secret keys for the password, and those keys will be safe.
Geektool center text cut off geeklet password#
Using keyring, adding a password or key to the Mac’s keychain is as simple as this line of code: t_password('application name', 'user', 'password'). There is an elegant little python module to do just that: keyring. The simplest way to deal with this on a Mac is to use its built-in keychain. On the security front, it just feels wrong to me to have secret keys lying around in plain text files like an American on vacation in Rio with his wallet hanging out and a $2000 camera around his neck. Actually, I do like that I can be working, and check the most recent tweets in my stream without the temptation to go through several hours of stuff and end up in link distraction wonderland.

But, then again, why bother to check twitter or tweet anything from the command line anyway? Just for fun, of course. Of course, this isn’t a nice gui app, so it’s slightly more complicated than one might be used to.

I’ve tweaked it a bit for better security and to add the ability to reply or retweet something from your feed.
Geektool center text cut off geeklet mac os#
Over the weekend I posted a python script to check one’s timeline, mentions, or post an update from the terminal in Mac OS X.
