123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- #!/usr/bin/perl
- # bl-obmenu-generator - schema.pl file
- # Created by martix (based on obmenu-generator schema.pl by Trizen)
- # For BunsenLabs Hydrogen, icon theme Faenza: June 2017
- # Modified for BunsenLabs Helium, icon theme Paper: June 2018
- # (C) martix GNU GPLv3 2017-2018
- =for comment
- item: add an item inside the menu {item => ["command", "label", "icon"]},
- cat: add a category inside the menu {cat => ["name", "label", "icon"]},
- sep: horizontal line separator {sep => undef}, {sep => "label"},
- pipe: a pipe menu entry {pipe => ["command", "label", "icon"]},
- raw: any valid Openbox XML string {raw => q(xml string)},
- beg: begin of a category {beg => ["name", "icon"]},
- end: end of a category {end => undef},
- obgenmenu: generic menu settings {obgenmenu => ["label", "icon"]},
- exit: default "Exit" action {exit => ["label", "icon"]},
- =cut
- # NOTE:
- # * Keys and values are case sensitive. Keep all keys lowercase.
- # * ICON can be either a direct path to an icon or a valid icon name.
- # * Category names are case insensitive. (X-XFCE and x_xfce are equivalent)
- require "$ENV{HOME}/.config/bl-obmenu-generator/config.pl";
- # Text editor
- my $editor = $CONFIG->{editor};
- ## Menu Structure
- our $SCHEMA = [
- # Item Command Label Icon
- {item => ['gmrun', 'Run Program', 'system-run']},
-
- ### Separator ---------------------------------------------------------
- {sep => undef},
-
- # Item Command Label Icon
- {item => ['x-terminal-emulator', 'Terminal', 'terminal']},
- {item => ['x-www-browser', 'Web Browser', 'web-browser']},
- {item => ['bl-file-manager', 'File Manager', 'file-manager']},
- {item => ['bl-text-editor', 'Text Editor', 'text-editor']},
- {item => ['bl-media-player', 'Media Player', 'multimedia-player']},
-
- ### Separator ---------------------------------------------------------
- {sep => undef},
-
- # Menu categories
-
- # Category Name Label Icon
- {cat => ['utility', 'Accessories', 'applications-utilities']},
- # {cat => ['development', 'Development', 'applications-development']},
- # {cat => ['education', 'Education', 'applications-science']},
- {cat => ['game', 'Games', 'applications-games']},
- {cat => ['graphics', 'Graphics', 'applications-graphics']},
- {cat => ['audiovideo', 'Multimedia', 'applications-multimedia']},
- {cat => ['network', 'Network', 'applications-internet']},
- {cat => ['office', 'Office', 'applications-office']},
- # {cat => ['other', 'Other', 'applications-other']},
- {cat => ['settings', 'Settings', 'applications-accessories']},
- {cat => ['system', 'System Tools', 'applications-system']},
- # {cat => ['qt', 'QT Applications', 'qtcreator']},
- # {cat => ['gtk', 'GTK Applications', 'gtk-properties']},
- # {cat => ['x_xfce', 'XFCE Applications','applications-other']},
- # {cat => ['gnome', 'GNOME Applications','gnome-applications']},
- # {cat => ['consoleonly', 'CLI Applications', 'applications-utilities']},
- # How to add a custom category:
- # LABEL ICON
- #{beg => ['My category', 'cat-icon']},
- # ... some items ... {item => ["command", "label", "icon"]},
- #{end => undef},
- # LXDE Menu entry
- #{pipe => ['openbox-menu lxde-applications.menu', 'LXDE', 'lxde_badge-symbolic']},
-
-
- ### Separator ---------------------------------------------------------
- {sep => undef},
-
- ## Pipe menu categories for #BĹ Places and Recent Files
-
- {pipe => ['bl-places-pipemenu', 'Places', 'gtk-directory']},
- {pipe => ['bl-recent-files-pipemenu', 'Recent Files', 'document-open-recent']},
-
-
- ### Separator ---------------------------------------------------------
- # {sep => undef},
- # Generic menu settings
- # {obgenmenu => ['Generic menu settings', 'configuration_section',]},
-
-
- ### Separator ---------------------------------------------------------
- {sep => undef},
-
- {beg => ["Preferences", "preferences-other"]},
-
- {beg => ["Openbox", "preferences-system-windows"]},
-
- # {item => ['bl-text-editor ~/.config/openbox/menu.xml', 'Edit menu.xml', 'text-editor']},
-
- {item => ['bl-text-editor ~/.config/bl-obmenu-generator/schema.pl', 'Edit schema.pl', 'text-editor']},
-
- {item => ['bl-text-editor ~/.config/openbox/rc.xml', 'Edit rc.xml', 'package_editors']},
-
- # {item => ['bl-text-editor ~/.config/bl-obmenu-generator/config.pl', 'Edit config.pl', 'text-editor']},
-
- #{item => ['bl-menu-switch', 'Menu Switch', 'bl-menu-switch']},
-
- {item => ['bl-text-editor ~/.config/openbox/autostart', 'Edit autostart', 'hexedit']},
-
- {item => ['obmenu', 'GUI Menu Editor', 'gconf-editor']},
-
- {item => ['obconf', 'GUI Config Tool', 'gtk-preferences']},
-
- {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']},
-
- {item => ['openbox --reconfigure', 'Reconfigure', 'user-desktop']},
-
- {item => ['openbox --restart', 'Restart', 'system-restart']},
-
- {end => undef},
-
- {pipe => ['bl-compositor', 'Compositor', 'window-new']},
-
- {pipe => ['bl-conky-pipemenu', 'Conky', 'utilities-system-monitor']},
-
- {pipe => ['bl-tint2-pipemenu', 'Tint2', 'tint2']},
-
- {item => ['lxappearance', 'Appearance', 'preferences-theme']},
-
- {item => ['bl-text-editor ~/.config/fontconfig/fonts.conf', 'Font configuration', 'preferences-desktop-font']},
-
- {item => ['bl-obthemes', 'BLOB Themes Manager', 'distributor-logo-bunsenlabs']},
-
- {item => ['nitrogen', 'Wallpaper', 'nitrogen']},
-
- {item => ['xfce4-notifyd-config', 'Notifications', 'xfce4-notifyd']},
-
- {item => ['xfce4-power-manager-settings', 'Power Management', 'cs-power']},
-
-
- {beg => ["dmenu", "app-launcher"]},
-
- {item => ['bl-text-editor ~/.config/dmenu/dmenu-bind.sh', 'Edit Start-Up Script', 'text-editor']},
-
- {item => ['x-terminal-emulator -T "dmenu man page" -e man dmenu', 'Help: man dmenu', 'stock_dialog-question']},
-
- {end => undef},
-
-
- {beg => ["gmrun", "system-run"]},
-
- {item => ['bl-text-editor ~/.gmrunrc', 'Edit Config File', 'text-editor']},
-
- {item => ['x-terminal-emulator -T "gmrun man page" -e man gmrun', 'Help: man gmrun', 'stock_dialog-question']},
-
- {end => undef},
-
-
- {beg => ["Display", "display"]},
-
- {item => ['arandr', 'Display Settings', 'cs-display']},
-
- {item => ['x-terminal-emulator -T "xrandr man page" -e man xrandr', 'Help: man xrandr', 'stock_dialog-question']},
-
- {end => undef},
-
- {end => undef},
-
- {beg => ["System", "system"]},
-
- {pipe => ['bl-printing-pipemenu', 'Printers', 'printer']},
-
- {item => ['gksudo synaptic', 'Synaptic Package Manager', 'synaptic']},
-
- {item => ['gksudo bl-file-manager', 'File Manager as Root', 'file-manager']},
-
- {item => ['gksudo bl-text-editor', 'Text Editor as Root', 'text-editor']},
-
- {item => ['gksudo bl-text-editor /etc/lightdm/lightdm-gtk-greeter.conf /etc/lightdm/lightdm.conf', 'Login Settings', 'avatar-default']},
-
- {item => ['gksudo gparted', 'GParted', 'gparted']},
-
- {item => ['gksudo galternatives', 'Edit Debian Alternatives', 'galternatives']},
-
- {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']},
-
- {end => undef},
-
- {pipe => ['bl-help-pipemenu', 'Help', 'system-help']},
-
-
- ### Separator ---------------------------------------------------------
- {sep => undef},
-
- {pipe => ['bl-kb-pipemenu', 'Display Keybinds', 'preferences-desktop-keyboard-shortcuts']},
-
-
- ### Separator ---------------------------------------------------------
- {sep => undef},
-
- {item => ['bl-lock', 'Lock Screen', 'system-lock-screen']},
-
- {item => ['bl-exit', 'Exit', 'xfce-system-exit']},]
|