mirror of
https://github.com/streetturtle/awesome-wm-widgets.git
synced 2024-11-15 19:48:04 +01:00
Add the argument to ignore CAPS LOCK
This commit is contained in:
parent
4d161f8583
commit
60a262fb39
1 changed files with 6 additions and 9 deletions
|
@ -90,15 +90,6 @@ local function launch(args)
|
|||
|
||||
local ignore_case = args.ignore_case or true
|
||||
|
||||
if ignore_case then
|
||||
onlogout_key = string.lower(onlogout_key)
|
||||
onlock_key = string.lower(onlock_key)
|
||||
onreboot_key = string.lower(onreboot_key)
|
||||
onsuspend_key = string.lower(onsuspend_key)
|
||||
onpoweroff_key = string.lower(onpoweroff_key)
|
||||
all_keys = string.lower(all_keys)
|
||||
end
|
||||
|
||||
w:set_bg(bg_color)
|
||||
if #phrases > 0 then
|
||||
phrase_widget:set_markup(
|
||||
|
@ -162,6 +153,12 @@ local function launch(args)
|
|||
else
|
||||
if ignore_case then
|
||||
key = string.lower(key)
|
||||
onlogout_key = string.lower(onlogout_key)
|
||||
onlock_key = string.lower(onlock_key)
|
||||
onreboot_key = string.lower(onreboot_key)
|
||||
onsuspend_key = string.lower(onsuspend_key)
|
||||
onpoweroff_key = string.lower(onpoweroff_key)
|
||||
all_keys = string.lower(all_keys)
|
||||
end
|
||||
|
||||
if key == onpoweroff_key then onpoweroff()
|
||||
|
|
Loading…
Reference in a new issue