1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-23 03:32:30 +00:00
awesome-copycats/freedesktop/freedesktop.lua

39 lines
1.8 KiB
Lua
Raw Normal View History

2013-08-04 21:39:49 +00: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
-- the Debian menu together with the rest of the items.
local awful = require("awful")
local beautiful = require("beautiful")
require('freedesktop.utils')
require('freedesktop.desktop')
2013-08-18 00:42:42 +00:00
require('freedesktop.menu')
2013-08-04 21:39:49 +00:00
-- require("debian.menu")
2013-08-18 21:26:03 +00: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 21:39:49 +00: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 21:26:03 +00: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 21:39:49 +00: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-08-18 21:26:03 +00:00
mymainmenu = awful.menu.new({ items = menu_items, theme = { width = 150 } })
2013-08-04 21:39:49 +00:00
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = mymainmenu })