From d8043142e31d57275c16185fa44620c7aaf28b21 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Thu, 26 Jun 2025 18:03:55 +0900 Subject: updates --- .../TheSiahxyz/lua/TheSiahxyz/plugins/git.lua | 62 ++++++++++----------- .../TheSiahxyz/lua/TheSiahxyz/plugins/harpoon2.lua | 4 +- .../TheSiahxyz/lua/TheSiahxyz/plugins/keys.lua | 1 + .../TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua | 20 +------ ar/.config/TheSiahxyz/spell/en.utf-8.add | 1 + ar/.config/TheSiahxyz/spell/en.utf-8.add.spl | Bin 1439 -> 1376 bytes ar/.config/zsh/packages.zsh | 1 + ar/.local/bin/tmuxdbussync | 7 +-- 8 files changed, 40 insertions(+), 56 deletions(-) diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua index 399b263..99f77bd 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua @@ -95,37 +95,37 @@ return { vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc }) end - -- stylua: ignore start - map("n", "]h", function() - if vim.wo.diff then - vim.cmd.normal({ "]c", bang = true }) - else - gs.nav_hunk("next") - end - end, "Next hunk") - map("n", "[h", function() - if vim.wo.diff then - vim.cmd.normal({ "[c", bang = true }) - else - gs.nav_hunk("prev") - end - end, "Previous hunk") - map("n", "]H", function() gs.nav_hunk("last") end, "Last hunk") - map("n", "[H", function() gs.nav_hunk("first") end, "First hunk") - map({ "n", "v" }, "gs", ":Gitsigns stage_hunk", "Stage hunk") - map({ "n", "v" }, "gr", ":Gitsigns reset_hunk", "Reset hunk") - map("n", "gS", gs.stage_buffer, "Stage buffer") - map("n", "gu", gs.undo_stage_hunk, "Undo stage hunk") - map("n", "gR", gs.reset_buffer, "Reset buffer") - map("n", "gpv", gs.preview_hunk_inline, "Preview hunk inline") - map("n", "gb", function() gs.blame_line({ full = true }) end, "Blame line") - map("n", "gB", function() gs.blame() end, "Blame buffer") - map("n", "gd", gs.diffthis, "Diff this") - map("n", "gD", function() gs.diffthis("~") end, "Diff this ~") - -- map("n", "gD", function() gs.diffthis("@") end, "Diff this @") - map({ "o", "x" }, "ih", ":Gitsigns select_hunk", "GitSigns select hunk") - map("n", "gtb", gs.toggle_current_line_blame, "Toggle line blame") - map("n", "gtd", gs.toggle_deleted, "Toggle delete") + -- stylua: ignore start + map("n", "]h", function() + if vim.wo.diff then + vim.cmd.normal({ "]c", bang = true }) + else + gs.nav_hunk("next") + end + end, "Next hunk") + map("n", "[h", function() + if vim.wo.diff then + vim.cmd.normal({ "[c", bang = true }) + else + gs.nav_hunk("prev") + end + end, "Previous hunk") + map("n", "]H", function() gs.nav_hunk("last") end, "Last hunk") + map("n", "[H", function() gs.nav_hunk("first") end, "First hunk") + map({ "n", "v" }, "gs", ":Gitsigns stage_hunk", "Stage hunk") + map({ "n", "v" }, "gr", ":Gitsigns reset_hunk", "Reset hunk") + map("n", "gS", gs.stage_buffer, "Stage buffer") + map("n", "gu", gs.undo_stage_hunk, "Undo stage hunk") + map("n", "gR", gs.reset_buffer, "Reset buffer") + map("n", "gpv", gs.preview_hunk_inline, "Preview hunk inline") + map("n", "gb", function() gs.blame_line({ full = true }) end, "Blame line") + map("n", "gB", function() gs.blame() end, "Blame buffer") + map("n", "gd", gs.diffthis, "Diff this") + map("n", "gD", function() gs.diffthis("~") end, "Diff this ~") + -- map("n", "gD", function() gs.diffthis("@") end, "Diff this @") + map({ "o", "x" }, "ih", ":Gitsigns select_hunk", "GitSigns select hunk") + map("n", "gtb", gs.toggle_current_line_blame, "Toggle line blame") + map("n", "gtd", gs.toggle_deleted, "Toggle delete") end, }, init = function() diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/harpoon2.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/harpoon2.lua index 6bf8ef1..1db778f 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/harpoon2.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/harpoon2.lua @@ -78,7 +78,7 @@ return { desc = "Open harpoon list menu", }, { - "", + "", function() require("harpoon"):list():prev({ ui_nav_wrap = false }) end, @@ -86,7 +86,7 @@ return { desc = "Previous harpoon list", }, { - "", + "", function() require("harpoon"):list():next({ ui_nav_wrap = false }) end, diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/keys.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/keys.lua index 9f95e1f..0f95202 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/keys.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/keys.lua @@ -71,6 +71,7 @@ return { { "w", group = "Which-key" }, { "W", group = "Save all" }, { "z", group = "Toggle" }, + { "Z", group = "All buffer" }, { "", group = "Tabs" }, { "", group = "Local Leader (bookmarks)" }, { "", group = "Bookmarks (explorer)" }, diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua index 1bfb434..b1c72f4 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua @@ -77,24 +77,6 @@ return { return urls end - local actions = require("urlview.actions") - actions["browser_tmux"] = function(url) - local cmd - - 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 - - vim.fn.jobstart(cmd, { detach = true }) - end - -- Load urlview require("urlview").setup({ -- Prompt title (` `, e.g. `Buffer Links:`) @@ -107,7 +89,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.browser_tmux, + default_action = "netrw", -- Set the register to use when yanking -- Default: + (system clipboard) default_register = "+", diff --git a/ar/.config/TheSiahxyz/spell/en.utf-8.add b/ar/.config/TheSiahxyz/spell/en.utf-8.add index a60a241..39c8ee7 100644 --- a/ar/.config/TheSiahxyz/spell/en.utf-8.add +++ b/ar/.config/TheSiahxyz/spell/en.utf-8.add @@ -111,3 +111,4 @@ syntax typst vimrc window +require diff --git a/ar/.config/TheSiahxyz/spell/en.utf-8.add.spl b/ar/.config/TheSiahxyz/spell/en.utf-8.add.spl index 90ab402..0353dda 100644 Binary files a/ar/.config/TheSiahxyz/spell/en.utf-8.add.spl and b/ar/.config/TheSiahxyz/spell/en.utf-8.add.spl differ diff --git a/ar/.config/zsh/packages.zsh b/ar/.config/zsh/packages.zsh index d00584e..b3931f5 100644 --- a/ar/.config/zsh/packages.zsh +++ b/ar/.config/zsh/packages.zsh @@ -6,6 +6,7 @@ packages=( atuin "--disable-up-arrow" batman "--export-env" zoxide "--cmd cd --hook prompt" + tmuxdbussync "" ) ### --- Eval Function --- ### diff --git a/ar/.local/bin/tmuxdbussync b/ar/.local/bin/tmuxdbussync index 10b4088..d6da872 100755 --- a/ar/.local/bin/tmuxdbussync +++ b/ar/.local/bin/tmuxdbussync @@ -1,16 +1,15 @@ #!/bin/sh -tmux_dbus="$DBUS_SESSION_BUS_ADDRESS" fcitx5_pid=$(pgrep -f fcitx5 | head -n1) if [ -z "$fcitx5_pid" ]; then - echo "No terminal process found matching: fcitx5" + echo "echo 'No terminal process found matching: fcitx5' >&2" exit 1 fi fcitx5_dbus=$(tr '\0' '\n'