From cf5b0b51ef5350a2b54d7018a37471eb2f132fc6 Mon Sep 17 00:00:00 2001 From: Sorky <43520033+Sorky@users.noreply.github.com> Date: Mon, 14 Jan 2019 11:47:33 +1100 Subject: [PATCH 1/3] Update awesomerc.lua Alternative fix for hotkey_popup via awful menu showing on wrong screen --- awesomerc.lua | 4 ++-- lib/awful/hotkeys_popup/init.lua | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/awesomerc.lua b/awesomerc.lua index 4073796fc2..dd01ec98b4 100644 --- a/awesomerc.lua +++ b/awesomerc.lua @@ -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,7 +104,7 @@ 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 }, diff --git a/lib/awful/hotkeys_popup/init.lua b/lib/awful/hotkeys_popup/init.lua index 359149a781..2e61e5cc30 100644 --- a/lib/awful/hotkeys_popup/init.lua +++ b/lib/awful/hotkeys_popup/init.lua @@ -6,10 +6,20 @@ -- @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 }, +-- -- +-- } +-- +-- see `awful.hotkeys_popup.widget.show_help` for more information + hotkeys_popup.show_help = hotkeys_popup.widget.show_help return hotkeys_popup From fec7aaa569766ce1a784afa5059a5c54bf448c54 Mon Sep 17 00:00:00 2001 From: Sorky <43520033+Sorky@users.noreply.github.com> Date: Sun, 13 Jan 2019 23:52:21 -0500 Subject: [PATCH 2/3] Unify the myawesomemenu style --- awesomerc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awesomerc.lua b/awesomerc.lua index dd01ec98b4..6d085b5264 100644 --- a/awesomerc.lua +++ b/awesomerc.lua @@ -108,7 +108,7 @@ myawesomemenu = { { "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 }, From 4b76ca9d385236e0ba5b6f83c3a8fae9c64a701e Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 13 Jan 2019 23:56:11 -0500 Subject: [PATCH 3/3] doc: Fix awful.hotkeys_popup.show_help formatting. --- lib/awful/hotkeys_popup/init.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/awful/hotkeys_popup/init.lua b/lib/awful/hotkeys_popup/init.lua index 2e61e5cc30..182fe5abc6 100644 --- a/lib/awful/hotkeys_popup/init.lua +++ b/lib/awful/hotkeys_popup/init.lua @@ -10,15 +10,22 @@ local hotkeys_popup = { widget = require("awful.hotkeys_popup.widget"), } ---- This is the same as awful.hotkeys_popup.widget.show_help +--- 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 }, -- -- -- } -- -- 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