diff options
Diffstat (limited to 'pkgs/astal/src/widget/launcher.lua')
-rw-r--r-- | pkgs/astal/src/widget/launcher.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/astal/src/widget/launcher.lua b/pkgs/astal/src/widget/launcher.lua index 5258dc2..66fa4b0 100644 --- a/pkgs/astal/src/widget/launcher.lua +++ b/pkgs/astal/src/widget/launcher.lua @@ -25,17 +25,17 @@ local list = text(function(text) return lib.slice(apps:exact_query(text), 0, MAX_ENTRIES) end) -function on_show() +local function on_show() text:set("") selection:set(0) entry:get():grab_focus() end -function hide() +local function hide() visible:set(false) end -function on_enter() +local function on_enter() local found = apps:exact_query(text:get())[selection:get() + 1] if found then found:launch() @@ -43,7 +43,7 @@ function on_enter() end end -function update_pos(change_x, change_y) +local function update_pos(change_x, change_y) local pos = selection:get() local pos_x = (pos % WIDTH) + change_x local pos_y = math.floor(pos / WIDTH) + change_y @@ -57,7 +57,7 @@ function update_pos(change_x, change_y) selection:set(pos) end -function on_key_press(self, event) +local function on_key_press(_, event) if event.keyval == Gdk.KEY_Escape then hide() elseif event.keyval == Gdk.KEY_Return then |