Thursday, September 27, 2007

Kickoff redux

As Sebas' mentioned recently, I have been working on a new implementation of the Kickoff start menu/application launcher. It is currently functional, although I have not started work on some of the presentational aspects yet (such as the background and tab styling). Hence no screenshots in this post. If you are testing KDE 4 on a system with KDE 3 installed, then in the case of applications for which both KDE 3 and KDE 4 versions are available, only the KDE 4 version will be shown. The search view is currently limited to application searches, but I hope to have Strigi searching working soon. Ideally query handlers will be shared between the launcher and the run dialog.

The new Kickoff can be found in trunk/playground/base/kickoff-rewrite-kde4/ and it currently builds both as a standalone application ('kickoff') and a Plasma applet ('Application Launcher' in the 'Windows and Tasks' category). The Plasma applet is a simple KDE logo button which pops up the menu when clicked on.

Hopefully Kickoff will ship with Beta 3 next week.

This new implementation is being done from scratch using Qt 4 / KDE 4 frameworks. This is the first time I have made any real use of some of the new KDE 4 libraries; they are great to work with and a few little extras have been added as a result. For example, one minor detail I added compared to KDE 3's Kickoff is that in KDE 3, the 'My Computer' tab always has an icon of a tower desktop system. In the new KDE 4 Kickoff the icon will change to a laptop or a tower depending on what kind of system it is being run on - and that is done with a couple of lines of code.

Finally, feedback is always welcome. If you are an OpenSuSE/KDE user who uses the Kickoff menu on a regular basis, feel free to add your thoughts to this post's comments :)

Thursday, September 13, 2007

Funny languages in the terminal

When I look at Arabic, Chinese or Japanese text all I see are some odd squiggles. Some text that used to produce square-looking squiggles in KDE 3 now produces more curvy squiggles in KDE 4. Apparently this is a good thing. Most of this is down to Qt 4. But I still don't know whether it is readable to people who normally see something other than squiggles.

I had a stab at adding input method event support to Konsole in trunk recently, but I am very limited in my ability to test it. There is a bug report to file comments against.

If you can read and write in these languages, or even better, understand the mysterious world of Unicode - please help me to find bugs in Konsole's language support so that I can fix them.

Wednesday, July 11, 2007

Quick updates and Akademy thanks

First, some terminal updates:

  • In the past, terminal programs running in Konsole had no idea about the color scheme being used, although some tried to guess based on the value of the TERM environment variable. I found out that the rxvt terminal sets a COLORFGBG variable which is recognised by Vim and others.
    The upshot of this is that when a color scheme with a dark background is used by Konsole , Vim will automatically pick appropriate colors for syntax highlighting. The same is true for a light background. Thanks to Robert Scott for bringing the problem to my attention.

  • I added a handy "hidden" feature to the color schemes. Per-session random colors. This is commonly used for the background color in a color scheme so that you can tell different sessions apart at a glance - especially when you are working with thumbnails of the terminal. KDE 3 had a random hue feature, but it was random per Konsole process, which is not so useful. I say this feature is hidden because the option is not yet exposed in the GUI and requires manually editing the .colorscheme files. Adding this feature to the UI without cluttering what is currently a nice tidy dialog will require some careful thought.

  • There was much tweaking in response to feedback from other hackers at Akademy. Cheers for the feedback :)

But the main point of this post was to thank everyone, especially the organizers, for a great Akademy. As always, the best part of this kind of conference is the people met, the discussions had and the general feeling of fraternity. KDE 4 itself still needs a lot of work before the final tarballs can be rolled, but I am confident we'll do Konqui proud.

Wednesday, June 13, 2007

Plain English

Everyone has their pet hates. It might be an annoying personal habit, anonymous callers or Paris Hilton. One of mine is the use of geek English in software. Aside from being a barrier to new users, it also undermines an application's status as a high quality piece of software, software that a contributor can be proud of. A few words quite widely seen in KDE circles that I find irritating are "Configure", "Initialize" and "Schema". Configure' and 'Configuration' are bad in particular because:
  • It is a longer and less commonly used word than the shorter alternatives ("Edit","Settings"). This appears to be true of translations into various European languages as well. I have a hypothesis that shorter, more commonly used words are quicker for us to parse when reading user interface elements and enable us to make decisions more rapidly, thereby saving time.

  • It is an unpleasant sounding word. This might sound odd, but I feel that the choice of words or phrases contributes to how polished and attractive an application is.

Obvious suggested replacements:

  • Configure -> Edit, Settings, Preferences

  • Configuration -> Setup, Settings

  • Intialize -> Start, Starting, Loading

As an example, on startup KNetworkManager displays some progress information when connecting to a wireless station. The labels go something like this:

"Activation stage: Preparing device"
"IP configuration started"
"Commit IP configuration"
"Device activated"

Good grief. The only information I really needed to know is:

"Preparing"
"Connecting"
"Connected"

A week or so ago I became sufficiently frustrated that I went and patched the most visible uses of these words out of KDE's libraries and Konqueror's various settings dialogs. Patches as always:

kdelibs patch
konqueror patch

Incidentally, the reason this is being posted here and not initially to the KDE development mailing lists is to inspire users to complain more about the use of overly technical and/or geeky language in their applications.

Saturday, June 2, 2007

konsoleprofile

I added a handy little tool to Konsole recently.

konsoleprofile allows any profile options to be set from the command line. This means that it is possible to change the color scheme, font, tab titles, menu bar mode, scrollback size, icon, key bindings, cursor options and others without resorting to the GUI.

For example, running:

konsoleprofile colors=GreenOnBlack

Inside the shell will change the active tab to use the green-text-on-a-black-background color scheme.

konsoleprofile icon=kde

Will set the icon for the active tab to the KDE icon.

konsoleprofile showmenubar=false

Will hide the menu bar.

The actual parsing of the commands are done inside konsole. konsoleprofile is just a trivial shell script which puts some magic markers around the command so that Konsole interprets it as a profile change request. Aside from simplicity, this has an advantage over the D-COP days of old because it doesn't matter when it is being run locally or on another computer being accessed via SSH. The tool currently affects every tab using the same profile as the current tab, that is clearly not always desirable, but I plan to fix that shortly.

Saturday, May 5, 2007

New Konsole lands & kdegames/edu fun

I have moved the new Konsole front-end back to trunk. It wasn't quite ready for the tagging of the first KDE 4 alpha release, and there are a few notable items still to implement ( eg. key bindings editor, composite transparency ) but if you are building KDE 4 from sources, please test.

The past two weeks saw some handy additions, the most useful of which are probably the live tab titles. This allows tab titles to contain a mixture of normal text and dynamic elements which update as you navigate around directories, run different programs or connect to remote computers in the shell. The tab title defaults to a combination of the last part of the path and the running program name, but can be customised either for a specific terminal session or for a particular profile. You can specify separate formats for local activities and remote activities (ie. SSH), and Konsole will switch between them automatically.

I finally got into sorting out Konsole's profile management as well. In KDE 3 times, these were referred to as "Sessions". A profile is a saved terminal setup which can be used as the basis for new tabs or windows. One of the profiles is set as the default and is used when you start a new Konsole. In KDE 3, some terminal options were global and others could be changed in each "session" - and this distinction was slightly arbitrary. In KDE 4, every setting is handled on a per-Profile basis. In addition to the default profile, there are a number of favorite profiles, for which a menu item is displayed in the file menu which creates a new tab with that profile when clicked. In KDE 3, every "session" type had a menu item, which caused problems for sysadmins who had 30 different types for connections to various machines - so the profiles shown on the File menu can now be specified by marking them with a star in the "Manage Profiles" dialog.
One often-requested feature is the ability to preview color schemes. This is implemented in the color scheme page of the dialog used to edit profiles. As you move the mouse over a color scheme, all open terminal displays using the edited profile will be redrawn in that color scheme. Fonts can also be previewed in a similar fashion.
In addition to profiles, a select number of options can be changed for a particular tab as before - such as character encoding, text size, history options, and in the future color scheme as well. Users who need to change the character encoding should now find it easier as Konsole now uses KDE 4's new character encoding menu which divides the encodings up nicely into groups instead of the loooong list which was there before.

The problem with all these dialogs however is that they require use of the mouse, which is really not the point of a terminal, so next on my list of things to do is the ability to control profile options in a completely keyboard orientated fashion.

In non-Konsole news, I saw the kde.dot complaining about excess frames etc. in kdegames and went round and fixed each of the games. This fit and finish work is really pretty easy, so it makes a great way to contribute to KDE if you have not done so before, even if you know little in the way of C++. Along the way I got round to playing quite a few of the games. They are good fun and look great thanks to the new artwork. I also played around with the latest and greatest in the kdeedu module - some of the applications ( kmplot and kalzium to name two ) have changed quite radically from KDE 3 to 4. So even though there is no new desktop shell to be seen in KDE 4.0, much has happened elsewhere.

Cheers to the kdeedu and kdegames teams :)

Wednesday, April 18, 2007

Easter holiday terminal update

Quite a bit of progress in Konsole over the Easter holiday, summary of the best bits:

  • Began a re-write of the Konsole Part. Under KDE 3.x, the Konsole part and the main application duplicate a lot of code, and much of the functionality in the main application is not available in the part. The goal is to keep the Part and application specific portions of the code much smaller in KDE 4. This should make maintenance easier and also make many/most of Konsole's KDE 4 enhancements and new features available in Kate, KDevelop, Dolphin, Yakuake etc. using the part.

  • Implemented a Yakuake-style 'background mode' for Konsole. This means that a shell session is started in the background, which can be displayed or hidden instantly from anywhere by pressing a global shortcut ( currently hardcoded to F12, but eventually customisable ).

  • Improved the bookmark system. When creating a new bookmark, Konsole now chooses the working directory of the foreground program instead of just using that of the main shell (Useful if you nest shells or are running any interactive program in the shell) If the foreground program is SSH, this saves the current user and host as a special SSH bookmark. Oh, and I added 'Bookmark Tabs as Folders' support.

  • Allow the user to choose which custom sessions are shown in the main menu.

  • Allow the user to split the view left/right ( in addition to top/bottom ) and support as many views open at once as the user wants. Screenshot

  • Began work on the Konsole settings replacement.


So getting closer to merging the branch back into trunk for everyone to play with. I will do that once it is capable of creating new custom sessions and saving / loading the settings of session types.

Thanks also to everyone, all 8000+ of you, who took the time to complete the Konsole survey. Your feedback is much appreciated. I have summarised about 2/3rds of the results ( available here ) so far, and already this week I implemented a number of changes based on the results ( Background mode, SSH bookmarks ). There were many kind words for the developers ( past and present ), always appreciated :)