Drop attached file in /etc/menu-methods (executable).
In .awesomerc:

arg = "sort /var/lib/awesome/awesome-commands | awesome-menu -e 'exec ' 
Execute:"

-- 
see shy jo

#!/usr/bin/install-menu
#
# pdmenu menu-method for menus that include X programs

# The verson of the menu package that can process this.
compat="menu-1"

# Include the local preferences, pdmenu only uses the defintion of title().
!include menu.h

# Filename of the file we will generate.
genmenu="awesome-commands.new"

# Where the system wide generated file is placed.
rootprefix="/var/lib/awesome/"
userprefix="."
onlyrunasroot=true

# In what order we output the menus.
treewalk="c(m)"

# Text at the top of the menu.
preoutput=""

# Menus are not included, just a list of commands.
startmenu=""
submenutitle=""
endmenu= ""

# Some munging of the command needed since awesome-menu displays commands;
# remove paths that would make the menu hard to navigate.
function munge($command)=replace(replace($command, "/usr/bin/", ""), 
"/usr/games/", "")

supported
x11=    munge($command) "\n"
# Commented out because most awesome users don't want text programs
# in their awesome menu, probably (becauses the commands are long and
# ugly).
#text=  munge(term()) "\n"
endsupported

# Command to run at end. This overwrites the old file with the new one
# we just made.
postrun="mv -f " prefix() "awesome-commands.new " prefix() "awesome-commands"

Attachment: signature.asc
Description: Digital signature

Reply via email to