Advertisement
edps

obmenu-generator-(schema.pl)-funtoo

Dec 13th, 2015
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6.06 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. # obmenu-generator - schema file
  4.  
  5. =for comment
  6.  
  7.     item:      add an item inside the menu               {item => ["command", "label", "icon"]},
  8.     cat:       add a category inside the menu             {cat => ["name", "label", "icon"]},
  9.     sep:       horizontal line separator                  {sep => undef}, {sep => "label"},
  10.     pipe:      a pipe menu entry                         {pipe => ["command", "label", "icon"]},
  11.     raw:       any valid Openbox XML string               {raw => q(xml string)},
  12.     begin_cat: begin of a category                  {begin_cat => ["name", "icon"]},
  13.     end_cat:   end of a category                      {end_cat => undef},
  14.     obgenmenu: generic menu settings                {obgenmenu => ["label", "icon"]},
  15.     exit:      default "Exit" action                     {exit => ["label", "icon"]},
  16.  
  17. =cut
  18.  
  19. # NOTE:
  20. #    * Keys and values are case sensitive. Keep all keys lowercase.
  21. #    * ICON can be a either a direct path to an icon or a valid icon name
  22. #    * Category names are case insensitive. (X-XFCE and x_xfce are equivalent)
  23.  
  24. require "$ENV{HOME}/.config/obmenu-generator/config.pl";
  25.  
  26. ## Text editor
  27.     my $editor = $CONFIG->{editor};
  28.  
  29. our $SCHEMA = [
  30.     #          COMMAND                 LABEL                ICON
  31.     {sep => 'Funtoo Desktop'},
  32.     {sep => undef},
  33.     {item => ['xfce4-screenshooter',             'Captura de tela',          '/usr/share/icons/Adwaita/48x48/apps/applets-screenshooter.png']},
  34.     {item => ['leafpad',             'Editor de Texto',          '/usr/share/icons/Adwaita/48x48/apps/accessories-text-editor.png']},
  35.     {item => ['dbus-launch thunar',        'Gerenciador de Arquivos',      '/usr/share/icons/Adwaita/48x48/apps/system-file-manager.png']},
  36.     {item => ['opera',    'Navegador Web',       '/usr/share/icons/Adwaita/48x48/apps/web-browser.png']},
  37.     {item => ['sakura',             'Terminal',          '/usr/share/icons/Adwaita/48x48/apps/utilities-terminal.png']},
  38.     {sep => undef},    
  39.     #          NAME            LABEL                ICON
  40.     {cat => ['utility',     'Acessórios', 'applications-utilities']},
  41.     {cat => ['settings',    'Configurações',    'applications-accessories']},
  42.     {cat => ['development', 'Desenvolvimento', 'applications-development']},
  43.     {cat => ['education',   'Educativos',   'applications-science']},
  44.     {cat => ['office',      'Escritório',      'applications-office']},
  45.     {cat => ['graphics',    'Gráficos',    'applications-graphics']},
  46.     {cat => ['network',     'Internet',     'applications-internet']},
  47.     {cat => ['game',        'Jogos',       'applications-games']},
  48.     {cat => ['audiovideo',  'Multimídia',  'applications-multimedia']},
  49.     {cat => ['other',       'Outros',       'applications-other']},
  50.     {cat => ['system',      'Sistema',      'applications-system']},
  51.  
  52.     #            COMMAND     LABEL        ICON
  53.     #{sep => undef},
  54.     #{wine_apps => ['Wine apps', 'applications-other']},
  55.     #{sep => undef},
  56.     #{pipe => ['obbrowser', 'Pasta Pessoal', 'drive-harddisk']},
  57.  
  58.     ## Generic advanced settings
  59.     #{sep       => undef},
  60.     #{obgenmenu => ['Openbox Settings', 'applications-engineering']},
  61.     #{sep       => undef},
  62.  
  63.     ## Custom advanced settings.
  64.     {sep => undef},
  65.     {begin_cat => ['Configurações do WM', 'gnome-settings']},
  66.  
  67.     # obmenu-generator category.
  68.     {begin_cat => ['Obmenu-Generator', 'menu-editor']},
  69.     {item      => ["$editor ~/.config/obmenu-generator/schema.pl", 'Menu Schema', $editor]},
  70.     {item      => ["$editor ~/.config/obmenu-generator/config.pl", 'Menu Config', $editor]},
  71.     {sep  => undef},
  72.     {item => ['obmenu-generator -p',    'Generate a pipe menu',              'menu-editor']},
  73.     {item => ['obmenu-generator -s',    'Generate a static menu',            'menu-editor']},
  74.     {item => ['obmenu-generator -p -i', 'Generate a pipe menu with icons',   'menu-editor']},
  75.     {item => ['obmenu-generator -s -i', 'Generate a static menu with icons', 'menu-editor']},
  76.     {sep  => undef},
  77.     {item    => ['obmenu-generator -d', 'Refresh Icon Set', 'gtk-refresh']},
  78.     {end_cat => undef},
  79.  
  80.     # Openbox category.
  81.     {begin_cat => ['Openbox', 'openbox']},
  82.     {item      => ["$editor ~/.config/openbox/autostart", 'Editar autostart',    $editor]},
  83.     {item      => ["$editor ~/.config/openbox/menu.xml",  'Editar menu.xml',         $editor]},
  84.     {item      => ["$editor ~/.config/openbox/rc.xml",    'Editar rc.xml',           $editor]},
  85.     {sep  => undef},
  86.     {item      => ['obconf',               'OpenBox Configuration Manager', 'obconf']},
  87.     {item      => ['obmenu',             'OpenBox Menu Configurator',          '/usr/share/obmenu/mnu48.png']},
  88.     {item      => ['openbox --reconfigure',               'Reconfigurar Openbox', 'openbox']},
  89.     {end_cat => undef},
  90.  
  91.     # Programs category.
  92.     {begin_cat => ['Edit Configs', 'gnome-settings']},
  93.     {item      => ["$editor ~/.bashrc", 'bashrc', $editor]},
  94.     {item      => ["$editor ~/.bash_aliases", 'bash_aliases', $editor]},
  95.     {item      => ["$editor ~/.bash_functions", 'bash_functions', $editor]},
  96.     {item      => ["$editor ~/.conkyrc",              'conkyrc',    $editor]},
  97.     {item      => ["$editor ~/.config/tint2/tint2rc", 'tint2rc', $editor]},
  98.     {item      => ["$editor ~/.zshrc", 'zshrc', $editor]},
  99.     {item      => ["$editor ~/.config/Thunar/uca.xml", 'Thunar Custom Actions', $editor]},
  100.     {end_cat => undef},
  101.  
  102.     # Themes category.
  103.     {begin_cat => ['Themes', 'preferences-desktop-theme']},
  104.     {item      => ["lxappearance",              'Alterar Aparência',    'preferences-desktop-theme']},
  105.     {item      => ['nitrogen ~/Imagens',               'Trocar Wallpaper', 'nitrogen']},
  106.     {end_cat => undef},
  107.  
  108.     {end_cat => undef},
  109.     {sep => undef},
  110.     {item => ['gmrun',             'Executar comando...',       'system-run']},
  111.     {sep => undef},
  112.     {item => ['xscreensaver-command -lock', 'Bloquear tela', 'lock']},
  113.     {sep => undef},
  114.     {item => ['obsession-logout', 'Sair',          '/usr/share/obsession/images/system-log-out.png']},
  115. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement