Menus traduzidos no FluxBox!


Debian Squeeze + FluxBox + menu com ícones, novas opções adicionadas e seções de menu já traduzidas para pt_BR. Tint2 já tomando conta do pedaço com as alterações que fiz no init do FluxBox.

FluxBox com menus traduzidos & Tint2
FluxBox com menus traduzidos & Tint2
Para que os ícones do systray aparecessem no Tint2 tive que modificar o init do FluxBox, removendo a opção systray e auto-ocultando a barra de tarefas, abaixo segue o conteúdo do arquivo ~/.fluxbox/init:

session.screen0.clientMenu.usePixmap:    true
session.screen0.overlay.lineWidth:    1
session.screen0.overlay.lineStyle:    LineSolid
session.screen0.overlay.joinStyle:    JoinMiter
session.screen0.overlay.capStyle:    CapNotLast
session.screen0.tabs.usePixmap:    true
session.screen0.tabs.maxOver:    false
session.screen0.tabs.intitlebar:    true
session.screen0.window.focus.alpha:    180
session.screen0.window.unfocus.alpha:    200
session.screen0.tab.placement:    TopLeft
session.screen0.tab.width:    64
session.screen0.iconbar.mode:    {static groups} (workspace)
session.screen0.iconbar.iconWidth:    70
session.screen0.iconbar.iconTextPadding:    10
session.screen0.iconbar.usePixmap:    true
session.screen0.iconbar.alignment:    Relative
session.screen0.slit.alpha:    180
session.screen0.slit.maxOver:    false
session.screen0.slit.placement:    BottomCenter
session.screen0.slit.acceptKdeDockapps:    true
session.screen0.slit.onhead:    0
session.screen0.slit.autoHide:    true
session.screen0.slit.layer:    Dock
session.screen0.titlebar.left:    Stick 
session.screen0.titlebar.right:    Minimize Maximize Close 
session.screen0.toolbar.tools:    
session.screen0.toolbar.alpha:    180
session.screen0.toolbar.placement:    TopCenter
session.screen0.toolbar.autoHide:    false
session.screen0.toolbar.height:    0
session.screen0.toolbar.layer:    Dock
session.screen0.toolbar.maxOver:    false
session.screen0.toolbar.visible:    false
session.screen0.toolbar.onhead:    0
session.screen0.toolbar.widthPercent:    100
session.screen0.menu.alpha:    180
session.screen0.tooltipDelay:    500
session.screen0.maxDisableResize:    false
session.screen0.strftimeFormat:    %d %b, %a %02k:%M:%S
session.screen0.rowPlacementDirection:    LeftToRight
session.screen0.opaqueMove:    true
session.screen0.menuDelayClose:    200
session.screen0.workspaces:    1
session.screen0.showwindowposition:    true
session.screen0.fullMaximization:    true
session.screen0.menuDelay:    200
session.screen0.windowMenu:    /home/h4rd3r/.fluxbox/windowmenu
session.screen0.workspacewarping:    true
session.screen0.focusModel:    ClickFocus
session.screen0.edgeSnapThreshold:    10
session.screen0.colPlacementDirection:    TopToBottom
session.screen0.allowRemoteActions:    false
session.screen0.userFollowModel:    SemiFollow
session.screen0.rootCommand:    
session.screen0.noFocusWhileTypingDelay:    0
session.screen0.windowPlacement:    RowMinOverlapPlacement
session.screen0.maxIgnoreIncrement:    true
session.screen0.autoRaise:    true
session.screen0.maxDisableMove:    false
session.screen0.clickRaises:    true
session.screen0.tabFocusModel:    ClickToTabFocus
session.screen0.defaultDeco:    NORMAL
session.screen0.followModel:    SemiFollow
session.screen0.focusNewWindows:    true
session.screen0.menuMode:    Delay
session.screen0.workspaceNames:    303201rea de Trabalho 1,303201rea de Trabalho 2,303201rea de Trabalho 3,303201rea de Trabalho 4,
session.cacheMax:    200
session.menuFile:    ~/.fluxbox/menu
session.autoRaiseDelay:    250
session.tabPadding:    0
session.tabsAttachArea:    Window
session.styleFile:    /home/h4rd3r/.fluxbox/styles/Black_harmony
session.doubleClickInterval:    250
session.appsFile:    ~/.fluxbox/apps
session.ignoreBorder:    false
session.keyFile:    ~/.fluxbox/keys
session.cacheLife:    5
session.colorsPerChannel:    4
session.forcePseudoTransparency:    true
session.styleOverlay:    ~/.fluxbox/overlay
session.configVersion:    13
session.slitlistFile:    ~/.fluxbox/slitlist
As linhas a serem modificadas foram as seguintes (abaixo já estão modificadas):

