Fixed global definitions

This commit is contained in:
Yessiest 2021-11-14 18:27:27 +04:00
parent 00aaec4c6b
commit fe86c41ced
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ local function loader(options)
--This causes a (barely noticeable) slowdown while loading, but it prevents a race condition which causes crashes occasional crashes on slow devices.
--specify a sensible path
local programs_path = (options.links_dir or ((globalopts and globalopts.config_dir) or os.getenv("HOME").."/.awesome").."/links")
local programs_path = (options.links_dir or ((global and global.config_dir) or os.getenv("HOME").."/.awesome").."/links")
--add a slash at the end if one isn't set
local programs_path = programs_path..((not programs_path:match("/$")) and "/")
local programs = synchronous_ls(programs_path)

View File

@ -1,5 +1,5 @@
local dkjson = require("dkjson")
local handler = io.open(global.widget_config_dir.."stickers.json","r")
local handler = io.open(global.config_dir.."stickers.json","r")
local stickers = {}
local objects = {}
if handler then
@ -47,7 +47,7 @@ return function(s)
stickers[type][id].height = obj.height
end
end
local handler = io.open(global.widget_config_dir.."stickers.json","w")
local handler = io.open(global.config_dir.."stickers.json","w")
handler:write(dkjson.encode(stickers) or "")
handler:close()
end)