Wallpaper Cycles in GNOME

GNOME has supported wallpaper cycles for a while now. I know that Ubuntu includes several of them in the default install. (Check them out; there's a Space image cycle, and a cycle for winners of a wallpaper contest.) However, if you want to make your own cycle, then you're SOL, cause there is no official GNOME editor for these wallpaper rotations. So I wrote a simple utility to make them:

#!/usr/bin/env python

import os, sys, datetime, random

# Configuration:
extensions = [ "jpg", "jpeg", "bmp", "gif", "png" ]
period = 5 * 60 # 5 minutes
transition = 5 # 5 seconds
starttime = datetime.datetime.today()
randomize = True


# Verify that we were given a filename:
if len(sys.argv) != 2:
print >>sys.stderr, "Please provide a destination filename."
exit(1)

# Select all images in the current directory:
imgs = filter(lambda x: x.split(".")[-1].lower() in extensions, os.listdir("."))

# Now, get all of their absolute paths:
imgs = map(os.path.abspath, imgs)

# Shuffle if needed:
if randomize: random.shuffle(imgs)

# Functions for writing the XML document:
def write_static(f, path):
global period
f.writelines([
"\t<static>\n",
"\t\t<duration>%d</duration>\n" % period,
"\t\t<file>%s</file>\n" % path,
"\t</static>\n"])

def write_transition(f, start, end):
global transition
f.writelines([
"\t<transition>\n",
"\t\t<duration>%d</duration>\n" % transition,
"\t\t<from>%s</from>\n" % start,
"\t\t<to>%s</to>\n" % end,
"\t</transition>\n"])

def write_header(f):
global starttime
f.writelines([
"<background>\n",
"\t<starttime>\n",
"\t\t<year>%d</year>\n" % starttime.year,
"\t\t<month>%d</month>\n" % starttime.month,
"\t\t<day>%d</day>\n" % starttime.day,
"\t\t<hour>%d</hour>\n" % starttime.hour,
"\t\t<minute>%d</minute>\n" % starttime.minute,
"\t\t<second>%d</second>\n" % starttime.second,
"\t</starttime>\n"])

def write_footer(f):
f.writelines(["</background>\n"])

# Open the file for writing:
f = open(sys.argv[1], "wb")

# Write the XML files:
write_header(f)
for i in xrange(len(imgs)):
write_static(f, imgs[i])
write_transition(f, imgs[i], imgs[i+1 if (i+1)!=len(imgs) else 0])
write_footer(f)

# Done!
f.close()

Usage:

./gen_wallpaper.py output.xml

The script will detect all images in the current directory, shuffle them, and write them into the output xml. You can then open that xml file in the background selection dialog (get the file dialog to show 'All Files') and your background will cycle through all of those pictures.

Have fun! I know this script has been pretty dang useful for me. :)

Gnome-Shell, Again

Well, it's been ages since I've looked at gnome-shell. This is probably since I really didn't like what I saw that first time. Gnome-shell was so slow, so heavy, took up so much of the screen, was so distracting, was so buggy, and so through-and-through awful that I decided to swear off of Gnome if they tried to make me use it. Well, the gnome-shell group has made progress since then, and most of it is for the better.

Firstly, most of the animations are gone. What's left ranges from slick (the search box's glow effect) to minorly ugly (the choppy zoom effect). Still, the animation set is a lot better, and that's a VERY good thing.

Secondly, even though the window manager is still WRITTEN IN JAVASCRIPT, it is slightly more responsive. It still lags my computer when dragging a window (which should be considered a deadly sin, right next to using Javascript to program a WM) but it lags... less... which is... good?

Also, the method for adding new desktops has changed. This is probably the best thing they've done, since the new layout gives more room to the current desktop. This makes it so that not only is it easier to see/manage the windows, but the zoom-out effect made whenever opening the "Activities" tab is less jarring. That said, I'd still rather not have the whole thing, and just have a simple desktop with a menu... but I guess that's just me...

Gnome-shell still has bugs, oh man does it have bugs. 4 minutes into testing it, I clicked the 'Recent Documents' tab, and gnome-shell crashed so spectacularly that I had to do a 'pkill -9 -u myers' in another session to get myself out of it. That was fun. :X

So, long story short, gnome-shell is getting better. I still don't want to use it, but at least it's less offensive than the earlier version that I used...

Now to get back to my programming, and I promise that my next post will be more substantive, and not some cheap review of a pointless shell. ;)

gcalctool is Awesome

