Use get_cache_dir() where appropriate

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2018-03-11 16:07:36 +01:00
parent 3e7ab86fae
commit c8d6b7d28a
4 changed files with 5 additions and 5 deletions

View File

@ -130,7 +130,7 @@ local function load_count_table()
return instance.count_table return instance.count_table
end end
instance.count_table = {} instance.count_table = {}
local count_file_name = gfs.get_dir("cache") .. "/menu_count_file" local count_file_name = gfs.get_cache_dir() .. "/menu_count_file"
local count_file = io.open (count_file_name, "r") local count_file = io.open (count_file_name, "r")
if count_file then if count_file then
for line in count_file:lines() do for line in count_file:lines() do
@ -146,7 +146,7 @@ end
local function write_count_table(count_table) local function write_count_table(count_table)
count_table = count_table or instance.count_table count_table = count_table or instance.count_table
local count_file_name = gfs.get_dir("cache") .. "/menu_count_file" local count_file_name = gfs.get_cache_dir() .. "/menu_count_file"
local count_file = assert(io.open(count_file_name, "w")) local count_file = assert(io.open(count_file_name, "w"))
for name, count in pairs(count_table) do for name, count in pairs(count_table) do
local str = string.format("%s;%d\n", name, count) local str = string.format("%s;%d\n", name, count)

View File

@ -54,7 +54,7 @@ local gfs = require("gears.filesystem") --DOC_HIDE
prompt = "<b>Run: </b>", prompt = "<b>Run: </b>",
hooks = hooks, hooks = hooks,
textbox = atextbox, textbox = atextbox,
history_path = gfs.get_dir("cache") .. "/history", history_path = gfs.get_cache_dir() .. "/history",
done_callback = clear, done_callback = clear,
} }

View File

@ -24,7 +24,7 @@ local naughty = {} --DOC_HIDE
end end
end, end,
textbox = atextbox, textbox = atextbox,
history_path = gfs.get_dir("cache") .. "/history", history_path = gfs.get_cache_dir() .. "/history",
} }
parent:add( wibox.widget { --DOC_HIDE parent:add( wibox.widget { --DOC_HIDE

View File

@ -44,7 +44,7 @@ local terminal = "xterm" --DOC_HIDE
end}, end},
}, },
textbox = atextbox, textbox = atextbox,
history_path = gfs.get_dir('cache') .. '/history', history_path = gfs.get_cache_dir() .. '/history',
exe_callback = function(cmd) awful.spawn(cmd) end exe_callback = function(cmd) awful.spawn(cmd) end
} }