session.screen0.toolbar.visible:false
session.screen0.toolbar.tools:
E a seguir vemos o conteúdo do arquivo ~/.config/fbmenugen/configuration.pl:

#!/usr/bin/perl

# fbmenugen config file
#
# SCHEMA supports the following keys: item, cat, config, exit, fluxbox, regenerate, raw, sep
#
# Posible values for each of this types are:
# For 'item': [COMMAND, NAME, ICON]
# For 'sep': undef - horizontal separator
# For 'cat': Any of the posible categories. 'cat => [CATEGORY, NAME, IMAGE]' - image is optional
# For 'raw': [COMMAND, NAME, ICON]
#   Example: {raw => ' [exec] (Geeqie) {geeqie -r } </usr/share/pixmaps/geeqie.png>'},

# NOTE:
#    * Keys and values are case sensitive. Keep all keys lowercase.
#    * ICON can be a either a direct path to a icon or a valid icon name
#    * Category names are case insensitive. (ex: X-XFCE and x_xfce are equivalent)

# For regular expressions
#    * is better to use qr/REGEX/ instead of 'REGEX'

my %items = (
             terminal          => 'terminator',
             editor            => "leafpad",
             file_manager      => 'thunar',
             web_browser       => 'opera',
             run_command       => 'gmrun',
             lock_command      => 'xscreensaver-command -lock',
            );

our $CONFIG = {

    # Menu title
    title => 'Debian Squeeze @ Fluxbox',

    # Example:   [ "$ENV{'HOME'}/.local/share/applications", '/my/path' ]
    desktop_files_paths => ['/usr/share/applications'],

    # File where to look for icon theme (default: ~/.gtkrc-2.0)
    gtk_rc_file => undef,

    # When 'Terminal=true'
    open_in_terminal => "$items{terminal} -e %s",

    # Editor command
    open_in_editor => "$items{editor}",

    # Ignore desktop files if their filenames match a regex
    ignore_file_name_re => undef,

    # Ignore applications if their names match a regex
    ignore_app_name_re => undef,

    # Ignore applications if their commands match a regex
    ignore_app_command_re => undef,

    # Ignore desktop files if their content match a regex
    ignore_file_content_re => undef,

    # Remove from every command something matched by a regex (/g)
    command_rem_re => undef,

    # Look in this directories first (when generating icons.db)
    dirs_first_to_look => [],

    # Look in this directories as a second icon theme (when generating icons.db)
    dirs_middle_to_look => [],

    # Look in this directories, as a backup plan (when generating icons.db)
    dirs_last_to_look => [],
};

