Lookit 0.3 hits Beta

Just the other day, I pushed out the first beta of version 0.3 of my screenshot utility, Lookit. Just a few minutes ago, I pushed out the second.

Lookit is a tool inspired by TinyGrab for quickly uploading and sharing screenshots. This new version brings a couple of new features that the previous version lacked, in particular, compatibility with older, non-compositing window managers, and a selection rectangle to more clearly see the area of the screen that you’re selecting.

Beta 2 includes just a couple bugfixes over beta 1, which are KDE compatibility (at least the beginnings of it, I still need some testers for this) and properly saving and restoring the save directory, if you choose to not delete images after upload.

Posted in Uncategorized | Tagged , , , | Leave a comment

More on the Evo

I’ve now had my new toy for a little over a month. Shortly after my last post, I took the plunge and rooted my Evo and have since been playing with some of the different ROMs that are available for it. For the most part, I’ve been using Fresh Evo, which is currently in version 0.5.3, with a 1.0.0. beta in limited availability. Fresh Evo let me get rid of a large amount of HTC’s Sense UI, which, while pretty, slows the phone done a fair amount. I’ve since moved on to a new, more stock Android ROM (Evo-NonSense), which is almost fully AOSP components, except for the Camera app, which is needed to support the dual cameras. I’ll give Fresh another whirl once 1.0.0 is released.

Posted in Uncategorized | Tagged , , | Leave a comment

HTC EVO 4G

A little over a week ago, I picked up my first Android phone, the EVO 4G on Sprint. For a year before that I was using a Palm Pre, so I thought I’d take some time to do a comparison between the two.

Hardware:

In terms of hardware, the phones couldn’t be much more different. In terms of size, the EVO is considerably larger with a 4.3″ screen rather than the Pre’s 3.1″. Screen resolutions scale appropriately, with the Pre running on 320×480 and the EVO on 480×800. The Palm Pre is a vertical slider with a physical QWERTY keyboard, while the EVO uses a soft keyboard. The Pre has a 3MP camera while the EVO features two: an 8MP camera on the back and a 1.3MP on the front for video calls.

At first I thought the EVO’s massive size would be a problem, but after a day or so of use it felt perfectly natural to hold and fits fine in my pockets. Also on the outside of the device, the EVO features a kickstand, presumably for when watching video, as well as an HDMI port for outputting to a TV, which I have yet to test.

Internally, there’s a lot of difference as well. The Pre runs on a 500MHz TI OMAP processor, where the EVO has a 1GHz Snapdragon CPU. The RAM has doubled as well, from 256MB to 512MB (although due to a software bug, Android 2.1 can only address the first half of that, this is supposedly fixed in 2.2, as well as some custom ROMs). The Pre has 8GB of internal memory, while the EVO has 1GB along with an expandable 8GB via micro SD.

And of course, there’s the Sprint 4G radio in the EVO, but since Louisville isn’t even on the roadmap for that yet, I’ve been unable to test it.

The closest thing I have to a benchmark utility for these phones is Sunspider, so here goes: (single run each, both on WiFi, totally non-scientific, lower is better)

Palm Pre: 30480.0ms

HTV EVO 4G: 13165.8ms

and, for fun:

Dragon (Core i7, Ubuntu, Chromium): 389.2ms

Software

This is what was most appealing to me about the new phone. The Palm Pre ran on Palm’s webOS which, while nice, doesn’t have the same development community that Android does. The EVO is running on Google’s Android operating system, currently the latest (stable!) version, 2.1.

Surprisingly, there were actually a good number of software elements that I miss from the old phone. First up is cardview, the method that Palm uses to handle multitasking which basically puts each app in its own “card” that can be switched between and then tossed off the screen to close. Android, on the other hand, leaves most apps running in the background after close, and instead of cards, a long press of the home key brings up a list of the six most recently used apps (whether they’re still running or not). If you want to access a running app older than that, you’ll have to find it’s icon and launch it that way.

Another oddity in Android is the way apps seem to “stack.” For example, if I’m in the Reddit app and I click on a link, it opens in the web browser. However, if I now hit the “back” key, I’m taken back into the Reddit app. In situations like this, it makes sense, but I’ve run into a couple of cases where I’m taken between apps unexpectedly by the back button. In general, apps don’t seem as contained as they did in webOS.

