Open xbz-24 opened 11 months ago
-- Find the Discord socket from temp runtime directories function Presence:get_discord_socket_path() local sock_name = "discord-ipc-0" local sock_path = nil
if self.os.is_wsl then
-- Use socket created by relay for WSL
sock_path = "/var/run/"..sock_name
elseif self.os.name == "windows" then
-- Use named pipe in NPFS for Windows
sock_path = [[\\.\pipe\]]..sock_name
elseif self.os.name == "macos" then
-- Use $TMPDIR for macOS
local path = os.getenv("TMPDIR")
if path then
sock_path = path:match("/$")
and path..sock_name
or path.."/"..sock_name
end
elseif self.os.name == "linux" then
-- Check various temp directory environment variables
local env_vars = {
"XDG_RUNTIME_DIR",
"TEMP",
"TMP",
"TMPDIR",
}
for i = 1, #env_vars do
local var = env_vars[i]
local path = os.getenv(var)
if path then
self.log:debug(string.format("Using runtime path: %s", path))
sock_path = path:match("/$") and path..sock_name or path.."/"..sock_name
break
end
end
end
return sock_path
end
this part of the code is not working, can someone help me fix this?
guys I need help
[daily@dev presence]$ find /run/user/$(id -u) -name "discord-ipc-0" find: ‘/run/user/1000’: No such file or directory [daily@dev presence]$ echo $XDG_RUNTIME_DIR echo $TEMP echo $TMP echo $TMPDIR
[daily@dev presence]$
-- Find the Discord socket from temp runtime directories function Presence:get_discord_socket_path() local sock_name = "discord-ipc-0" local sock_path = nil
if self.os.is_wsl then
-- Use socket created by relay for WSL
sock_path = "/var/run/"..sock_name
elseif self.os.name == "windows" then
-- Use named pipe in NPFS for Windows
sock_path = [[\\.\pipe\]]..sock_name
elseif self.os.name == "macos" then
-- Use $TMPDIR for macOS
local path = os.getenv("TMPDIR")
if path then
sock_path = path:match("/$")
and path..sock_name
or path.."/"..sock_name
end
elseif self.os.name == "linux" then
-- Check various temp directory environment variables
local env_vars = {
"XDG_RUNTIME_DIR",
"TEMP",
"TMP",
"TMPDIR",
}
for i = 1, #env_vars do
local var = env_vars[i]
local path = os.getenv(var)
if path then
self.log:debug(string.format("Using runtime path: %s", path))
sock_path = path:match("/$") and path..sock_name or path.."/"..sock_name
break
end
end
end
return sock_path
end
I tried echoing these enviroment variables none of them worked
Description
im using standard build standard setup, I have used discord RPC before in other OS and have worked fine (mint, windows) , but since I installed artix I tried to install my favorite plugin and its not working when I do :messages in nvim i get:
[presence.nvim] Setting up plugin for linux [presence.nvim] Failed to determine Discord IPC socket path [presence.nvim] Using id 99298229-b853-403f-a2a0-91503a0630ff [presence.nvim] Completed plugin setup [presence.nvim] Getting nvim socket paths... [presence.nvim] Executing command:
ss -lx|grep "nvim.*/0"
[presence.nvim] Custom setup not detected, using defaults [presence.nvim] Handling BufEnter event... [presence.nvim] Discord IPC socket not found, skipping... [presence.nvim] Got nvim socket paths: {} [presence.nvim] No other remote nvim instances [presence.nvim] Handling FocusGained event... [presence.nvim] Discord IPC socket not found, skipping... [presence.nvim] Handling FocusGained event... [presence.nvim] Discord IPC socket not found, skipping... [presence.nvim] Handling FocusGained event... [presence.nvim] Discord IPC socket not found, skipping... Press ENTER or type command to continuePlease help I have been very interested in using this amoing LunarVim but since its not working there as well I tried deleting all my config for neovim just to set this up properly and avoid other errors but still didnt found out a solution, theres probably a package im missing or my directories are named other way since Artix is not a popular distro, please let me know which parts of the code I need to analyze and fix to make this work since this is my favorite plugin
Neovim version
OS information
Artix x86_64, 6.5.7-artix-1-1 with runit init system
Steps to reproduce
call plug#begin('~/.config/nvim/plugged') Plug 'git@github.com:andweeb/presence.nvim.git' call plug#end()
let g:presence_auto_update = 1 let g:presence_neovim_image_text = "Editando con Neovim" let g:presence_main_image = "neovim" let g:presence_enable_line_number = 0 let g:presence_show_time = 1
let g:presence_editing_text = "Editando %s" let g:presence_reading_text = "Leyendo %s" let g:presence_log_level = "debug"
Logs