From fe86c41ced12871870eeec46474795b08af93eeb Mon Sep 17 00:00:00 2001 From: Yessiest Date: Sun, 14 Nov 2021 18:27:27 +0400 Subject: [PATCH] Fixed global definitions --- widgets/polylauncher.lua | 2 +- widgets/stickers/init.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/widgets/polylauncher.lua b/widgets/polylauncher.lua index 8f5794f..42759f9 100644 --- a/widgets/polylauncher.lua +++ b/widgets/polylauncher.lua @@ -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) diff --git a/widgets/stickers/init.lua b/widgets/stickers/init.lua index cf69807..a71c141 100644 --- a/widgets/stickers/init.lua +++ b/widgets/stickers/init.lua @@ -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)