Pages

2012-01-26

How-To: Make KDE Like Unity

I was going to do a review of PC-BSD, but unfortunately, that didn't work out (more on that later), so I'm doing this instead, though I had planned this for next week.

Vanilla KDE

Many months ago, I did a post on how to make KDE look more like Elementary OS. It was just one way of showcasing KDE's power and customizability. Now, I'm doing the same with regard to the Unity UI present in recent versions of Ubuntu. I know that a lot of people online have expressed displeasure with Unity along with the intention to use KDE instead. But what if you like the Unity UI but want the other features of KDE as well? Then this article is for you.

If you are using Kubuntu, this post is technically moot, because it is possible to use all of Unity 2D under KDE in Kubuntu without any issues; that is because Unity 2D is made with the Qt libraries, which also underlie KDE, so there's some compatibility there as far as I can tell. If you aren't using anything Ubuntu-based, though, then you're out of luck in terms of trying to use Unity 2D, so this is for you. I did this using a Chakra 2011.12 "Edn" live USB, so all my instructions will be based on that. If you are using another distribution, you may have to search online to see how some steps are done. Follow the jump to do it.

If you are using a distribution like Chakra that makes few modifications to the KDE UI, you probably first see a desktop containing one panel that contains, from left to right, a Kickoff menu button, a button to launch KDE Activities, a window switcher, a system tray, and a clock. The first thing I did was move this panel to the top: I clicked the "cashew" on the panel, clicked "Screen Edge", and dragged the panel to the top of the screen.

The next thing I did was created a new panel. I did this by right-clicking on empty space in the panel and clicking "Add Panel" in the "Panel Options" category. I then moved that panel to the left side of the screen in a manner similar to how it was done before. I then shrunk the panel (which was now vertically oriented on the left side of the screen) to lie entirely beneath the top panel by clicking that panel's "cashew" and adjusting the sliders with arrows on them until there was no overlap and minimal gap. Furthermore, I made the panel a little wider by clicking and dragging the "Width" button.

Panels Moved & Added

At this point it was time to add, remove, and move some Plasma widgets from the panels. I clicked on the top panel's "cashew" and dragged the window switcher (which is Icon Tasks like a dock by default in Chakra, which is the type that is desired -- you may need to install and add this widget in your distribution of choice) to the left-side panel. This made that left-side panel act much more like a dock. I removed the main menu button and KDE Activities button by clicking their respective close buttons when clicking on the top panel's "cashew". At this point, the top panel only had its system tray and clock left, while the left panel had just the dock in the form of the Icon Tasks Plasma widget.

Here, I needed to get some more stuff. I was able to go to AppSet-Qt, which is Chakra's GUI package manager, to get the window menubar and Takeoff widgets. The window menubar widget integrates the window's menubar into the panel, much like what Apple's Mac OS X and Ubuntu's Unity do. The Takeoff widget is inspired by the Launchpad application launcher in Apple's Mac OS X, which was itself inspired by the Slingshot application launcher first seen in Elementary OS. I figured the Takeoff widget would be a better approximation of the Unity Dash than the standard Kickoff menu. After installing these, I added the Takeoff widget to the left-side panel by clicking its "cashew", clicking "Add Widgets", and clicking and dragging the Takeoff widget until its space on the panel appeared above that of the Icon Tasks window switcher. I added the window menubar to the top panel through similar means, and I positioned it to the far left of the top panel, left of the system tray.

With Icon Tasks + Takeoff + Window Menubar

There was more to be done. I wanted to see launchers for common applications present on the left-side panel through the Icon Tasks widget. I opened up a bunch of applications, like Rekonq, LibreOffice, and others, and when they were open, I right-clicked their icons on the left-side panel and clicked "Show A Launcher When Not Running". I then repositioned these to give the following layout below the Takeoff widget button, from top to bottom: Dolphin, Rekonq, Gwenview, Bangarang, LibreOffice Writer, LibreOffice Calc, LibreOffice Impress, and AppSet-Qt. I was hoping this would as much as possible emulate the layout present in Ubuntu 11.10 "Oneiric Ocelot".

By this point, I was pretty close to being finished. I did a few more things to touch up the look and feel. I changed the Desktop Activity from being "Desktop" to "Folder View" by right-clicking on the desktop, clicking "Desktop Settings", and changing the layout from "Desktop" to "Folder View" using the drop-down menu. I also added, below the Icon Tasks widget on the left-side panel, Pager and Trash widgets, just like in Unity. At this point, the left-side panel contained, from top to bottom, the Takeoff widget button, the Icon Tasks widget containing launchers for favorite applications, a workspace switcher (Pager), and a trash shortcut. I also added the Lock/Logout widget to the far right of the top panel, so that it would be to the right of the clock (which was previously the rightmost widget on that panel). In addition, I made the left-side panel autohide like the Unity dock by clicking its "cashew", clicking on "More Settings", and clicking "Auto-hide".

In the meantime, I opened the KDE System Settings program, clicked "Workspace Appearance", and clicked on the button labeled "Configure Buttons" to move the window buttons to the left side of the titlebar. After clicking that button, I simply clicked and dragged the symbolic representations of the window titlebar elements into the desired order, clicked "OK" on that window, and then clicked "Apply" on the larger window.

There were just two more things left for me to do. One of the distinguishing features of Unity is how maximized windows blend their titlebars and window controls with the top panel.
To blend the titlebars, I found this trick online. I went into the home folder in Dolphin, asked it to show hidden files, went into the directory tree ".kde4/share/config", and opened the file "kwinrc" in Kate. I changed the line "BorderlessMaximizedWindows=false" to "BorderlessMaximizedWindows=true". The only issue is that the light-gray window colors clash with the almost-black panel colors, but that's OK.

KDE as Unity

To blend the window controls, I thought I would need to download and compile something like the "KWin Button Applet" from KDE-Look to achieve that effect, but then I realized the KDE Plasma Netbook UI includes that functionality by default. I clicked the top panel's "cashew", clicked "Add Widgets", and added "Current Application Control" to the far left, such that it would be left of the menubar. Unfortunately, the functionality isn't quite a replica, in that there's no button to minimize the window, so one would first need to restore a maximized window (that is going to be missing its titlebar when maximized) before one can minimize it. Furthermore, the buttons to close and maximize/restore windows are present in the panel even when the window is not maximized; this is not true in Unity. Also, the "Current Application Control" widget doesn't fully respect the window button placement specified in the KDE System Settings program (in that while the window buttons were in the correct order in that the close button was to the left of the maximize/restore button, both buttons were to the right of the name of the application). Plus, the button itself looks a little big and out of place. Finally, there is no way to grab parts of the panel to drag a maximized window out of its maximized state.

But that's all OK. At the end of it, I had a top panel containing, from left to right, window controls, the window menubar, a system tray, a clock, and buttons to leave the session. I also had a side panel set to autohide containing, from top to bottom, a Takeoff widget, an Icon Tasks widget to switch windows (replete with shortcuts), a workspace switcher, and a shortcut to the trash folder. Sure there were more things I could have done. For example, I could have installed and used the Ambiance and Humanity themes for KDE rather than the default Oxygen themes, but I figured with things like the "Current Application Control" widget, I should stick to the default themes. Regardless of that, though, I was pretty pleased with how this all turned out. And now those of you KDE users on other distributions envious of Unity but still in love with KDE know what to do. In the end, the fact that KDE is one of the most customizable and powerful DEs out there is still true, and this was just another way of showcasing that. I hope this helped!

Also, at the beginning, I mentioned this was originally going to be a review of PC-BSD. The story is pretty short: X.Org refused to recognize my monitor, though sound and other things worked because I was able to hear the KDE 4 login sound. I didn't want to write a non-review for a review, so until I can dig around a bit more than I did to figure out what the solution is, I'm going to withhold judgment about PC-BSD.

I did this a couple of months ago on openSUSE and Debian. The CTRL+ALT+ arrow keys is in the convoluted UI somewhere, I just don't remember where. I have also have gotten the super key to launch Kicker, I believe I added something to .xinit. Google is your friend, er maybe not. :)

As to the fellow that replied why, 'cause he wants to. What kind of a stupid question is that? ROFL

@decentralist.wordpress.com: You're right about the first part. The 'Super' key is always considered a modifier (not just by KDE, but by GNOME and possibly other DEs as well), so it can almost never be used by itself as a command. The second part can be fixed; go into the KDE System Settings program, configure the workspace behavior, and set the keyboard shortcuts for changing workspaces to whatever you like. I too try to set the workspace shortcuts to 'CTRL+ALT+[Arrow]' whenever I use KDE for a while.

@Anonymous: Why not? I would never do this for my own personal use, but I thought it would be kind of cool to show.

@DarkDuck: Hehheh. (I should say though that although I wouldn't use the Unity UI because it's too inflexible for my preferred workflow, I think it is extremely polished based on what it is like in Ubuntu 11.10 "Oneiric Ocelot".) I just thought it would be interesting for people to know that it can be done, regardless of whether people would actually want to do it. Thanks for the comment!

@maroony: Wow, you've done an even better job than I did! I think it would be even better if (by chance if you have a blog of your own) you could write up how you did that. I wanted to use the "KWin Button" applet, but for some reason it wouldn't compile and install correctly on Chakra, so I settled for the preexisting applet that is used in the KDE Plasma Netbook UI. Thanks for the comment!

Umm.. shouldn't the config files in /.kde/share/config, instead of .kde4/share/config as described in paragraph 11, sentence 5 (above)?? at least in 4.10.0 it is for me... maybe earlier copies put them in there? Also, didn't see any BorderlessMaximizedWindows=false in the kwinrc files (and not any of them when grep "Borderless" -d recurse under the .kde folder in home) I didn't do a system-wide search yet i'd imagine it should be in netbook, maybe its not put there automatically unless you switch between the two? (and can anyone confirm or disprove this? im curious to know)

@osirisgothra: Everything that I wrote was true at the time of my writing that. Things may certainly have changed with KDE 4.10, so you may want to experiment a little to see what modifications in my instructions are needed now. I think people might actually like an updated version of this for that reason. Thanks for the comment!