Skip to content

Commit

Permalink
- Added suppor for user-defined keys inside the "skip_entry" config o…
Browse files Browse the repository at this point in the history
…ption.

Example:
	skip_entry => [{key => 'NotShowIn', re => qr/Openbox/}],
  • Loading branch information
trizen committed Jul 11, 2015
1 parent b176282 commit 925a12e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions obmenu-generator
Expand Up @@ -353,8 +353,16 @@ my $desk_obj = Linux::DesktopFiles->new(

home_dir => $home_dir,

categories => [map $_->{cat}[0], grep exists $_->{cat}, @$SCHEMA],
keys_to_keep => [@{$CONFIG{name_keys}}, 'Exec', 'Icon'],
categories => [map $_->{cat}[0], grep exists $_->{cat}, @$SCHEMA],
keys_to_keep => [@{$CONFIG{name_keys}},
'Exec', 'Icon',
(
defined($CONFIG{'Linux::DesktopFiles'}{skip_entry})
&& ref($CONFIG{'Linux::DesktopFiles'}{skip_entry}) eq 'ARRAY'
? (map { $_->{key} } @{$CONFIG{'Linux::DesktopFiles'}{skip_entry}})
: ()
),
],

$icons
? (
Expand Down

0 comments on commit 925a12e

Please sign in to comment.