diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-25 12:23:33 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-25 12:23:33 +0900 |
| commit | 1b936638ecd22d7932d6f870e17b9e36a15c33ab (patch) | |
| tree | ed4d3bee9f480e96b6237db165734a2e50df964e | |
| parent | 5b2d9a270bdb3131fdcd518062e80b1df538c4ec (diff) | |
modified plugins/harpoon2.lua, modified plugins/keys.lua, modified bin/tmuxdbussync
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/harpoon2.lua | 13 | ||||
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/keys.lua | 2 | ||||
| -rwxr-xr-x | ar/.local/bin/tmuxdbussync | 18 |
3 files changed, 22 insertions, 11 deletions
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/harpoon2.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/harpoon2.lua index 24aa623..6bf8ef1 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/harpoon2.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/harpoon2.lua @@ -7,6 +7,10 @@ return { }, settings = { save_on_toggle = true, + sync_on_ui_close = false, -- save over session + key = function() -- define how to identify list + return vim.loop.cwd() + end, }, }, init = function() @@ -20,6 +24,7 @@ return { end, config = function(_, opts) local harpoon = require("harpoon") + local extensions = require("harpoon.extensions") -- Apply the base configuration harpoon.setup(opts) @@ -40,6 +45,10 @@ return { end, { buffer = cx.bufnr }) end, }) + + -- Highlight current file + harpoon:extend(extensions.builtins.highlight_current_file()) + harpoon:extend(extensions.builtins.navigate_with_number()) end, keys = function() local keys = { @@ -48,6 +57,7 @@ return { function() require("harpoon"):list():add() end, + mode = { "n", "i", "v", "x" }, desc = "Add buffer to harpoon list", }, { @@ -55,6 +65,7 @@ return { function() require("harpoon"):list():prepend() end, + mode = { "n", "i", "v", "x" }, desc = "Prepend buffer to harpoon list", }, { @@ -71,6 +82,7 @@ return { function() require("harpoon"):list():prev({ ui_nav_wrap = false }) end, + mode = { "n", "i", "v", "x" }, desc = "Previous harpoon list", }, { @@ -78,6 +90,7 @@ return { function() require("harpoon"):list():next({ ui_nav_wrap = false }) end, + mode = { "n", "i", "v", "x" }, desc = "Next harpoon list", }, } diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/keys.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/keys.lua index a9951b1..9f95e1f 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/keys.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/keys.lua @@ -28,7 +28,7 @@ return { { "g", group = "Goto" }, { "g`", group = "Marks" }, { "g'", group = "Marks" }, - { "gw", group = "Lsp buf" }, + { "gr", group = "Lsp buf" }, { "gs", group = "Search/Surround" }, { "gx", desc = "Open with system app" }, { "s", group = "Surround/Search & replace on line" }, diff --git a/ar/.local/bin/tmuxdbussync b/ar/.local/bin/tmuxdbussync index ffebff9..10b4088 100755 --- a/ar/.local/bin/tmuxdbussync +++ b/ar/.local/bin/tmuxdbussync @@ -1,18 +1,16 @@ #!/bin/sh -TMUX_DBUS="$DBUS_SESSION_BUS_ADDRESS" -BROWSER="${BROWSER:-firefox}" -BROWSER_NAME=$(basename "$BROWSER") -BROWSER_PID=$(pgrep -f "$BROWSER_NAME" | head -n1) +tmux_dbus="$DBUS_SESSION_BUS_ADDRESS" +fcitx5_pid=$(pgrep -f fcitx5 | head -n1) -if [ -z "$BROWSER_PID" ]; then - echo "No browser process found matching: $BROWSER_NAME" +if [ -z "$fcitx5_pid" ]; then + echo "No terminal process found matching: fcitx5" exit 1 fi -BROWSER_DBUS=$(tr '\0' '\n' </proc/"$BROWSER_PID"/environ | grep DBUS_SESSION_BUS_ADDRESS) -BROWSER_DBUS="${BROWSER_DBUS#DBUS_SESSION_BUS_ADDRESS=}" +fcitx5_dbus=$(tr '\0' '\n' </proc/"$fcitx5_pid"/environ | grep DBUS_SESSION_BUS_ADDRESS) +fcitx5_dbus="${fcitx5_dbus#DBUS_SESSION_BUS_ADDRESS=}" -if [ "$TMUX_DBUS" != "$BROWSER_DBUS" ]; then - export DBUS_SESSION_BUS_ADDRESS="$BROWSER_DBUS" +if [ "$tmux_dbus" != "$fcitx5_dbus" ]; then + export DBUS_SESSION_BUS_ADDRESS="$fcitx5_dbus" fi |
