1
Fork 0
mirror of https://github.com/RGBCube/random-scripts synced 2025-05-14 02:54:58 +00:00

feat: entry separator

This commit is contained in:
RGBCube 2025-05-06 15:28:16 +03:00
parent ac84d03222
commit 23e3553405
No known key found for this signature in database

View file

@ -4,6 +4,8 @@ local location = "lalamo.txt"
local modifier = {"cmd", "ctrl"} local modifier = {"cmd", "ctrl"}
-- The key after the modifiers nescessary to trigger the prompt. -- The key after the modifiers nescessary to trigger the prompt.
local key = "p" local key = "p"
-- The separator used to split entries in the location.
local entry_separator = "%%%"
_G.hs = _G.hs or {} _G.hs = _G.hs or {}
@ -61,7 +63,7 @@ local fuzzySearch = function()
return return
end end
local entries = split(content, "%%%", true) local entries = split(content, entry_separator, true)
if #entries == 0 then if #entries == 0 then
hs.alert.show("~/" .. location .. " is empty") hs.alert.show("~/" .. location .. " is empty")