summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-18 14:37:15 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-18 14:37:15 +0900
commit8ca739f9876ccba212260de61608b681f4ab059c (patch)
tree0c7bf3639a5419f96fbc85cf092994fa753e478a /ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua
parentf3bfd45a0b3e4bfbd38181caccd2083fe723e3e0 (diff)
modified core/autocmds.lua, modified plugins/neo-tree.lua, modified plugins/urlview.lua
Diffstat (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua')
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua22
1 files changed, 15 insertions, 7 deletions
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