1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-24 11:52:32 +00:00
awesome-copycats/plugins/freedesktop/freedesktop.lua

37 lines
1.7 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
2013-09-13 19:20:22 +00:00
-- the Debian menu together with the rest of the items (11 and 33).
2013-08-04 21:39:49 +00:00
2013-09-13 19:20:22 +00:00
local awful = require("awful")
2013-08-04 21:39:49 +00:00
local beautiful = require("beautiful")
2014-05-10 21:01:13 +00:00
require('plugins.freedesktop')
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-09-07 15:19:55 +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 })