config.pl 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/usr/bin/perl
  2. # obmenu-generator - configuration file
  3. # This file will be updated automatically.
  4. # Any additional comment and/or indentation will be lost.
  5. =for comment
  6. || FILTERING
  7. | skip_filename_re : Skip a .desktop file if its name matches the regex.
  8. Name is from the last slash to the end. (e.g.: name.desktop)
  9. Example: qr/^(?:gimp|xterm)\b/, # skips 'gimp' and 'xterm'
  10. | skip_entry : Skip a desktop file if the value from a given key matches the regex.
  11. Example: [
  12. {key => 'Name', re => qr/(?:about|terminal)/i},
  13. {key => 'Exec', re => qr/^xterm/},
  14. {key => 'OnlyShowIn', re => qr/XFCE/},
  15. ],
  16. | substitutions : Substitute, by using a regex, in the values from the desktop files.
  17. Example: [
  18. {key => 'Exec', re => qr/xterm/, value => 'tilix', global => 1},
  19. ],
  20. || ICON SETTINGS
  21. | use_gtk3 : Use the Gtk3 library for resolving the icon paths. (default: 0)
  22. | gtk_rc_filename : Absolute path to the GTK configuration file.
  23. | missing_icon : Use this icon for missing icons (default: gtk-missing-image)
  24. | icon_size : Preferred size for icons. (default: 48)
  25. | generic_fallback : Try to shorten icon name at '-' characters before looking at inherited themes. (default: 0)
  26. | force_icon_size : Always get the icon scaled to the requested size. (default: 0)
  27. || PATHS
  28. | desktop_files_paths : Absolute paths which contain .desktop files.
  29. Example: [
  30. '/usr/share/applications',
  31. "$ENV{HOME}/.local/share/applications",
  32. glob("$ENV{HOME}/.local/share/applications/wine/Programs/*"),
  33. ],
  34. || NOTES
  35. | Regular expressions:
  36. * use qr/.../ instead of '...'
  37. * use qr/.../i for case insensitive mode
  38. =cut
  39. our $CONFIG = {
  40. "editor" => "/opt/sublime_text/sublime_text",
  41. "force_icon_size" => 0,
  42. "generic_fallback" => 0,
  43. "gtk_rc_filename" => "$ENV{HOME}/.gtkrc-2.0",
  44. "icon_size" => 48,
  45. "Linux::DesktopFiles" => {
  46. desktop_files_paths => [
  47. "/usr/share/applications",
  48. "/usr/local/share/applications",
  49. "/usr/share/applications/kde4",
  50. "$ENV{HOME}/.local/share/applications",
  51. ],
  52. keep_unknown_categories => 1,
  53. skip_entry => undef,
  54. skip_filename_re => undef,
  55. substitutions => undef,
  56. terminalization_format => "%s -e '%s'",
  57. terminalize => 1,
  58. unknown_category_key => "other",
  59. },
  60. "locale_support" => 1,
  61. "missing_icon" => "gtk-missing-image",
  62. "terminal" => "urxvt",
  63. "use_gtk3" => 0,
  64. "VERSION" => 0.87,
  65. }