Feb
21
2010
Until now, drag and drop and some other things in krunner based launchers (lancelot, kickoff, and maybe SAL?) are based on a small hack – manual detection whether the result is in fact a .desktop file of an application provided by the service runner, and if it is, then we can use it.
So, the first thing I decided to make is some way of allowing serialization of the search results. I decided that the best way is to allow the results to have mime data assigned to them. Naturally, since most of the time you don’t need the mime data, it doesn’t load by default – it is loaded only when requested and only for the specific search result.
That is all for now from T4… I’m sleepy and I can’t really write more…
Jan
29
2010
Another zsh-related post. This one is about defining a function that will allow you to define aliases for directories so that you don’t need to type something like ‘cd /this/is/a/very/long/path/in/the/filesystem’, but only ‘cdb some-alias’ (cdb – Change Directory with Bookmarks)
You can copy the script to your .zshrc, or create a zsh module as described in my previous post
# Module: Change directory with bookmarks
# path: bin/zsh-modules-available/cdbookmarks
function cdb_edit() {
vim ~/.cdbookmarks
}
function cdb() {
NewDir=`egrep "^$1<TAB_KEY>" ~/.cdbookmarks \
| sed 's/^.*<TAB_KEY>//'`;
echo cd $NewDir
cd $NewDir
}
function _cdb() {
reply=(`cat ~/.cdbookmarks | sed 's/<TAB_KEY>.*$//'`);
}
compctl -K _cdb cdb
That’s it. To define the bookmarks, create a file named ~/.cdbookmarks and the bookmarks in the following format:
<alias><TAB_KEY><path>
(no spaces)
Cheerio!
My .zshrc became is too long to maintain it easily. I’ve decided to take the idea behind apache configuration in Debian and to split the .zshrc parts into easily maintainable subscripts. I have no idea if ZSH supports this in some vim-like form of .zsh/plugins, so I did it manually.
Preparation
The first step is to create the following directories
$ mkdir -p ~/bin/zsh-modules-available
$ mkdir -p ~/bin/zsh-modules-enabled
and to make a backup of old .zshrc like this
mv ~/.zshrc ~/.zshrc.backup
Setup
Open the ~/.zshrc file with your favourite editor, and copy the following into it (replacing the old code):
# Lines configured by zsh-newuser-install
source /etc/profile
for file in ~/bin/zsh-modules-enabled/*; do
source $file
done
Splitting up
Now, open .zshrc.backup file we created earlier and split it into modules which you’ll save into ~/bin/zsh-modules-available. You can split it up any way you want. For example, one of the modules could be the following:
# Module: Aliases
# path: bin/zsh-modules-available/aliases
alias :q=exit
alias la='ls -A --color'
alias rm='rm -i'
alias f='find -name '
alias df='df -h'
alias gg='ack-grep'
Enabling modules
The last step is to choose which modules you want enabled, and to specify the order of execution by prefixing the names with a number from 00 to 99.
Go to the ~/bin/zsh-modules-enabled and do the following for the modules you want to enable:
ln -s ../zsh-modules-available/module-name ./xx_module-name
That’s all folks
So, you have a easily maintainable ZSH module system – it is easy to add a new one, to delete an old one, easy to switch them off or on… You could even create functions such as zsh_module_enable/disbable, but I’m too lazy for that. (aka, if you do, please post them in the comments section and I’ll add them to the post.
Cheerio!
Jan
1
2010
For all of you who celebrate anything related to the fact that we are soon to be in have entered the year 2010, have a happy New Year, even happier holidays, and ecstatic life.
This year, the /card/ is rather simplistic (especially when compared to the last year’s), and looks like crap when zoomed out – so, please, click it and open the full resolution one.
Cheerio!

Feb
26
2009
I just wanted to brag about my new blog theme. It was heavily inspired by the new DOT design (made by Philip Tyrer and Nuno Pinheiro), but is done in a bit /different mood/
The second thing is that Identi.ca is now my primary microblogging service which you can see in the box on the right. Twitter will be updated simultaneously because I’ve set Identi.ca to pass the posts to it, so there’s no need for you to follow me on both places (if you’re not already).
Feb
9
2009
Just wanted to share something very irritating that just have happened to me.
01 class SomeClass: public QFrame {
02 Q_OBJECT
03 public:
04 SomeClass(...);
05
06 private:
07 class Private;
08 Private * const d;
09 };
10
12 class SomeClass::Private: public Ui::SomeClassBase {
13 public:
14 Private(SomeClass * parent)
15 : q(parent)
16 {
17 /* ... */
18 }
19
20 const SomeClass q;
21 QBasicTimer timer;
22 };
23
24 SomeClass::SomeClass(QWidget * parent)
25 : QFrame(parent), d(new Private(this))
26 {
27 d->setupUi(this);
28 /* ... */
29 }
Compiled and ran this, and everything just stoped working. The instant I called:
SomeClassi * sc = new SomeClass();
sc->show();
Program just stopped doing anything. (and it took me some time to realize that it is not doing anything, and not only failing to show the widget)
I went on to discover what the problem is – commenting out parts of the code (obviously, the snippet above is not the whole code) to see what is causing the issue, and nothing seemed to be the problem.
Dec
24
2008
Happy New Year to everybody, and happy holidays!
Here is little something I made for the occasion using only Inkscape and Gimp:
Click for the full size:

For the alternative version (text differs) and larger resolution, visit:
http://white-dawn.deviantart.com/art/NY2oo9-107291548
BTW, this is the largest digital artwork I made till this moment – the original resolution is 2700×1500 pixels.
Dec
21
2007
I presume that Planet KDE will soon get overcrowded with holiday greetings, so I’ve decided to post mine a bit earlier. The main reason is that this way I’ll get more attention
.
I wish you all great time with the incoming release of KDE. I also wish that in the first half of 2oo8 KDE 4 receives finished Kickoff replacements (Raptor, Lancelot and TastyMenu) and to become stable enough for everyone to use it.

To Gnome users: I wish you also great time with KDE 4.0.
May
5
2007

I know that this is not KDE related, but I had to post it…
This is the computer on which I started learning to write programs… even before elementary school… and it still works!!!