our $SCHEMA = [

    #             COMMAND                    LABEL                ICON
    {item => [$items{editor},            'Editor de Textos',            'text-editor']},
    {item => [$items{file_manager},      'Gerenciador de Arquivos',      'file-manager']},
    {item => [$items{web_browser},       'Navegador Web',       'web-browser']},
    {item => [$items{terminal},          'Terminal',          'terminal']},


    #{item => [$items{instant_messaging}, 'Mensageiro Instantâneo', 'system-users']},
    {raw => ' [exec] (Trocar Wallpaper) {nitrogen /home/h4rd3r/Imagens} </usr/share/icons/hicolor/32x32/apps/nitrogen.png>'},

    {sep => undef},

    #          NAME            LABEL                ICON
    {cat => ['utility',     'Acessórios', 'applications-utilities']},
    {cat => ['settings',    'Configurações',    'applications-accessories']},
    {cat => ['development', 'Desenvolvimento', 'applications-development']},
    {cat => ['education',   'Educativos',   'applications-science']},
    {cat => ['office',      'Escritório',      'applications-office']},
    {cat => ['graphics',    'Gráficos',    'applications-graphics']},
    {cat => ['game',        'Jogos',       'applications-games']},
    {cat => ['audiovideo',  'Multimídia',  'applications-multimedia']},
    {cat => ['network',     'Rede',     'applications-internet']},
    {cat => ['system',      'Sistema',      'applications-system']},

    #{cat => ['qt',          'QT Applications',    'qtlogo']},
    #{cat => ['gtk',         'GTK Applications',   'gnome-applications']},
    #{cat => ['x_xfce',      'XFCE Applications',  'applications-other']},
    #{cat => ['gnome',       'GNOME Applications', 'gnome-applications']},
    #{cat => ['consoleonly', 'CLI Applications',   'applications-utilities']},

    #                  LABEL               ICON
    {config     => ['Configurar Menu', 'preferences-desktop']},
    {fluxbox    => ['Fluxbox Menu',   'package_settings']},
    {sep        => undef},
    {item => [$items{run_command},       'Executar',       'system-run']},
    {regenerate => ['Recriar Menu',     'gtk-refresh']},
    {item => [$items{lock_command},      'Travar a tela',              'lock']},
    {sep        => undef},
    {exit       => ['Sair',           'exit']},
];
Lembrem-se que sempre modificarem o arquivo ~/.config/fbmenugen/configuration.pl, será necessário executar: fbmenugen -i ou clicar na opção Regenerate (Recriar Menu) do menu FluxBox.

Anúncios
Menus traduzidos no FluxBox!

4 comentários sobre “Menus traduzidos no FluxBox!

    1. edps disse:

      Não vejo necessidade disso.

      1. você deve modificar o arquivo ~/.fluxbox/init conforme visto aqui.

      2. o arquivo ~/.config/fbmenugen/configuration.pl visto aqui, você só irá modificá-lo após instalar o fbmenugen:

      http://www.vivaolinux.com.br/dica/fbmenugen-Menus-do-Fluxbox-com-icones/

      Foi essa minha dica que esqueci de citar, desculpe-me, vamos lá aos passos atualizados:

      $ wget https://trizen.googlecode.com/files/fbmenugen-0.74.tar.gz
      $ tar -zxvf fbmenugen-0.74.tar.gz
      $ chmod +x fbmenugen
      $ sudo mv fbmenugen /usr/local/bin/
      $ fbmenugen -i

      Já em relação ao Tint2, você instala os programas necessários:

      $ sudo apt-get install tint2 wmctrl
      $ sudo mv fbmenugen /usr/local/bin/
      $ fbmenugen -i

      Baixa o arquivo do link abaixo, salva o mesmo com o nome tint2rc e mova-o para ~/.config/tint2/

      http://pastebin.com/7cZmgw2w

      $ mv tint2rc ~/.config/tint2/

      Além disto, você DEVE baixar o arquivo abaixo, salvá-lo com o nome launch, dar permissão de execução e mova-o para /usr/local/bin/
      E copia a config para ~/.config/tint2/tint2rc, eu acho isso simples.

      http://pastebin.com/download.php?i=7cZmgw2w

      $ chmod +x launch
      $ sudo mv launch /usr/local/bin/

      Curtir

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s