From f3b84c71966a3b2a450ca29d00a1bd4d2760c03b Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 2 Nov 2017 03:49:02 +0100 Subject: Help improved --- rc.lua | 114 +++++++++++++++++------------------------------------------------ 1 file changed, 30 insertions(+), 84 deletions(-) diff --git a/rc.lua b/rc.lua index d41a6fb..9903f14 100644 --- a/rc.lua +++ b/rc.lua @@ -417,110 +417,56 @@ function showHide() end +local rule_any2 = {class={"Weechat", "weechat"}} +for group_name, group_data in pairs({ + ["Weechat"] = { color="#659FdF", rule_any=urxvt_rule_any} +}) do + hotkeys_popup.group_rules[group_name] = group_data +end -function show_awesome_help() ---[[ - for group_name, group_data in pairs({ - ["URxvt"] = { color="#659FdF", rule_any=urxvt_rule_any, hide_others=true }, - ["ZSH"] = { color="#cF4F40", rule_any=urxvt_rule_any, hide_others=true } - }) do - hotkeys_popup.group_rules[group_name] = group_data - end - hotkeys_popup.group_rules["client"] = nil - hotkeys_popup.group_rules["launcher"] = nil - hotkeys_popup.group_rules["tag"] = nil - - local vim_keys = { - ["tag"] = { } - } ---]] - local test = hotkeys.widget:new() - ---[[ -local urxvt_keys = { - ["URxvt"] = { +local own_rule_any = { + ["Weechat"] = { { - modifiers = { "Mod1" }, + modifiers = { "Alt" }, keys = { - c = "copy", - v = "Paste" + Left = "Tampon précédent" } }, { - modifiers = {"Mod1", "Shift"}, - keys = { - v = "Paste escaped" - } - } - }, - ["ZSH"] = { - { - modifiers = {}, + modifiers = {"Alt"}, keys = { - Home = "Beginning of line", - End = "End of line", - Insert = "Overwrite mode", - Delete = "Delete char", - Left = "Backward char", - Right = "Forward char", - Prior = "Beginning of buffer or history", - Next = "End of buffer or history", + Right = "Tampon suivant" } }, { - modifiers = { "Mod1" }, - keys = { - Down = "Beginning of line", - Up = "End of line", - Left = "Backward word", - Right = "Forward word" - } + modifiers = {"F7"}, + keys = { v = "Fenêtre précédente" } }, { - modifiers = { "Control" }, - keys = { - k = "Kill whole line", - l = "clear screen" - } - } - }, - ["tag"] = { + modifiers = {"F8"}, + keys = { v = "Fenêtre suivante" } + }, { - modifiers = {}, - keys = { - Home = "Beginning of line", - End = "End of line", - Insert = "Overwrite mode", - Delete = "Delete char", - Left = "Backward char", - Right = "Forward char", - Prior = "Beginning of buffer or history", - Next = "End of buffer or history", - } + modifiers = {"F11"}, + keys = { v = "Pseudo précédente" } }, { - modifiers = { "Mod1" }, - keys = { - Down = "Beginning of line", - Up = "End of line", - Left = "Backward word", - Right = "Forward word" - } + modifiers = {"F12"}, + keys = { v = "Pseudo suivant" } }, { - modifiers = { "Control" }, + modifiers = {"Alt"}, keys = { - k = "Kill whole line", - l = "clear screen" + a = "Sauter au " } } - }, - + } } - test:add_hotkeys(urxvt_keys) - --]] - test:show_help(test) -end +hotkeys_popup.add_hotkeys(own_rule_any) + + + + layoutKkb = 1 @@ -530,7 +476,7 @@ layoutKkb = 1 -- {{{ Key bindings globalkeys = awful.util.table.join( -awful.key({ modkey, "Shift" }, "s", show_awesome_help , {description="Show help", group="awesome"}), +awful.key({ modkey, "Shift" }, "s", hotkeys_popup.show_help, {description="Show help", group="awesome"}), awful.key({ modkey, }, "Escape", awful.tag.history.restore --[[, {description = "go back", group = "tag"} --]]), -- cgit v1.2.3