Another small touch that I miss from webOS is screen rotation. While Android will rotate the screen automatically, it does so instantly with no sort of animation for the transition, where Palm had the screen rotate and expand, which gave it a nice appearance.

Synchronization with web services is just as good if not better than on webOS, especially if those services are run by Google. I was already using Google Voice to manage my voicemail, but now I’m moving towards using it for more, since I have a good level of integration with my phone. I also now have proper support for Google Latitude without having to hack in support as well as a much more full-featured Maps application in general, with Street View and Turn by Turn Navigation.

The amount of available software for Android is one of the big reasons I decided to switch to the platform. Apps that I’ve found without equivalent on webOS include: Dropbox (for accessing my cloud-stored files), Layar (an augmented reality app that for now is more of a toy since I’ve yet to figure out how to use it properly), Mint (frontend to Mint.com, a financial management service), Shazam (for identifying music), and XBMC Remote (lets me browse and control playback for my media PC). Upcoming apps seem to include Audible (I’ve already played with the beta client), Kindle, and Netflix. And that doesn’t even take into account all of the Google services I was unable to use before, like Earth, Goggle, Latitude, Buzz, Sky Map, etc.

Since the Android SDK is based on Java rather than Palm’s Javascript based solution, apps seem to have better control of the hardware, which allows for some of these cooler apps to exist. One of my favorite features is the barcode scanning ability, which allows you to, among other things, install apps from the web by scanning a barcode off your computer screen.

I’ve yet to get into running custom ROMs on my EVO, but I’ve been following the development pretty closely and will probably give one of them a spin in the near future, especially if they can get Froyo working well.

Posted in Uncategorized | Tagged , , , , | 2 Comments

A look at Lookit 0.3

Well, maybe “look” isn’t quite the right word, there’s not a lot of GUI to look at. However, I’ve spent a large portion of the day figuring out how to get around two of the more annoying issues in the current version, specifically, non-compositing window manager support and drawing the selection rectangle.

The new solution involves grabbing the mouse directly rather than letting the input be grabbed by an invisible window. That alone improves the application dramatically by allowing it to run without a compositing manager. With some luck, this will help with multimon support as well. Drawing the rectangle requires some lower level code, though, specifically using Xlib instead of GDK.

If there’s anything that you want to see implemented in the next release, make sure it’s mentioned on the Bug Tracker.

Posted in Uncategorized | Tagged , , , | 4 Comments

New Look

Don’t worry, you’re in the right place! Unless of course, you weren’t trying to find this blog, in which case you’re in the wrong place. I’m tinkering with the layout looking for something cleaner.

Posted in Uncategorized | Tagged | Leave a comment

Lookit 0.2 Released

It’s a new project, and I’m moving fast. I just pushed Lookit 0.2 to bzr as well as the Lookit PPA. Changes include support for Imgur as an upload option, a warning when using a non-compositing window manager, Ubuntu Mono icons, and a few minor bugfixes. As always, *please* report any bugs to http://bugs.launchpad.net/lookit.

Posted in Uncategorized | Tagged , , | 6 Comments

Lookit 0.1 Released

After around two weeks of coding in my freetime, I yesterday uploaded the first public release of my screenshot utility, Lookit. Unlike my bash script, this version has a proper GUI and no longer relies on external utilities like scrot and xclip. Instead, everything is done in native Python.

Details and Ubuntu 10.04 packages can be found on the project’s page on Launchpad: http://launchpad.net/lookit.

Posted in Uncategorized | Tagged , , | 6 Comments

Building a GUI for my screenshot uploader

Today’s project goes back to what I was working on a couple of days ago with my screenshot upload script. I’ve been building a GUI with PyGTK to manage connections to the server that hosts the screenshots. I made a lot of progress today, learning to use the new GtkBuilder libraries and also the AppIndicator framework in Ubuntu 10.04. I’m hoping to have something out in the next couple of days.

Posted in Uncategorized | Leave a comment

Generating Gnome Rotating Backgrounds

