schema.pl 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #!/usr/bin/perl
  2. # fbmenugen - schema file
  3. =for comment
  4. item: add an item inside the menu {item => ["command", "label", "icon"]},
  5. cat: add a category inside the menu {cat => ["name", "label", "icon"]},
  6. sep: horizontal line separator {sep => undef}, {sep => "label"},
  7. raw: any valid Fluxbox menu entry {raw => q(...)},
  8. beg: begin of a category {beg => ["name", "icon"]},
  9. end: end of a category {end => undef},
  10. fluxbox: the default Fluxbox config menu {fluxbox => ["label", "icon"]},
  11. exit: default "Exit" action {exit => ["label", "icon"]},
  12. =cut
  13. # NOTE:
  14. # * Keys and values are case sensitive. Keep all keys lowercase.
  15. # * ICON can be a either a direct path to an icon or a valid icon name
  16. # * Category names are case insensitive. (X-XFCE and x_xfce are equivalent)
  17. require "$ENV{HOME}/.config/fbmenugen/config.pl";
  18. ## Text editor
  19. my $editor = $CONFIG->{editor};
  20. our $SCHEMA = [
  21. # COMMAND LABEL ICON
  22. {item => ['xdg-open .', 'File Manager', 'system-file-manager']},
  23. {item => ['xterm', 'Terminal', 'utilities-terminal']},
  24. {item => ['xdg-open http://', 'Web Browser', 'web-browser']},
  25. {item => ['fbrun', 'Run command', 'system-run']},
  26. {sep => 'undef'},
  27. # NAME LABEL ICON
  28. {cat => ['utility', 'Accessories', 'applications-utilities']},
  29. {cat => ['development', 'Development', 'applications-development']},
  30. {cat => ['education', 'Education', 'applications-science']},
  31. {cat => ['game', 'Games', 'applications-games']},
  32. {cat => ['graphics', 'Graphics', 'applications-graphics']},
  33. {cat => ['audiovideo', 'Multimedia', 'applications-multimedia']},
  34. {cat => ['network', 'Network', 'applications-internet']},
  35. {cat => ['office', 'Office', 'applications-office']},
  36. {cat => ['other', 'Other', 'applications-other']},
  37. {cat => ['settings', 'Settings', 'applications-accessories']},
  38. {cat => ['system', 'System', 'applications-system']},
  39. # LABEL ICON
  40. #{beg => ['My category', 'cat-icon']},
  41. # ... some items ...
  42. #{end => undef},
  43. ## Custom advanced settings
  44. {sep => undef},
  45. {beg => ['Advanced Settings', 'applications-engineering']},
  46. # Configuration files
  47. {item => ["$editor ~/.conkyrc", 'Conky RC', 'text-x-generic']},
  48. {item => ["$editor ~/.config/tint2/tint2rc", 'Tint2 Panel', 'text-x-generic']},
  49. # fbmenugen category
  50. {beg => ['Fbmenugen', 'accessories-text-editor']},
  51. {item => ["$editor ~/.config/fbmenugen/schema.pl", 'Menu Schema', 'text-x-generic']},
  52. {item => ["$editor ~/.config/fbmenugen/config.pl", 'Menu Config', 'text-x-generic']},
  53. {sep => undef},
  54. {item => ['fbmenugen -i', 'Generate a menu with icons', 'accessories-text-editor']},
  55. {item => ['fbmenugen -g', 'Generate a menu without icons', 'accessories-text-editor']},
  56. {sep => undef},
  57. {item => ['fbmenugen -d', 'Refresh cache', 'view-refresh']},
  58. {end => undef},
  59. # Fluxbox category
  60. {fluxbox => ['Fluxbox', 'preferences-desktop']},
  61. {end => undef},
  62. {sep => undef},
  63. # Regenerate the menu
  64. {regenerate => ['Refresh', 'view-refresh']},
  65. # This option uses the default Fluxbox's "Exit" action
  66. {exit => ['Exit', 'application-exit']},
  67. ]