change log path to /tmp/fingers.log and remove /tmp hardcoded path

This commit is contained in:
Jorge Morante 2024-01-12 09:44:12 +01:00
parent 6718322da9
commit 8cfc2bd1ad
1 changed files with 3 additions and 2 deletions

View File

@ -5,10 +5,11 @@ require "file_utils"
module Fingers::Dirs
TMUX_PID = (ENV["TMUX"] || ",0000").split(",")[1]
ROOT = Path["/tmp"] / "tmux-#{TMUX_PID}"
TMP = Path[File.dirname(File.tempname)]
ROOT = TMP / "tmux-#{TMUX_PID}"
LOG_PATH = ROOT / "fingers.log"
CACHE = ROOT / "tmux-fingers"
CACHE = TMP / "tmux-fingers"
CONFIG_PATH = CACHE / "config.json"
SOCKET_PATH = CACHE / "fingers.sock"