App launcher 4 (#149)

* Make the wibox type customizable

* Not used

* No needs for a case insensitive pattern
This commit is contained in:
Kasper 2022-01-19 09:12:43 +02:00 committed by GitHub
parent 9b88048ce9
commit 796845e1a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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,