-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.lua
45 lines (40 loc) · 936 Bytes
/
binding.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
local beautiful = require("beautiful")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Enable hotkeys help widget for VIM and other apps
-- when client with a matching name is opened:
require("awful.hotkeys_popup.keys")
-- {{{ Menu
-- Create a launcher widget and a main menu
local myawesomemenu = {
{
"hotkeys",
function()
hotkeys_popup.show_help(nil, awful.screen.focused())
end,
},
{ "restart", awesome.restart },
{
"quit",
function()
awesome.quit()
end,
},
}
local menu_awesome = { "awesome", myawesomemenu, beautiful.awesome_icon }
local mymainmenu = awful.menu({
items = {
menu_awesome,
},
})
-- {{{ Mouse bindings
root.buttons(gears.table.join(
awful.button({}, 3, function()
mymainmenu:toggle()
end),
awful.button({}, 4, awful.tag.viewnext),
awful.button({}, 5, awful.tag.viewprev)
))
-- }}}