1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-23 19:42:30 +00:00
awesome-copycats/freedesktop/freedesktop.lua
2013-08-04 23:39:49 +02:00

39 lines
1.6 KiB
Lua

-- 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
-- the Debian menu together with the rest of the items.
local awful = require("awful")
local beautiful = require("beautiful")
require('freedesktop.utils')
require('freedesktop.menu')
require('freedesktop.desktop')
-- require("debian.menu")
freedesktop.utils.terminal = terminal
freedesktop.utils.icon_theme = 'gnome' -- look inside /usr/share/icons/, default: nil (don't use icon theme)
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
freedesktop.desktop.add_applications_icons({screen = s, showlabels = true})
freedesktop.desktop.add_dirs_and_files_icons({screen = s, showlabels = true})
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' }) })
mymainmenu = awful.menu.new({ items = menu_items, width = 200 })
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = mymainmenu })