Advertisement
edps

obmenu-generator-config.pl

Apr 15th, 2015
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 4.29 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. # obmenu-generator - configuration file
  4. # This file will be updated automatically.
  5. # Any additional comment and/or indentation will be lost.
  6.  
  7. =for comment
  8.  
  9. || FILTERING
  10.     | skip_filename_re    : Skip a .desktop file if its name matches the regex.
  11.                             Name is from the last slash to the end. (filename.desktop)
  12.                             Example: qr/^(?:gimp|xterm)\b/,    # skips 'gimp' and 'xterm'
  13.  
  14.     | skip_entry          : Skip a destkop file if the value from a given key matches the regex.
  15.                             Example: [
  16.                                 {key => 'Name', re => qr/(?:about|terminal)/i},
  17.                                 {key => 'Exec', re => qr/^xterm/},
  18.                             ],
  19.  
  20.     | substitutions       : Substitute, by using a regex, in the values of the desktop files.
  21.                             Example: [
  22.                                 {key => 'Exec', re => qr/xterm/, value => 'sakura'},
  23.                                 {key => 'Exec', re => qr/\\\\/,  value => '\\', global => 1},    # for wine apps
  24.                             ],
  25.  
  26.  
  27. || ICON SETTINGS
  28.     | icon_dirs_first     : When looking for icons, look in this directories first,
  29.                             before looking in the directories of the current icon theme.
  30.                             Example: [
  31.                                 "$ENV{HOME}/.icons",
  32.                             ],
  33.  
  34.     | icon_dirs_second    : Look in this directories after looked in the directories of the
  35.                             current icon theme. (Before /usr/share/pixmaps)
  36.                             Example: [
  37.                                 "/usr/share/icons/gnome",
  38.                             ],
  39.  
  40.     | icon_dirs_last      : Look in this directories at the very last, after looked in
  41.                             /usr/share/pixmaps, /usr/share/icons/hicolor and some other
  42.                             directories.
  43.                             Example: [
  44.                                 "/usr/share/icons/Tango",
  45.                             ],
  46.  
  47.     | strict_icon_dirs    : A true value will make the module to look only inside the directories
  48.                             specified by you in either one of the above three options.
  49.  
  50.     | gtk_rc_filename     : Absolute path to the GTK configuration file.
  51.     | missing_image       : Use this icon for missing icons (default: gtk-missing-image)
  52.  
  53.  
  54. || KEYS
  55.     | name_keys           : Valid keys for the item names.
  56.                             Example: ['Name[fr]', 'GenericName[fr]', 'Name'],   # french menu
  57.  
  58.  
  59. || PATHS
  60.     | desktop_files_paths   : Absolute paths which contains .desktop files.
  61.                               Example: [
  62.                                 '/usr/share/applications',
  63.                                 "$ENV{HOME}/.local/share/applications",
  64.                                 glob("$ENV{HOME}/.local/share/applications/wine/Programs/*"),
  65.                               ],
  66.  
  67.  
  68. || NOTES
  69.     | Regular expressions:
  70.         * use qr/RE/ instead of 'RE'
  71.         * use qr/RE/i for case insenstive mode
  72.  
  73. =cut
  74.  
  75. our $CONFIG = {
  76.   "editor"              => "leafpad",
  77.   "Linux::DesktopFiles" => {
  78.                              desktop_files_paths     => ["/usr/share/applications"],
  79.                              gtk_rc_filename         => "/home/edps/.gtkrc-2.0",
  80.                              icon_dirs_first         => undef,
  81.                              icon_dirs_last          => undef,
  82.                              icon_dirs_second        => undef,
  83.                              keep_unknown_categories => 1,
  84.                              skip_entry              => undef,
  85.                              skip_filename_re        => undef,
  86.                              skip_svg_icons          => 1,
  87.                              strict_icon_dirs        => undef,
  88.                              substitutions           => undef,
  89.                              terminalization_format  => "%s -e '%s'",
  90.                              terminalize             => 1,
  91.                              unknown_category_key    => "other",
  92.                            },
  93.   "missing_icon"        => "gtk-missing-image",
  94.   "name_keys"           => ["Name"],
  95.   "terminal"            => "sakura",
  96.   "VERSION"             => 0.63,
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement