summaryrefslogtreecommitdiff
path: root/pkgs/astal/src/widget
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/astal/src/widget')
-rw-r--r--pkgs/astal/src/widget/deck/notifications.lua1
-rw-r--r--pkgs/astal/src/widget/launcher.lua10
2 files changed, 5 insertions, 6 deletions
diff --git a/pkgs/astal/src/widget/deck/notifications.lua b/pkgs/astal/src/widget/deck/notifications.lua
index 7788f0b..81a5c04 100644
--- a/pkgs/astal/src/widget/deck/notifications.lua
+++ b/pkgs/astal/src/widget/deck/notifications.lua
@@ -1,7 +1,6 @@
local astal = require("astal")
local Widget = require("astal.gtk3").Widget
local Gtk = require("astal.gtk3").Gtk
-local Variable = require("astal").Variable
local Notifd = astal.require("AstalNotifd")
local lib = require("lib")
local bind = astal.bind
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