Browse Source

Fixed global definitions

master
Yessiest 3 years ago
parent
commit
fe86c41ced
  1. 2
      widgets/polylauncher.lua
  2. 4
      widgets/stickers/init.lua

2
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)

4
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)

Loading…
Cancel
Save