From 796845e1a102ad882abaa6e947abf9aa74817ab5 Mon Sep 17 00:00:00 2001 From: Kasper Date: Wed, 19 Jan 2022 09:12:43 +0200 Subject: [PATCH] App launcher 4 (#149) * Make the wibox type customizable * Not used * No needs for a case insensitive pattern --- widget/app_launcher/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/widget/app_launcher/init.lua b/widget/app_launcher/init.lua index 7eeaf17..b74c2ab 100644 --- a/widget/app_launcher/init.lua +++ b/widget/app_launcher/init.lua @@ -281,8 +281,8 @@ local function search(self, text) text = text:gsub( "%W", "" ) -- Check if there's a match by the app name or app command - if string.find(entry.name, case_insensitive_pattern(text)) ~= nil or - self.search_commands and string.find(entry.commandline, case_insensitive_pattern(text)) ~= nil + if string.find(entry.name:lower(), text:lower(), 1, true) ~= nil or + self.search_commands and string.find(entry.commandline, text:lower(), 1, true) ~= nil then table.insert(self._private.matched_entries, { name = entry.name, @@ -498,7 +498,6 @@ local function scroll_right(self) local rows, columns = self._private.grid:get_dimension() local pos = self._private.grid:get_widget_position(self._private.active_widget) local is_less_than_max_column = pos.col < columns - local is_less_than_max_page = self._private.current_page < self._private.pages_count -- Check if we can scroll down the app list if is_less_than_max_column then @@ -773,6 +772,7 @@ local function new(args) args.icon_theme = args.icon_theme or nil args.icons_size = args.icons_size or nil + args.type = args.type or "dock" args.show_on_focused_screen = args.show_on_focused_screen == nil and true or args.show_on_focused_screen args.screen = args.screen or capi.screen.primary args.placement = args.placement or awful.placement.centered @@ -919,7 +919,7 @@ local function new(args) } ret._private.widget = awful.popup { - type = "dock", + type = args.type, visible = false, ontop = true, placement = ret.placement,