Awesome: Why does awful.hotkeys_popup use notification_opacity

Created on 2 Jan 2017  路  14Comments  路  Source: awesomeWM/awesome

This seems at least surprising. I wouldn't consider this a notification. Can it use its own beautiful key instead?
https://github.com/awesomeWM/awesome/blob/3fea2db8c5f8cd5a2f3ed463fe57dcdc673c3afc/lib/awful/hotkeys_popup/widget.lua#L338

Most helpful comment

i was thinking what it should take notifications style since it's, like a notification, some overlay information (but failed the implementation a bit :-) )

mb the best strategy will be to have its own theme keys for hotkeys window but fallback to notification ones if they are not defined?

All 14 comments

And its own border_width, border_color and bg_color. At the moment, hotkeys_popup looks alien, even with the default theme.

CC @actionless

i was thinking what it should take notifications style since it's, like a notification, some overlay information (but failed the implementation a bit :-) )

mb the best strategy will be to have its own theme keys for hotkeys window but fallback to notification ones if they are not defined?

mb the best strategy will be to have its own theme keys for hotkeys window but fallback to notification ones if they are not defined?

Makes sense to me.

@actionless something like

opacity = beautiful.hotkeys_popup_opecity or beautiful.notification_opacity or 1

?

And if you're on it could you please also make the fonts configurable?

@funeralismatic yup
@wimstefan yup

@actionless By the way, naughty doesn't have a beautiful.notification_opacity setting.

@actionless Can you add option to show only focused client keys (if any) ?

i've just realized what that part of the widget is undocumented 馃樋

you can set up rules for application hotkeys blocks following this usage example:
https://github.com/awesomeWM/awesome/blob/master/lib/awful/hotkeys_popup/keys/vim.lua#L9-L21

and just for the reference the implementation:
https://github.com/awesomeWM/awesome/blob/master/lib/awful/hotkeys_popup/widget.lua#L394-L406

@actionless sorry for not being descriptive. I mean option to display only defined keybindings for third-party applications (without awesome keys). This should not be difficult to implement.

@mindeunix
what kind of api do you expect for that?
i can do some option like "rule_for_awesome_keys"

or since it's possible to create multiple instances of the widget, i can add an option to completely not display awesome hotkeys for that instance of the widget

good question, maybe this one:

local hotkeys_popup = require("awful.hotkeys_popup.widget")
local urxvt_rule_any = {class={"URxvt", "urxvt"}, hide_others=true}
for group_name, group_data in pairs({
        ["URxvt"] = { color="#659FdF", rule_any=urxvt_rule_any },
        ["ZSH"]   = { color="#cF4F40", rule_any=urxvt_rule_any }
}) do
    hotkeys_popup.group_rules[group_name] = group_data
end

what about this?

local hotkeys_popup = require("awful.hotkeys_popup.widget")
local urxvt_rule_any = {class={"URxvt", "urxvt"}}
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

because that behavior is not part of a client-matching rule, but of hotkey group

Was this page helpful?
0 / 5 - 0 ratings

Related issues

doronbehar picture doronbehar  路  5Comments

ryukinix picture ryukinix  路  5Comments

SethBarberee picture SethBarberee  路  3Comments

xordspar0 picture xordspar0  路  5Comments

blkdr picture blkdr  路  5Comments