awesome-copycats/freedesktop/freedesktop.lua

37 lines
1.7 KiB
Lua
Raw Normal View History

2013-08-04 23:39:49 +02:00
-- This is an usage example
-- Modify according to your preferences
-- If you are a Debian user, you can also uncomment the two lines that insert
2013-09-13 21:20:22 +02:00
-- the Debian menu together with the rest of the items (11 and 33).
2013-08-04 23:39:49 +02:00
2013-09-13 21:20:22 +02:00
local awful = require("awful")
2013-08-04 23:39:49 +02:00
local beautiful = require("beautiful")
2013-09-13 21:20:22 +02:00
require('freedesktop')
2013-08-04 23:39:49 +02:00
-- require("debian.menu")
2013-08-18 23:26:03 +02:00
freedesktop.utils.terminal = terminal -- defined in rc.lua, otherwise define it here (default: "xterm")
freedesktop.utils.icon_theme = 'gnome' -- choose your favourite from /usr/share/icons/ (default: nil)
2013-08-04 23:39:49 +02:00
menu_items = freedesktop.menu.new()
myawesomemenu = {
{ "manual", terminal .. " -e man awesome", freedesktop.utils.lookup_icon({ icon = 'help' }) },
{ "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua", freedesktop.utils.lookup_icon({ icon = 'package_settings' }) },
{ "restart", awesome.restart, freedesktop.utils.lookup_icon({ icon = 'gtk-refresh' }) },
{ "quit", awesome.quit, freedesktop.utils.lookup_icon({ icon = 'gtk-quit' }) }
}
for s = 1, screen.count() do
2013-08-18 23:26:03 +02:00
--freedesktop.desktop.add_application_icons({screen = s, showlabels = true})
--freedesktop.desktop.add_dirs_and_file_icons({screen = s, showlabels = true})
freedesktop.desktop.add_desktop_icons({screen = s, showlabels = true})
2013-08-04 23:39:49 +02:00
end
table.insert(menu_items, { "awesome", myawesomemenu, beautiful.awesome_icon })
table.insert(menu_items, { "open terminal", terminal, freedesktop.utils.lookup_icon({icon = 'terminal'}) })
-- table.insert(menu_items, { "Debian", debian.menu.Debian_menu.Debian, freedesktop.utils.lookup_icon({ icon = 'debian-logo' }) })
2013-09-07 17:19:55 +02:00
mymainmenu = awful.menu.new({ items = menu_items, theme = { width = 150 } })
2013-08-04 23:39:49 +02:00
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = mymainmenu })