From 60a262fb39b12ed077f1f3ef26ad4225b48eec57 Mon Sep 17 00:00:00 2001 From: Stasky745 Date: Fri, 17 May 2024 17:17:00 +0200 Subject: [PATCH] Add the argument to ignore CAPS LOCK --- logout-popup-widget/logout-popup.lua | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/logout-popup-widget/logout-popup.lua b/logout-popup-widget/logout-popup.lua index cac304d..54825cf 100644 --- a/logout-popup-widget/logout-popup.lua +++ b/logout-popup-widget/logout-popup.lua @@ -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()