diff options
author | Freya Murphy <freya@freyacat.org> | 2025-06-20 16:16:16 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-06-20 16:16:16 -0400 |
commit | 1ab1ca007d0073ccf07d8c8e4e61bced5deb7d0e (patch) | |
tree | 8e7b67455d192b3114744ec6d519b8d6f8162c04 /pkgs/astal/src/lib.lua | |
parent | fix astal notification text justification (diff) | |
download | dotfiles-nix-1ab1ca007d0073ccf07d8c8e4e61bced5deb7d0e.tar.gz dotfiles-nix-1ab1ca007d0073ccf07d8c8e4e61bced5deb7d0e.tar.bz2 dotfiles-nix-1ab1ca007d0073ccf07d8c8e4e61bced5deb7d0e.zip |
make astal launcher wrap with arrow keys
Diffstat (limited to 'pkgs/astal/src/lib.lua')
-rw-r--r-- | pkgs/astal/src/lib.lua | 10 |
1 files changed, 10 insertions, 0 deletions
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 |