The version of Gnome in Ubuntu 10.04 has the ability to automatically change through a defined set of files. Unfortunately, there’s no simple way to do this via the gui (I originally assumed that you just assigned a folder to be your background) so I whipped up a quick Python script. This could probably have been done in bash, but I took the lazy way out. I’m also sure I could have used some existing XML library, but the file is fairly simple, so I just used file.write(). If any glaring errors are pointed out, or if I feel like implementing XML properly, I’m sure I’ll post a revised version sometime soon, but for now, here’s the program:

Here’s a link to the source, in case WordPress fubars Python’s indentation.

#!/usr/bin/python

import os, os.path, sys, optparse

IMG_FILETYPES = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.svg']

def gen_bg_xml(directory, duration=1795.0, transition=5.0):
    if not os.path.isdir(directory):
        print “Error: {0} is not a valid directory”.format(directory)
        sys.exit(2)

    xmlfile = os.path.join(directory, “background.xml”)
    xml = open(xmlfile, mode=’w')

    xml.write(“<background>\n”)
    xml.write(“  <starttime>\n”)
    xml.write(“    <year>2010</year>\n”)
    xml.write(“    <month>01</month>\n”)
    xml.write(“    <day>01</day>\n”)
    xml.write(“    <hour>00</hour>\n”)
    xml.write(“    <minute>00</minute>\n”)
    xml.write(“    <second>00</second>\n”)
    xml.write(“  </starttime>\n”)

    files = os.listdir(directory)
    l = files[:] # Copy the list so we have something to iterate through
    for f in l:
        name, ext = os.path.splitext(f)
        if not ext in IMG_FILETYPES:
            files.remove(f)
            continue

    for f in files:
        absf = os.path.join(directory, f)
        if not files.index(f) == 0:
            xml.write(“    <to>{0}</to>\n”.format(absf))
            xml.write(“  </transition>\n”)
        xml.write(“  <static>\n”)
        xml.write(“    <duration>{0}</duration>\n”.format(duration))
        xml.write(“    <file>{0}</file>\n”.format(absf))
        xml.write(“  </static>\n”)
        xml.write(“  <transition>\n”)
        xml.write(“    <duration>{0}</duration>\n”.format(transition))
        xml.write(“    <from>{0}</from>\n”.format(absf))
        if files.index(f) == len(files) – 1:
            xml.write(“    <to>{0}</to>\n”.format(
                      os.path.join(directory, files[0])))
            xml.write(“  </transition>\n”)
    xml.write(“</background>”)
    xml.flush()
    xml.close()

if __name__==”__main__”:
    p = optparse.OptionParser(usage=”usage: %prog [options] directory”)
    p.add_option(‘–duration’, ‘-d’, default=”1795.0″)
    p.add_option(‘–transition’, ‘-t’, default=”5.0″)
    options, arguments = p.parse_args()
    if not len(arguments) == 1:
        p.error(“incorrect number of arguments”)
    sys.exit(1)
    gen_bg_xml(arguments[0], options.duration, options.transition)

Whew, escaping all those tabs was annoying.

Posted in Uncategorized | Tagged , , , , | 3 Comments

Fast screenshot sharing in Linux, Part 2

So, thanks to a post on twitter, I’ve found a better way to snag screenshots by using scrot instead of compiz. This doesn’t give the graphical corruption that imagemagick does while compiz is running, and has the added bonus a being able to single-click a window to grab the entire window quickly.

So, here’s my revised source:

#!/bin/bash

user=
server=
destdir=
httpstr=

filename=`scrot -s -b -e ‘echo $f’`

md5=`md5sum $filename`
if [ "$?" -ne 0 ]; then
    notify-send “Error” “Could not generate md5sum” -i error
    exit
fi

md5=${md5/ */}

scp $filename “$user@$server:$destdir${md5}.png”
if [ "$?" -ne 0 ]; then
    notify-send “Error” “Failed upload” -i error
    exit
fi

longurl=$httpstr$md5.png

shorturl=`wget http://is.gd/api.php?longurl=$longurl -O-`
if [ "$?" -ne 0 ]; then
    notify-send “Error” “Failed to shorten URL” -i error
    $shorturl=$longurl
fi

echo $shorturl | xclip -selection clipboard

notify-send “Upload Complete” $shorturl

rm $filename

Save it and bind the script to a hotkey and you should be good to go.

See the original post for the rest of the setup.

Posted in Uncategorized | Tagged , , , , | Leave a comment