Skip to content

Commit 60a262f

Browse files
committed
Add the argument to ignore CAPS LOCK
1 parent 4d161f8 commit 60a262f

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

logout-popup-widget/logout-popup.lua

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,6 @@ local function launch(args)
9090

9191
local ignore_case = args.ignore_case or true
9292

93-
if ignore_case then
94-
onlogout_key = string.lower(onlogout_key)
95-
onlock_key = string.lower(onlock_key)
96-
onreboot_key = string.lower(onreboot_key)
97-
onsuspend_key = string.lower(onsuspend_key)
98-
onpoweroff_key = string.lower(onpoweroff_key)
99-
all_keys = string.lower(all_keys)
100-
end
101-
10293
w:set_bg(bg_color)
10394
if #phrases > 0 then
10495
phrase_widget:set_markup(
@@ -162,6 +153,12 @@ local function launch(args)
162153
else
163154
if ignore_case then
164155
key = string.lower(key)
156+
onlogout_key = string.lower(onlogout_key)
157+
onlock_key = string.lower(onlock_key)
158+
onreboot_key = string.lower(onreboot_key)
159+
onsuspend_key = string.lower(onsuspend_key)
160+
onpoweroff_key = string.lower(onpoweroff_key)
161+
all_keys = string.lower(all_keys)
165162
end
166163

167164
if key == onpoweroff_key then onpoweroff()

0 commit comments

Comments
 (0)