awesome 3 debian menu

MasterRay posted @ 2010年4月30日 10:03 in 未分类 with tags awesome debian menu window manager , 14773 阅读

awesome 3 里可以启用 debian menu,方法是新建一个带 x 属性的文件

#!/usr/bin/install-menu
# this file has to be executable
# put under ~/.menu-methods
# will run by update-menus
# default generate ~/.config/awesome/menu.lua
# you need to require("menu") to use menu.debian_menu

compat="menu-1"

!include menu.h

compat="menu-2"
outputencoding= "UTF-8";

function q($s) = "\"" esc($s,"\\\"") "\"";
function s($s) = replacewith(replacewith($s,"/","_"), " ", "_");
function findicon($filename)= 
       ifelsefile($filename, q($filename),
        iffile("/usr/share/pixmaps/" $filename,
                   q("/usr/share/pixmaps/" $filename)));
function x11menu()= "\t{"q(title())","q($command) ifnempty($icon, ","findicon($icon))"},\n";
function textmenu()= "\t{"q(title())", \"x-terminal-emulator -e \".."q($command) ifnempty($icon, ","findicon($icon))"},\n";

supported;
    x11= x11menu();
    text= textmenu();
endsupported;

startmenu=      s($section)" = {\n";
endmenu=        "}\n";
submenutitle=   "\t{"q(title())","s($section)"},\n";
genmenu=        "menu.lua";
rootsection=    "debian_menu";
userprefix=     "/.config/awesome/";
preoutput=      "-- automatically generated file. Do not edit (see /usr/share/doc/menu/html)\n\nmodule(\"menu\")\n\n";

放在 ~/.menu-methods下,然后运行

$ update-menus
这样就会在 ~/.config/awesome 下面建立 menu.lua,然后在 lua.rc 里做如下修改:
-- Load Debian menu entries
require("debian.menu")



mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
                                    { "open terminal", terminal },
   				    { "debian", debian.menu.Debian_menu.Debian }
                                  }
                        })

参考:http://awesome.naquadah.org/wiki/Awful.menu

 

Avatar_small
依云 说:
2011年9月07日 01:51

Arch 版的: http://lilydjwg.is-programmer.com/2011/9/7/generate-Application-menu-for-awesome.29327.html

Avatar_small
carpet cleaning duba 说:
2019年11月18日 01:21

Some of our mattress maintenance treatment process is dry together with environmental safe. You will immediately use your mattress subsequent to cleaning. We take advantage of medical mark mattress sterilizing technology implementing advanced Germicidal Especially Violet Brightness technology which is designed to prevent any growth for living orgasm during the mattress. Our mattress model cleaning treatment are usually scheduled and your own benefits in Dubai. It takes only a fifty percent of hour that will sanitize an individual's bed wholly.

Avatar_small
live in maids dubai 说:
2021年1月27日 21:16

House maid agencies are actually booming in most important spot from the world. If you are a employer searching for that house maid agency in order to trust and assist you to on your own maid needs, there's absolutely nothing preventing a person from obtaining one. They are all around the world, especially within the cyber globe. With a lot of options close to.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter