summaryrefslogtreecommitdiffstats
path: root/konversation/src/konversation-0.19-tabplacement.pl
blob: 91d95706c580d562c37b3a46d6ee0427bf6a5e45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /usr/bin/perl

use strict;

my $currentGroup = "";
my $key;
my $value;

while (<>)
{
    chomp;
    if ( /^\[/ )
    {
        $currentGroup = $_;
        next;
    }
    ($key, $value) = ($_ =~ /([^=]+)=[ \t]*([^\n]+)/);
    if ($_ =~ /TabPlacement/)
    {
        if ($value eq "0")
        {
            print("# DELETE $currentGroup$key\n");
            print("$key=Top\n");
        }
    }
}