gcalctool is the official calculator of the Gnome desktop, and its achievements are often overlooked when compared to the gnome-shells, or the zeitgeits, or many of the other ambitious projects emerging with Gnome 3. However, gcalctool is a really powerful utility, and it has many new things coming out that you may like to know about:

gcalctool converting some units

  • First of all, gcalctool just got a new terminal mode, so you can access its functionality from the command-line by typing 'gcalccmd'.
  • Secondly, it now has support for arbitrary variable names, so you can now do "length=200" instead of using the STO button to store the number 200 to R0 or something. Plus, by pressing alt and a number, you can add subscripts to a variable, so you can have variables named x2 and such.
  • Also, you can convert numbers from one unit to another. (For example, saying "123 cm in miles" gives ".000764287") Plus, they made it so that you can convert between different currencies, and the calculator will check with the European central bank to make sure its conversion rates are valid.
  • They've just finished rewriting the documentation in Mallard. (A new help markup system for Gnome.) Take a look at it. It looks pretty nice. :) http://library.gnome.org/users/gcalctool/5.29/

Cool stuff. I'm glad to see that every bit of Gnome is preparing for version 3.0. Let's just hope that the awesomeness of a bunch of projects doesn't get overshadowed by the epic fail that is gnome-shell... Well, at least they say that the original panel-based interface of the Gnome 2.x series will still be available in 3.x...

gnome-shell

I'm currently trying out the new gnome-shell thing, because supposedly it will become the default in Gnome 3.0, and I was wanting to get to know it before it gets jammed down my throat.

Gnome-Shell screenshot

Things I like:

  • The new method of handling workspaces is pretty cool. When you are in the dock, (I don't know if it's called the "dock", but that's what I'm calling it) if you need another workspace, you click the '+', and you immediately get another. If you are no longer using a workspace, you click the "-" on an empty one, and it goes away. It's simple, yet reasonably functional.
  • Programs can be clicked-and-dragged from one workspace to another, and it is done in a nice, graphical way.
  • I like the prevalence of the search function, and it's reasonably fast.

Things I don't like:

  • They only give you one panel at the top, and you aren't allowed to change it. That's just crap.
  • Gnome-shell is too active. Opening the program list will zoom the desktop out so you can see every workspace at once, and it will then reorganise all of your windows so they are all immediately visible. Well, that's great, but I really only wanted to look at the list of programs.
  • Gnome-shell is slow. Like, real slow. It causes my computer to lag, just by dragging a window around, and I have a pretty good processor, and the latest graphics drivers.... not that I should need either in order to get a responsive environment. Also, there is a 1/4 second delay between clicking the "Activities" button to open the dock, and the dock actually opening. Plus, all the animations are really slow. Look, the whole gobject-introspection concept is cool, but just because you can write a window manager in Javascript, doesn't mean you should.
  • Everything in gnome-shell is too over-the-top. I like the search feature, but I don't like how it incurs that jarring zoom-out thing. I like that desktop reordering feature, but it has loads of unnecessary animations, and uses up the entire screen. Isn't there a more minimalist way of introducing those features to the already-existing Gnome environment?
  • Too much emphasis on "Recently Documents". IMHO, there's no good use for the "Recent Documents" list in the window manager. If I'm editing an essay, or coding up something, that's only going to involve 1 or 2 files, and those will be in the "Recent Documents" list in the relevant application. Having all recent documents from all programs aggregated in a central list is just confusing, and pointless.
  • When you are zoomed-out in the dock, you can't click those icons in the upper-right-hand corner. That should be a simple fix, but I thought I'd put it in here.

Conclusion:

The list of things I don't like could go on. Seriously, any positive features of this environment could be easily integrated into the already existing environment, and it wouldn't have been as visually jarring. Everything about gnome-shell defies the common-sense rule of UI design that tells you to stay out of the user's way. Instead, gnome-shell seems to be happy with getting in your face, making its presence known, and slowing everything down in the process.

Ultimately, I think the developers are trying to optimise the wrong things with gnome-shell. Very little time is spent reorganising programs on your desktop, but the gnome-shell developers are going through so much effort to revolutionise the way you can drag programs amongst the workspaces. Well, that's all well-and-good, but your solution is way too in-your-face given it's ultimately minimal role. Plus, in exchange for these questionable advantages, you lose all kinds of functionality and customisability within the Gnome desktop. Maybe the developers should stop reinventing Gnome's interface around an activity that shouldn't take more than a couple of seconds, and they should address the fact that the Gnome panel still can't embed a freaking RSS feed.

The more I think of it, the more I hate it, so I'll just end with this: Gnome-Panel better be off by default. If it isn't, I'm switching to Xfce.

 1

About

User