summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-19 14:12:02 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-19 14:12:02 +0900
commit55c70a1e4c1dd035e2c8f9d42c4471e630816d92 (patch)
treebc3e874d4d7753e3fb060db6bd5135cc6a822ca8 /ar/.config/TheSiahxyz/lua
parent41ee40356defa00fe2248065ad43ed7d6d44ea36 (diff)
modified plugins/urlview.lua, created bin/tmuxdbussync
Diffstat (limited to 'ar/.config/TheSiahxyz/lua')
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua
index 907a58e..f13a561 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/urlview.lua
@@ -79,19 +79,19 @@ return {
local actions = require("urlview.actions")
actions["browser_tmux"] = function(url)
- local browser = vim.env.BROWSER or "firefox"
- local cmd = { "setsid", "-f", browser }
+ local cmd
- 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"))
+ if vim.env.TMUX then
+ local dbus_script = vim.fn.expand("~/.local/bin/tmuxdbussync")
+ cmd = {
+ "zsh",
+ "-lc",
+ string.format("source %s && setsid -f xdg-open %q", dbus_script, url),
+ }
+ else
+ cmd = { "setsid", "-f", "xdg-open", url }
end
- table.insert(cmd, url)
-
vim.fn.jobstart(cmd, { detach = true })
end
@@ -107,7 +107,7 @@ return {
-- Command or method to open links with
-- Options: "netrw", "system" (default OS browser), "clipboard"; or "firefox", "chromium" etc.
-- By default, this is "netrw", or "system" if netrw is disabled
- default_action = actions.firefox_tmux,
+ default_action = actions.browser_tmux,
-- Set the register to use when yanking
-- Default: + (system clipboard)
default_register = "+",