diff options
author | Freya Murphy <freya@freyacat.org> | 2025-06-27 16:39:14 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-06-27 16:39:14 -0400 |
commit | 2e4c4298cf84f94d68387e8076fd430e9968ce6c (patch) | |
tree | 2a43fa6d4659fe2585c75aeec3ee4d5e0a42de2e /pkgs | |
parent | fmt (diff) | |
download | dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.tar.gz dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.tar.bz2 dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.zip |
refactor
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/astal/src/launcher.lua | 2 | ||||
-rw-r--r-- | pkgs/astal/src/shell.lua | 1 | ||||
-rw-r--r-- | pkgs/astal/src/widget/deck/notifications.lua | 1 | ||||
-rw-r--r-- | pkgs/astal/src/widget/launcher.lua | 10 |
4 files changed, 5 insertions, 9 deletions
diff --git a/pkgs/astal/src/launcher.lua b/pkgs/astal/src/launcher.lua index 75d9d72..cc16bb9 100644 --- a/pkgs/astal/src/launcher.lua +++ b/pkgs/astal/src/launcher.lua @@ -1,8 +1,6 @@ local App = require("astal.gtk3.app") -local lib = require("lib") App:start({ - css = lib.src("main.css"), main = function() error("must start astal-shell first") end, diff --git a/pkgs/astal/src/shell.lua b/pkgs/astal/src/shell.lua index 4baede7..417f754 100644 --- a/pkgs/astal/src/shell.lua +++ b/pkgs/astal/src/shell.lua @@ -1,6 +1,5 @@ local App = require("astal.gtk3.app") local lib = require("lib") -local Variable = require("astal").Variable local Bar = require("widget.bar") local Corners = require("widget.corners") 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 |