Merge pull request #2586 from Sorky/patch-3

awesomerc.lua: show hotkeys popup on mouse screen.   fixes: #2583,   fixes: #2585
This commit is contained in:
Emmanuel Lepage Vallée 2019-01-14 00:29:02 -05:00 committed by GitHub
commit 708e522d56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 4 deletions

View File

@ -14,7 +14,7 @@ local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup").widget
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")
@ -104,11 +104,11 @@ end
-- @DOC_MENU@
-- Create a launcher widget and a main menu
myawesomemenu = {
{ "hotkeys", function() return false, hotkeys_popup.show_help end},
{ "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awesome.conffile },
{ "restart", awesome.restart },
{ "quit", function() awesome.quit() end}
{ "quit", function() awesome.quit() end },
}
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },

View File

@ -6,10 +6,27 @@
-- @module awful.hotkeys_popup
---------------------------------------------------------------------------
local hotkeys_popup = {
widget = require("awful.hotkeys_popup.widget"),
}
--- This is the same as awful.hotkeys_popup.widget.show_help.
--
-- example usage:
--
-- local hotkeys_popup = require("awful.hotkeys_popup")
-- myawesomemenu = {{ "hotkeys", function() hotkeys_popup.show_help() end },
-- -- <more entries>
-- }
--
-- see `awful.hotkeys_popup.widget.show_help` for more information
-- @tparam[opt] client c The hostkeys for the client "c".
-- @tparam[opt] screen s The screen.
-- @tparam[opt=true] boolean show_args.show_awesome_keys Show AwesomeWM hotkeys.
-- When set to `false` only app-specific hotkeys will be shown.
-- @function awful.hotkeys_popup.show_help
-- @see awful.hotkeys_popup.widget.show_help
hotkeys_popup.show_help = hotkeys_popup.widget.show_help
return hotkeys_popup