Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

awesomerc.lua: show hotkeys popup on mouse screen. fixes: #2583, fixes: #2585 #2586

Merged
merged 3 commits into from
Jan 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions awesomerc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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 },
Expand Down
19 changes: 18 additions & 1 deletion lib/awful/hotkeys_popup/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down