From 1ab1ca007d0073ccf07d8c8e4e61bced5deb7d0e Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Fri, 20 Jun 2025 16:16:16 -0400 Subject: make astal launcher wrap with arrow keys --- pkgs/astal/src/lib.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pkgs/astal/src/lib.lua') diff --git a/pkgs/astal/src/lib.lua b/pkgs/astal/src/lib.lua index 98a5ecc..23c5dd1 100644 --- a/pkgs/astal/src/lib.lua +++ b/pkgs/astal/src/lib.lua @@ -103,6 +103,16 @@ lib = { return lib.count(array) == 0 end, + --- clamps a number between two other numbers + clamp = function(num, low, high) + if low and num < low then + return low + elseif high and num > high then + return high + end + return num + end, + --- negates value neg = function(val) return not val -- cgit v1.2.3-freya