diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-18 14:37:15 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-18 14:37:15 +0900 |
| commit | 8ca739f9876ccba212260de61608b681f4ab059c (patch) | |
| tree | 0c7bf3639a5419f96fbc85cf092994fa753e478a /ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua | |
| parent | f3bfd45a0b3e4bfbd38181caccd2083fe723e3e0 (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.lua | 22 |
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 |
