[prev in list] [next in list] [prev in thread] [next in thread] 

List:       enlightenment-users
Subject:    Re: [e-users] e16 themes: border configuration
From:       James Bowlin <bowlin () mindspring ! com>
Date:       2010-08-19 15:57:13
Message-ID: 20100819095713.5ac0bc70 () mindspring ! com
[Download RAW message or body]

On Thu, Aug 19, 2010 at 11:03 AM, José Romildo Malaquias said:
> I am trying to make sense from theme configuration files, so that I
> can customize them.

I can't answer your question.  I'm looking forward to seeing the
answer.  I can offer you a little Perl program I wrote for creating
a tags file for e16 themes.  In editors such as Emacs or Vim, the tags
file makes it easier to find/follow references in ethemes.  They were
originally meant to find/follow subroutine (and other) references in
programming languages.  Run the program in the top directory of the
theme and redirect the output to a file called "tags".

#!/usr/bin/perl

use strict;
use warnings;

my @names = `find . -name "*.cfg" | xargs grep -P '^\\s*__NAME\\s'`;

my @tags;
for  ( @names ) {
    chomp;
    s{^./}{};
    m{^([^:]+):(.*)} or do {
        warn "BAD LINE:$_\n";
        next;
    };
    my ($file, $line) = ($1, $2);
    my $name = $line;
    $name =~ s/^\s*__NAME\s*//;
    $name =~ s/^"|"$//g;
    $line =~ s/(^\s\w:"'-])/\\$1/g;
    my $re = "/^$line\$/";
    push @tags, { file => $file, name => $name, re => $re, type => "s" };
}

my $ME = $0; $ME =~ s{.*/}{};

print <<END_HEADER;
!_TAG_FILE_FORMAT	2	/extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED	1	/0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR	James Bowlin	/bowlin\@mindspring.com/
!_TAG_PROGRAM_NAME	$ME	//
END_HEADER

@tags = 
    sort {
           $a->{name} cmp $b->{name}
        || $a->{file} cmp $b->{file} 
    } @tags;
    
for my $tag( @tags ) {
    printf qq{%s\t%s\t%s;"\t%s\n}, @$tag{qw/name file re type/};
}
__END__


Peace, James

Focus your body, mind, and spirit on the path.
                              -- Lojong Slogan

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic