Skip to content

Commit

Permalink
Add the argument to ignore CAPS LOCK
Browse files Browse the repository at this point in the history
  • Loading branch information
Stasky745 committed May 17, 2024
1 parent 4d161f8 commit 60a262f
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions logout-popup-widget/logout-popup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 60a262f

Please sign in to comment.