schema.pl 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. #!/usr/bin/perl
  2. # bl-obmenu-generator - schema.pl file
  3. # Created by martix (based on obmenu-generator schema.pl by Trizen)
  4. # For BunsenLabs Hydrogen, icon theme Faenza: June 2017
  5. # Modified for BunsenLabs Helium, icon theme Paper: June 2018
  6. # (C) martix GNU GPLv3 2017-2018
  7. =for comment
  8. item: add an item inside the menu {item => ["command", "label", "icon"]},
  9. cat: add a category inside the menu {cat => ["name", "label", "icon"]},
  10. sep: horizontal line separator {sep => undef}, {sep => "label"},
  11. pipe: a pipe menu entry {pipe => ["command", "label", "icon"]},
  12. raw: any valid Openbox XML string {raw => q(xml string)},
  13. beg: begin of a category {beg => ["name", "icon"]},
  14. end: end of a category {end => undef},
  15. obgenmenu: generic menu settings {obgenmenu => ["label", "icon"]},
  16. exit: default "Exit" action {exit => ["label", "icon"]},
  17. =cut
  18. # NOTE:
  19. # * Keys and values are case sensitive. Keep all keys lowercase.
  20. # * ICON can be either a direct path to an icon or a valid icon name.
  21. # * Category names are case insensitive. (X-XFCE and x_xfce are equivalent)
  22. require "$ENV{HOME}/.config/bl-obmenu-generator/config.pl";
  23. # Text editor
  24. my $editor = $CONFIG->{editor};
  25. ## Menu Structure
  26. our $SCHEMA = [
  27. # Item Command Label Icon
  28. {item => ['gmrun', 'Run Program', 'system-run']},
  29. ### Separator ---------------------------------------------------------
  30. {sep => undef},
  31. # Item Command Label Icon
  32. {item => ['x-terminal-emulator', 'Terminal', 'terminal']},
  33. {item => ['x-www-browser', 'Web Browser', 'web-browser']},
  34. {item => ['bl-file-manager', 'File Manager', 'file-manager']},
  35. {item => ['bl-text-editor', 'Text Editor', 'text-editor']},
  36. {item => ['bl-media-player', 'Media Player', 'multimedia-player']},
  37. ### Separator ---------------------------------------------------------
  38. {sep => undef},
  39. # Menu categories
  40. # Category Name Label Icon
  41. {cat => ['utility', 'Accessories', 'applications-utilities']},
  42. # {cat => ['development', 'Development', 'applications-development']},
  43. # {cat => ['education', 'Education', 'applications-science']},
  44. {cat => ['game', 'Games', 'applications-games']},
  45. {cat => ['graphics', 'Graphics', 'applications-graphics']},
  46. {cat => ['audiovideo', 'Multimedia', 'applications-multimedia']},
  47. {cat => ['network', 'Network', 'applications-internet']},
  48. {cat => ['office', 'Office', 'applications-office']},
  49. # {cat => ['other', 'Other', 'applications-other']},
  50. {cat => ['settings', 'Settings', 'applications-accessories']},
  51. {cat => ['system', 'System Tools', 'applications-system']},
  52. # {cat => ['qt', 'QT Applications', 'qtcreator']},
  53. # {cat => ['gtk', 'GTK Applications', 'gtk-properties']},
  54. # {cat => ['x_xfce', 'XFCE Applications','applications-other']},
  55. # {cat => ['gnome', 'GNOME Applications','gnome-applications']},
  56. # {cat => ['consoleonly', 'CLI Applications', 'applications-utilities']},
  57. # How to add a custom category:
  58. # LABEL ICON
  59. #{beg => ['My category', 'cat-icon']},
  60. # ... some items ... {item => ["command", "label", "icon"]},
  61. #{end => undef},
  62. # LXDE Menu entry
  63. #{pipe => ['openbox-menu lxde-applications.menu', 'LXDE', 'lxde_badge-symbolic']},
  64. ### Separator ---------------------------------------------------------
  65. {sep => undef},
  66. ## Pipe menu categories for #BĹ Places and Recent Files
  67. {pipe => ['bl-places-pipemenu', 'Places', 'gtk-directory']},
  68. {pipe => ['bl-recent-files-pipemenu', 'Recent Files', 'document-open-recent']},
  69. ### Separator ---------------------------------------------------------
  70. # {sep => undef},
  71. # Generic menu settings
  72. # {obgenmenu => ['Generic menu settings', 'configuration_section',]},
  73. ### Separator ---------------------------------------------------------
  74. {sep => undef},
  75. {beg => ["Preferences", "preferences-other"]},
  76. {beg => ["Openbox", "preferences-system-windows"]},
  77. # {item => ['bl-text-editor ~/.config/openbox/menu.xml', 'Edit menu.xml', 'text-editor']},
  78. {item => ['bl-text-editor ~/.config/bl-obmenu-generator/schema.pl', 'Edit schema.pl', 'text-editor']},
  79. {item => ['bl-text-editor ~/.config/openbox/rc.xml', 'Edit rc.xml', 'package_editors']},
  80. # {item => ['bl-text-editor ~/.config/bl-obmenu-generator/config.pl', 'Edit config.pl', 'text-editor']},
  81. #{item => ['bl-menu-switch', 'Menu Switch', 'bl-menu-switch']},
  82. {item => ['bl-text-editor ~/.config/openbox/autostart', 'Edit autostart', 'hexedit']},
  83. {item => ['obmenu', 'GUI Menu Editor', 'gconf-editor']},
  84. {item => ['obconf', 'GUI Config Tool', 'gtk-preferences']},
  85. {item => ['yad --button="OK":0 --center --window-icon=distributor-logo-bunsenlabs --text-info --title="How to Edit the Menu" --filename=/usr/share/bunsen/docs/helpfile-menu.txt --width=900 --height=700 --fontname=Monospace', 'How to Edit Menu', 'dialog-information']},
  86. {item => ['openbox --reconfigure', 'Reconfigure', 'user-desktop']},
  87. {item => ['openbox --restart', 'Restart', 'system-restart']},
  88. {end => undef},
  89. {pipe => ['bl-compositor', 'Compositor', 'window-new']},
  90. {pipe => ['bl-conky-pipemenu', 'Conky', 'utilities-system-monitor']},
  91. {pipe => ['bl-tint2-pipemenu', 'Tint2', 'tint2']},
  92. {item => ['lxappearance', 'Appearance', 'preferences-theme']},
  93. {item => ['bl-text-editor ~/.config/fontconfig/fonts.conf', 'Font configuration', 'preferences-desktop-font']},
  94. {item => ['bl-obthemes', 'BLOB Themes Manager', 'distributor-logo-bunsenlabs']},
  95. {item => ['nitrogen', 'Wallpaper', 'nitrogen']},
  96. {item => ['xfce4-notifyd-config', 'Notifications', 'xfce4-notifyd']},
  97. {item => ['xfce4-power-manager-settings', 'Power Management', 'cs-power']},
  98. {beg => ["dmenu", "app-launcher"]},
  99. {item => ['bl-text-editor ~/.config/dmenu/dmenu-bind.sh', 'Edit Start-Up Script', 'text-editor']},
  100. {item => ['x-terminal-emulator -T "dmenu man page" -e man dmenu', 'Help: man dmenu', 'stock_dialog-question']},
  101. {end => undef},
  102. {beg => ["gmrun", "system-run"]},
  103. {item => ['bl-text-editor ~/.gmrunrc', 'Edit Config File', 'text-editor']},
  104. {item => ['x-terminal-emulator -T "gmrun man page" -e man gmrun', 'Help: man gmrun', 'stock_dialog-question']},
  105. {end => undef},
  106. {beg => ["Display", "display"]},
  107. {item => ['arandr', 'Display Settings', 'cs-display']},
  108. {item => ['x-terminal-emulator -T "xrandr man page" -e man xrandr', 'Help: man xrandr', 'stock_dialog-question']},
  109. {end => undef},
  110. {end => undef},
  111. {beg => ["System", "system"]},
  112. {pipe => ['bl-printing-pipemenu', 'Printers', 'printer']},
  113. {item => ['gksudo synaptic', 'Synaptic Package Manager', 'synaptic']},
  114. {item => ['gksudo bl-file-manager', 'File Manager as Root', 'file-manager']},
  115. {item => ['gksudo bl-text-editor', 'Text Editor as Root', 'text-editor']},
  116. {item => ['gksudo bl-text-editor /etc/lightdm/lightdm-gtk-greeter.conf /etc/lightdm/lightdm.conf', 'Login Settings', 'avatar-default']},
  117. {item => ['gksudo gparted', 'GParted', 'gparted']},
  118. {item => ['gksudo galternatives', 'Edit Debian Alternatives', 'galternatives']},
  119. {item => ['yad --button="OK":0 --center --window-icon=distributor-logo-bunsenlabs --text-info --title="About Bunsen Alternatives" --filename="/usr/share/bunsen/docs/helpfile-bl-alternatives.txt" --width=900 --height=700 --fontname=Monospace', 'About Bunsen Alternatives', 'distributor-logo-bunsenlabs']},
  120. {end => undef},
  121. {pipe => ['bl-help-pipemenu', 'Help', 'system-help']},
  122. ### Separator ---------------------------------------------------------
  123. {sep => undef},
  124. {pipe => ['bl-kb-pipemenu', 'Display Keybinds', 'preferences-desktop-keyboard-shortcuts']},
  125. ### Separator ---------------------------------------------------------
  126. {sep => undef},
  127. {item => ['bl-lock', 'Lock Screen', 'system-lock-screen']},
  128. {item => ['bl-exit', 'Exit', 'xfce-system-exit']},]