Skip to content

Xmonad on Ubuntu 11.10 Oneiric with Unity 2D

Xmonad is the best window manager I’ve ever tried, so I felt very uncomfortable updating Ubuntu to 11.04. Gnome2 worked great for me, but when community says it’s time to move on, it’s time to move on.

The first thing after update was setting up xmonad. I followed this great tutorial and everything went smooth. Except for the fact that Unity 2d did’t work all that well with Xmonad.

So I replaced Unity launcher with Gnome do and continued with my day to day work. It bothered me a bit, but hey, we can’t have everything.

Here is the interesting part of the story. After s few months I decided that this isn’t good enough, so I checked out Unity 2D source and fixed the parts that bothered me(hip hip hooray for open source!!).

Please can check out and test my fork from the github repository.

Change list:

  • Xmonad workspace indicator!
  • Display application name and window title in panel
  • Move launcher under panel so it doesn’t cover it
  • Made spread (application and workspace switcher) useful in Xmonad (always display list of applications from every screens, never display list of workspaces)
  • Removed animations and fancy background from spread.
  • Load panel only on the primary screen
  • Don’t filter apps in lagacy tray (had problems with Skype)

Go to installation instructions

If you have any troubles, feature requests or bug reports, please contact me(hamax on freenode) or post a comment. I’ll try to patch the code with new Unity updates, but I can’t make any promises.

Enhanced by Zemanta

Posted in digital world.

Tagged with , , .

How to automatically set display resolution with Nvidia graphic card on Linux


Image via Wikipedia

Nvidia‘s Linux drivers are quite nice but they’re missing one very handy feature.

You can setup your configuration every time you boot the machine with a handy gui tool or you can store the config to the xorg.conf file and boot to the same configuration every time.

This is fine for desktops but it fails for laptops. Especially if you are using different configurations of external displays at home and at the office. In that case you’d probably like to have multiple configurations that would load automatically depending on the devices that are connected to the machine.

And I finally found the tool that enables me to do that(with a bit of bash scripting on the side). It’s called disper.
Disper enables you to set display configuration in the command line which is very handy for writing scripts.

Tux, the Linux penguin

Image via Wikipedia

So I wrote a script that allows you to save and load configuration very easily. Once you setup the displays in nvidia-settings you can simply run the script with the command “set_display save” and it will save the current configuration for you current display setup. You can also run ”set_display save home” and it will save the configuration as “home”.

When you’ll boot the machine next time, you’ll be able to run “set_display load” and it will load the appropriate configuration for you current setup(if it exists) or you can run “set_display load home” and it will load the configuration you saved as “home”. Handy, right? :)

Step by step setup:

  • Download and install disper
  • Download and extract my set display script
  • Link the script to your path (to /usr/bin for example)
  • Setup the displays using nvidia-settings
  • run “set_display save”
  • reboot and run “set_display load”
  • Add “set_display load” to autorun
  • Profit :)
This will probably work on any graphic card that is supported by the disper. But I didn’t test it so try it at your own risk(the second goes for nvidia cars as well :) ).
If you’ll encounter any problems or if you have any questions, please don’t be shy to ask.
Enhanced by Zemanta

Posted in digital world.

Tagged with , .

Pong3D for iOS

Pong3DDuring my game development course I created a simple 3D pong game for iPhone and iPad.
All coding  is done with XNI game framework for objective c.

Currently it’s in alpha development stage so bugs and nasty glitches should be expe


Pong3D for iOS

Enhanced by Zemanta

Posted in digital world.

Tagged with , , , , , , .

Leakspin Sauce – user friendly Wikileaks browser

Logo used by Wikileaks

Image via Wikipedia

Wikileaks is great right, but their web archive is a bit to boring and confusing for averagely interested user like me.
This is the main reason I hacked together leakspin sauce.

It has pictures, tag search, links, related articles and more so you can choose the area of your interest(tag) and click trough related documents until you find something relay interesting. When this happens, don’t forget to go to operation leakspin, write a summary and post in in their quality control center.

Let’s work together for the freedom of information!

Leakspin sauce is filtered and preprocessed wikileaks data with some nice html and javascript over it. All tags and links are provided by zemanta(thanks).

Source code is hosted by github so you can use it for creating mirrors, or you can browse it online.

TODO: Better search, filter by date, document’s potential, …

Questions, suggestion, feedback?

Please share it and like it(if you do like it of course) :P

We are Anony… shit, this won’t work here :)

Enhanced by Zemanta

Posted in digital world.

Tagged with , , .

jTrans – Google Translator Live Bookmarklet

Did you ever want to translate ajax websites or session dependent pages but copy pasting text was too hard? Here is the solution.

Drag the jTrans image below to your bookmarks, go to a non English website and click the bookmark. Page should be translated in a few seconds.


Drag this image to bookmarks


  • Some method of  choosing different target language
  • Translating alt and title attributes

Known bugs:

  • Translating buttons doesn’t work in Firefox
  • Lame function for parsing special characters

Bug reports and suggestions are much appreciated. Source code can be found here.

PS. First paragraph was inspired by Billy Mays.

Enhanced by Zemanta

Posted in digital world.

Tagged with , , , , , .

The Big Bang Theory Simple Simulation

If you want to learn anything about the big bang theory, talk to the scientist. But if you want to have some fun, you can try my simple program.

Here’s how it works: It starts starts the “explosion” and than engages gravity(which is just a theory btw).
In each step the program calculates gravitational acceleration for every object in the “universe” so don’t be surprised if you computer is having a hard time dealing with it(suggestions for optimization are much appreciated).

For running the program you’ll need java 1.6 installed on your computer. If simple double click won’t work, you can try run it with the command “java -jar filename.jar” from the console(if it still wont work, you can try building it from the source or post a comment).
If you want to adjust the settings use number keys or arrow keys for moving around.

Download new optimized version: runnable file 0.1b or source code 0.1b

(Older version: runnable file 0.1a or source 0.1a.)

Are you ready for some fine-tuning? ;)

Reblog this post [with Zemanta]

Posted in digital world, science world.

Tagged with , , , , .

The Fastest and the Slowest Programming Language

What can you do when you are to tired to do anything useful but the level of caffeine in your blood is to high for sleeping?

Watching a TV could be a good choice, but who could resist writing a simple Fibonacci recursion in every programming language that you could think of and measuring the calculation time? I couldn’t.

So here are the results of my very scientific study for Fibonacci 33

  1. c
    gcc4.4.1            0.153s
  2. go
    8g                       0.189s
  3. java
    1.6.0_15           0.267s
  4. scala
    2.7.5                  0.324s
  5. javascript
    node.js V8        0.346s
  6. haskell
    ghc6.10.4         1.675s
  7. lisp
    clisp2.44.1       1.888s
  8. ruby
    1.8:                     22.614s
    1.91:                   2.757s
  9. python
    2.6.4:                 4.401s
    3.1.1:                  5.545s
    cxfreeze4.0.1   5.704s
  10. php
    5.2.10                10.341s
  11. prolog
    sicstus4.0.2    >10m (didn’t have patience to wait)
    swi5.6.64        Out of local stack

I have some more ideas, but caffeine level is dropping fast.

Posted in digital world, science world.

Tagged with , , , , , , , , , , .


My new web application[temporarily offline] for drawing simple images and sharing them with others.


Spread the word :D

Posted in digital world.

WordPress Plugin – Hand Draw

HamsWorld is presenting alpha version of new WordPress plugin called Hand Draw. For now it’s quite basic, but I’m planing to add colors, pen thickness, fill tool, resizable panel etc.



  • WordPress 2.8 (It may work on 2.7 too).
  • PHP 5 with gd plugin.


  • Extract HandDraw to your plugins directory.
  • Load your plugins page from the WordPress admin section and click “Activate” to enable the Hand Draw plugin.
  • Make sure upload folder is set and writable.


  • Go to post editor (add new post or edit post).
  • Click on “pen” icon in “Upload/Insert” menu.
  • Draw image, click “Create image” and if you like it, click on “Add to post”.
  • If you want to clear panel, double click on it.
  • Save your post and …

Enhanced by Zemanta

Posted in digital world.

Tagged with , , .

ENZ – My Own Zemanta

Image representing Zemanta as depicted in Crun...
Image via CrunchBase

What is Zemanta?

Zemanta is a revolutionary new platform for accelerating on-line content production for any web user. Any user-created text (a blog post, article or web page) is directly “read” by Zemanta, which recognizes all contextual content. Zemanta then combs the web for the most relevant images, smart links, keywords and text, instantly serving these results to the user to enrich and inform their content. What’s more, Zemanta can be deployed on all major content publishing platforms and web browsers through a simple plug-in.

ENZ is very similar. It reads content, tries to find interesting keywords then suggests links and images. It has no smart technology behind, only google parser. Is it better then zemanta? No. But it is quite good for one person’s hobby project.

For now ENZ is only demo, but I’m planing to make a WordPress plugin.

You can try it out, or download source code.

Enhanced by Zemanta

Posted in digital world, science world.

Tagged with , , , .