Wednesday, March 23, 2011

E17 fill direction patch

In order to minimize the use of the mouse as an input method I tend to map as many useful functions to keyboard shortcuts. Want to get rid of a window and dump it on the next desktop to concentrate on something else? Hit Shift+Alt+Right. Want to see what's going on in IRC & instance messaging without walking through the window selector by alt-tabbing? Alt+F4 to jump to the fourth desktop and Alt+F1 to get back to the first. Those are some of my most used shortcuts I tend to set up in every desktop environment.

Because E17 isn't a tiling window manager, a lot of manual window resizing is required. Thus I use to make my life a lot easier by assigning maximization to a function key. E.g. F6 maximizes vertically while F7 maximizes horizontally. I rarely use full maximization (in both directions) because applications like virtual terminals tend to become unreadable, especially line breaks. Full maximization is available by a default shortcut (Alt+Ctrl+f) or by pressing F6 followed by F7. This, however, doesn't yet act anything like a tiling window manager. Normal maximization will ignore other windows and hide or overlap them. That's where the "fill"-mode maximization kicks in. It smartly tries to find a way to enlarge the current window without overlapping others. E17 provides this function with the action "Maximize Mode 'Fill'".

But coming back to the example of the terminal window, I'd like this particular window to keep its horizontal size. I haven't found a way to achieve this with action params in the current revision of E17 and instead dug into the source code to add two new actions: "Maximize Mode 'Fill Vertically'" and "Maximize Mode 'Fill Horizontally'":

--- src/bin/e_actions.c (revision 58033)
+++ src/bin/e_actions.c (working copy)
@@ -2745,6 +2745,10 @@
"window_maximized_toggle", "expand", NULL, 0);
e_action_predef_name_set(N_("Window : State"), N_("Maximize Mode \"Fill\""),
"window_maximized_toggle", "fill", NULL, 0);
+ e_action_predef_name_set(N_("Window : State"), N_("Maximize Mode \"Fill Vertically\""),
+ "window_maximized_toggle", "fill vertical", NULL, 0);
+ e_action_predef_name_set(N_("Window : State"), N_("Maximize Mode \"Fill Horizontally\""),
+ "window_maximized_toggle", "fill horizontal", NULL, 0);

ACT_GO(window_maximized);



It can be downloaded here.

Monday, March 14, 2011

Switching from KDE to E17

Since I switched from Windows XP to KDE at work a while ago, my productivity even as a programmer rose significantly; if I had to do more system administration tasks than I do at the moment, I'd appreciate the new environment even more.

After playing around with plasmoids, akonadi and other new KDE4 features I noticed that all the components and applications seem stable and well integrated. It's awesome to use dolphin to browse local files as well as windows shares, FTP servers and SFTP sessions and use these URLs in every location widget. It's nice how Akonadi resources map remote calendars and allow access to applications like Kontact. By integrating a lot of functionality which had in previous versions been provided by 3rd party projects KDE now looks and feels polished and clean.

Comparing the KDE experience with Windows XP, I'd claim that the consistency level is more or less equal. On the one hand, Linux provides not only Qt/KDE applications and it'll prove difficult to avoid for example Gtk applications like Firefox. This can be partly circumvented by using a Gtk engine which borrows appearance settings, including icon sets, from the current KDE theme. But what about Tk or wxWidgets? Well, it's hardly the job of a desktop shell's team to worry about the integration of competing widget sets and toolkits as long as their own is feature complete. This brings us to the Windows world. Regular Win32 applications might all look the same if they follow the restrictions of the provided toolkit but in reality with most of the applications I find myself working with every day I'm overflowed by a variety of inconsistent user interfaces. This was accurately described in an ars article some time ago. It might not be Microsoft's job to tell 3rd party vendors how to style their user interfaces, but if they fail to have a consistency even across their very own applications they really shouldn't be spreading open source inconsistency FUD in magazine ads.

No matter how well KDE has progressed so far, at the end of the day I logged off my machine without having once started the dolphin file manager, without having searched for files in nepomuk and without having consulted klipper's neat clipboard management. Heck, I didn't even take a peek at the nice plasmoids on my desktop. No doubt, KDE offers a great platform for building desktop distributions with the regular user in mind who uses the mouse frequently enough in order to enjoy its features. But I use the mouse only if an application forces me to - like most aspects of a web browser - and spend the rest of my time in a virtual terminal. As soon as you notice that something isn't necessary, you wish to get rid of it which is when I started to get home sick and switched back to Enlightenment DR17 (E17).

