- 1. カテゴリ名日本語化
1. カテゴリ名日本語化
これは、参考サイトのとおり。
vi ~/.config/obmenu-generator/schema.pl
全文掲載しちゃいますので、バージョンが変わっていない場合は、なんなら全行消してまるコピーしちゃってください。
#!/usr/bin/perl
# obmenu-generator - schema file
=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"]},
file: include the content of an XML file {file => "/path/to/file.xml"},
raw: any XML data supported by Openbox {raw => q(xml data)},
begin_cat: beginning of a category {begin_cat => ["name", "icon"]},
end_cat: end of a category {end_cat => 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 a 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/obmenu-generator/config.pl";
## Text editor
my $editor = $CONFIG->{editor};
our $SCHEMA = [
{sep => "ArcoLinux"},
{item => ['exo-open --launch TerminalEmulator', '端末', 'terminal']},
{item => ['exo-open --launch FileManager', 'ファイルマネージャ', 'file-manager']},
{item => ['exo-open --launch WebBrowser ', 'ブラウザ', 'webbrowser-app']},
{sep => undef},
# NAME LABEL ICON
{cat => ['utility', 'アクセサリ', 'applications-utilities']},
{cat => ['development', '開発', 'applications-development']},
{cat => ['education', '教育', 'applications-science']},
{cat => ['game', 'ゲーム', 'applications-games']},
{cat => ['graphics', 'グラフィックス', 'applications-graphics']},
{cat => ['audiovideo', 'マルチメディア', 'applications-multimedia']},
{cat => ['network', 'ネットワーク', 'applications-internet']},
{cat => ['office', 'オフィス', 'applications-office']},
{cat => ['other', 'その他', 'applications-other']},
{cat => ['settings', '設定', 'gnome-settings']},
{cat => ['system', 'システム', 'applications-system']},
{sep => undef},
{pipe => ['am-conky-pipemenu', 'Conky', 'conky']},
{begin_cat => ['環境設定', 'theme']},
{item => ['nitrogen', 'Nitrogen', 'nitrogen']},
{item => ['lxappearance', 'Lxappearance', 'theme']},
{item => ['system-config-printer', '印刷', 'printer']},
{item => ['xfce4-settings-manager', 'Xfce4 設定マネージャ', 'preferences-desktop']},
{sep => undef},
{pipe => ['am-compositor', 'Compositor', 'compton']},
{begin_cat => ['Openbox', 'openbox']},
{item => ["$editor ~/.config/openbox/menu.xml", 'Edit menu.xml', 'text-xml']},
{item => ["$editor ~/.config/openbox/rc.xml", 'Edit rc.xml', 'text-xml']},
{item => ["$editor ~/.config/openbox/autostart", 'Edit autostart', 'text-xml']},
{sep => undef},
{item => ['obmenu3', 'GUI Menu Editor', 'theme']},
{item => ['obconf', 'GUI Config Tool', 'theme']},
{item => ['obkey', 'GUI Keybinds', 'theme']},
{sep => undef},
{item => ['openbox --restart', 'Restart Openbox', 'openbox']},
{item => ['openbox --reconfigure', 'Reconfigure Openbox', 'openbox']},
{end_cat => undef},
{pipe => ['am-tint2-pipemenu', 'Tint2', 'tint2']},
{item => ['tint2conf', 'Tint2 GUI', 'tint2conf']},
{sep => undef},
{pipe => ['am-kb-pipemenu', 'Display Keybinds', 'cs-keyboard']},
{begin_cat => ['Obmenu-Generator', 'menu-editor']},
{item => ["$editor ~/.config/obmenu-generator/schema.pl", 'Menu Schema', 'text-x-source']},
{item => ["$editor ~/.config/obmenu-generator/config.pl", 'Menu Config', 'text-x-source']},
#{sep => undef},
#{item => ['obmenu-generator -p', 'Generate a pipe menu', 'menu-editor']},
#{item => ['obmenu-generator -s -c', 'Generate a static menu', 'menu-editor']},
#{item => ['obmenu-generator -p -i', 'Generate a pipe menu with icons', 'menu-editor']},
#{item => ['obmenu-generator -s -i -c', 'Generate a static menu with icons', 'menu-editor']},
{item => ['python ~/ObmenuJapanize.py', 'メニュー更新', 'menu-editor']},
{sep => undef},
{item => ['obmenu-generator -d', 'Refresh Icon Set', 'gtk-refresh']},
{end_cat => undef},
{end_cat => undef},
{sep => undef},
{item => ['arcolinux-logout', 'スクリーンロック', 'lock']},
{item => ['arcolinux-logout', '終了', 'exit']},
]
上記は、「ArcoLinux 20.07.5」に書き換えました(2020年9月1日)。
87~92行は、メニューの更新を次ページに紹介する「ObmenuJapanize.py」で更新するようにしました。
どうも「~/」がうまく機能していないので、絶対パスで記述しないとうまくいかないかもしれません。
100~101行は、「ArcoLinux 19.12.15」時点では、下記のように記述していました。
{item => ['slimlock', 'スクリーンロック', 'lock']},
{item => ['oblogout', '終了', 'exit']},
|