fix(hotkeys: tmux): don't show tmux hotkeys if no rule was specified by user

This commit is contained in:
actionless 2018-11-09 06:08:48 +01:00
parent 6cdd737c4a
commit c425575cae
1 changed files with 5 additions and 2 deletions

View File

@ -14,10 +14,10 @@ local tmux = {}
-- --
-- For example: -- For example:
-- --
-- tmux.add_rules_for_terminal({ rule = { name = { "tmux" }}}) -- tmux.add_rules_for_terminal({ rule = { name = "tmux" }})
-- --
-- will show tmux hotkeys for any window that has 'tmux' in its title. -- will show tmux hotkeys for any window that has 'tmux' in its title.
-- If no rules are provided then tmux hotkeys will be shown always! -- If no rules are provided then tmux hotkeys won't be shown.
-- @function add_rules_for_terminal -- @function add_rules_for_terminal
-- @see awful.rules.rules -- @see awful.rules.rules
-- @tparam table rule Rules to match a window containing a tmux session. -- @tparam table rule Rules to match a window containing a tmux session.
@ -32,6 +32,9 @@ function tmux.add_rules_for_terminal(rule)
end end
end end
-- don't show hotkeys by default
tmux.add_rules_for_terminal({rule={focusable=false}})
local tmux_keys = { local tmux_keys = {
["tmux: sessions"] = {{ ["tmux: sessions"] = {{
modifiers = {}, modifiers = {},