Despite its focus on speed, E17 seems to grow into another desktop shell also providing its own file manager and lots of fancy animations, icons and even a pretty widget set. This mix of eye candy and sleekness positions it right between a bare window manager and a desktop environment like KDE, gnome or Xfce. However, I couldn't care less about speed running it on a modern Core 2 workstation, else I'd use a traditional stacking window manager and would in fact be using openbox or even a tiling window manager.


E17 offers a rich configuration interface, a powerful module API and the right amount of visual effects to aid the understanding of what's going on with your windows. I just need to get used to the new "Everything Launcher". Oh, and I haven't found out how to fill-maximize windows vertically or horizontally which is something I was able to do with enlightenment_remote in E17 three years ago before the switch to dbus calls. I haven't yet found the option to set such a key binding. But more on that in a future post...

Thursday, March 10, 2011

Switching from Windows to Linux at work

I've never really found anything useful to post here since I started working for a huge Swiss company, mainly because I've been forced to use Windows XP 32bit which is as boring as it sounds. Disgusted by the productivity penalty which that operating system's default configuration offered, I've since been on a quest to improve the Windows experience to something remotely bearable.

The journey started with complete desktop shells such as LDE(X), LiteStep and GeoShell which at least looked and behaved nicely. Somehow, I couldn't get used to them, either because they crashed too often or because they didn't integrate too well into the rest of the OS. Later on I stumbled upon a tool from Microsoft PowerToys called "Virtual Desktop Manager", a sledgehammer approach at handling multiple desktops, which is - wait for it - spawning a complete desktop shell for each virtual desktop. This, of course, resulted in running out of memory very soon, not to mention that windows couldn't be moved from one desktop to another or any other sophisticated window management a Linux user would expect.
In the end, I've settled with VirtuaWin, which provided basic window management capabilities without relying on too much fundamental customization of the original desktop shell.
Paired with cygwin, putty, puttycyg, zsh, gvim and grepwin I found myself capable of mastering day to day work in an almost acceptable manner, but not before more than a year of testing and trying passed.

When I then changed the project team and didn't have to use Visual Studio regularly anymore, I noticed that I was using tools that were either available in Linux (like NetBeans) or were in fact imitations or ports of UNIX tools. So, what to do? I wanted a Linux desktop, so why not run it in a virtual machine, full screen it and happily start coding and administrating as I used to originally? Then again, why not just install Linux on the workstation and banish Windows into the virtual machine it belongs? I decided for the latter and went off to bootstrap Gentoo onto a physical partition from Windows by using VMware; this way I could still code and fulfill my job requirement while portage compiled my future operating system from scratch. After two weeks I had enough packages installed and configured in order to make the switch and resume work seamlessly.

In order to avoid messing around with the Windows installation, I decided to install grub on a USB stick and boot the new Gentoo partition from there. If corporate rules will one day forbid the use of Linux on a desktop in our company, getting back to the old system is as easy as removing said USB stick and everything will be back to the way it used to be. Windows won't recognize the Linux partition anyway.

VirtualBox does a great job running Visual Studio in seamless mode, that means I'll just have to see the window itself and not the desktop and can handle it almost like a native application. All it takes to suspend and resume the virtual machine is around 20 seconds. Although there are a couple of tutorials out there which cover the steps to move an existing Windows installation into a virtual machine or even boot a physical installation directly from a virtual machine, I decided I'd start over with a minimal installation. After all, I'd need it only for Visual Studio.



Even though I used to be an Enlightenment evangelist, I decided to stick to KDE 4.6 for now, mainly because I had a lot of catching up to do just to see all the new features and bug fixes since 4.0 was released. Accessing Windows shares via samba is as easy as browsing through them with the KDE file manager or mounting them with CIFS.

This turned out to be a stable solution which provides me with an environment I'm comfortable working in while still fitting into the business landscape of our company. Running a 64bit operating system on a machine equipped with 4Gb of RAM is something I won't wanna miss ever again. Work just got a lot more productive and fun.

Thursday, March 18, 2010

No more updates (for now)

Unfortunately blogger will discontinue its FTP publishing service soon which means there won't be updates to this blog of mine until I can migrate it. No big loss here because I've been slacking big time on posts anyway due to work and increase of distance to the topics.

I plan to get back though, especially to Gentoo and Debian E17 packages. Time will tell. So far, thanks to everyone for the comments and suggestions regarding the Debian repository/E17 as well as the ICC/gcc topic.