From 8ca739f9876ccba212260de61608b681f4ab059c Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 18 Jun 2025 14:37:15 +0900 Subject: modified core/autocmds.lua, modified plugins/neo-tree.lua, modified plugins/urlview.lua --- .../TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua') diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua index 00d04b5..907a58e 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua @@ -78,13 +78,21 @@ return { end local actions = require("urlview.actions") - actions["firefox_tmux"] = function(url) - vim.fn.jobstart({ - "firefox", - "--profile", - vim.fn.expand("~/.mozilla/firefox/si.tmux"), - url, - }, { detach = true }) + actions["browser_tmux"] = function(url) + local browser = vim.env.BROWSER or "firefox" + local cmd = { "setsid", "-f", browser } + + if browser:match("firefox") then + table.insert(cmd, "--profile") + table.insert(cmd, vim.fn.expand("~/.mozilla/firefox/si.tmux")) + elseif browser:match("librewolf") then + table.insert(cmd, "--profile") + table.insert(cmd, vim.fn.expand("~/.librewolf/si.tmux")) + end + + table.insert(cmd, url) + + vim.fn.jobstart(cmd, { detach = true }) end -- Load urlview -- cgit v1.2.3