diff options
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua | 74 | ||||
| -rw-r--r-- | ar/.config/shell/aliasrc | 5 | ||||
| -rw-r--r-- | ar/.config/zsh/scripts.zsh | 10 | ||||
| -rwxr-xr-x | ar/.local/bin/ecrypt | 3 | ||||
| -rwxr-xr-x | ar/.local/bin/mounter | 2 | ||||
| -rwxr-xr-x | ar/.local/bin/opensessions | 5 | ||||
| -rw-r--r-- | global/.gnupg/sshcontrol | 4 | ||||
| -rw-r--r-- | global/.ssh/config | 4 | ||||
| -rw-r--r-- | global/Music/.music.txt | 2 | ||||
| -rw-r--r-- | mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua | 74 | ||||
| -rw-r--r-- | mac/.config/zsh/scripts.zsh | 10 | ||||
| -rwxr-xr-x | mac/.local/bin/opensessions | 5 |
12 files changed, 182 insertions, 16 deletions
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua index 52ceb01..ee97612 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua @@ -260,6 +260,75 @@ return { }, }, { + "greggh/claude-code.nvim", + dependencies = { + "nvim-lua/plenary.nvim", -- Required for git operations + }, + config = function() + require("claude-code").setup({ + -- Terminal window settings + window = { + split_ratio = 0.3, -- Percentage of screen for the terminal window (height for horizontal, width for vertical splits) + position = "vertical", -- Position of the window: "botright", "topleft", "vertical", "float", etc. + enter_insert = true, -- Whether to enter insert mode when opening Claude Code + hide_numbers = true, -- Hide line numbers in the terminal window + hide_signcolumn = true, -- Hide the sign column in the terminal window + + -- Floating window configuration (only applies when position = "float") + float = { + width = "80%", -- Width: number of columns or percentage string + height = "80%", -- Height: number of rows or percentage string + row = "center", -- Row position: number, "center", or percentage string + col = "center", -- Column position: number, "center", or percentage string + relative = "editor", -- Relative to: "editor" or "cursor" + border = "rounded", -- Border style: "none", "single", "double", "rounded", "solid", "shadow" + }, + }, + -- File refresh settings + refresh = { + enable = true, -- Enable file change detection + updatetime = 100, -- updatetime when Claude Code is active (milliseconds) + timer_interval = 1000, -- How often to check for file changes (milliseconds) + show_notifications = true, -- Show notification when files are reloaded + }, + -- Git project settings + git = { + use_git_root = true, -- Set CWD to git root when opening Claude Code (if in git project) + }, + -- Shell-specific settings + shell = { + separator = "&&", -- Command separator used in shell commands + pushd_cmd = "pushd", -- Command to push directory onto stack (e.g., 'pushd' for bash/zsh, 'enter' for nushell) + popd_cmd = "popd", -- Command to pop directory from stack (e.g., 'popd' for bash/zsh, 'exit' for nushell) + }, + -- Command settings + command = "claude", -- Command used to launch Claude Code + -- Command variants + command_variants = { + -- Conversation management + continue = "--continue", -- Resume the most recent conversation + resume = "--resume", -- Display an interactive conversation picker + + -- Output options + verbose = "--verbose", -- Enable verbose logging with full turn-by-turn output + }, + -- Keymaps + keymaps = { + toggle = { + normal = "<C-,>", -- Normal mode keymap for toggling Claude Code, false to disable + terminal = "<C-,>", -- Terminal mode keymap for toggling Claude Code, false to disable + variants = { + continue = "<leader>cC", -- Normal mode keymap for Claude Code with continue flag + verbose = "<leader>cV", -- Normal mode keymap for Claude Code with verbose flag + }, + }, + window_navigation = true, -- Enable window navigation keymaps (<C-h/j/k/l>) + scrolling = true, -- Enable scrolling keymaps (<C-f/b>) for page up/down + }, + }) + end, + }, + { "NickvanDyke/opencode.nvim", dependencies = { -- Recommended for `ask()` and `select()`. @@ -277,7 +346,7 @@ return { vim.o.autoread = true -- Recommended/example keymaps. - vim.keymap.set({ "n", "x" }, "<C-a>", function() + vim.keymap.set({ "n", "x" }, "<C-q>", function() require("opencode").ask("@this: ", { submit = true }) end, { desc = "Ask opencode" }) vim.keymap.set({ "n", "x" }, "<C-x>", function() @@ -387,7 +456,7 @@ return { instructions_file = "avante.md", ---@alias Provider "claude" | "openai" | "azure" | "gemini" | "cohere" | "copilot" | string ---@type Provider - provider = "openai", -- The provider used in Aider mode or in the planning phase of Cursor Planning Mode + provider = "claude", -- The provider used in Aider mode or in the planning phase of Cursor Planning Mode ---@alias Mode "agentic" | "legacy" ---@type Mode mode = "agentic", -- The default mode for interaction. "agentic" uses tools to automatically generate code, "legacy" uses the old planning method to generate code. @@ -398,6 +467,7 @@ return { providers = { claude = { endpoint = "https://api.anthropic.com", + auth_type = "max", -- Set to "max" to sign in with Claude Pro/Max subscription model = "claude-sonnet-4-20250514", timeout = 30000, -- Timeout in milliseconds extra_request_body = { diff --git a/ar/.config/shell/aliasrc b/ar/.config/shell/aliasrc index d353cd3..1e129f6 100644 --- a/ar/.config/shell/aliasrc +++ b/ar/.config/shell/aliasrc @@ -487,7 +487,8 @@ alias sps="source ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/profile" alias szs="source ${XDG_CONFIG_HOME:-${HOME}/.config}/zsh/.zshrc" alias ylogh='ylog -s hidden -c us | grep $(LC_TIME=C date +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' -alias ylogi='ylog -s hidden -c us | grep $(LC_TIME=C date -v-1d +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' +alias ylogi='ylog -s hidden -c us | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' alias ylogt='ylog -s diary -c us | grep $(LC_TIME=C date +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' -alias ylogy='ylog -s diary -c us | grep $(LC_TIME=C date -d "yesterday" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' +alias ylogy='ylog -s diary -c us | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' +alias ylogr='ylog -s diary -c us | grep $(LC_TIME=C date -d "2 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' alias ylogu='ylog -s diary -c us' diff --git a/ar/.config/zsh/scripts.zsh b/ar/.config/zsh/scripts.zsh index 5a47ffa..d70522d 100644 --- a/ar/.config/zsh/scripts.zsh +++ b/ar/.config/zsh/scripts.zsh @@ -390,9 +390,13 @@ EOF ) [[ -z "${SELECTED_DIRS// }" ]] && return if [[ "$(echo "$SELECTED_DIRS" | wc -l)" -eq 1 ]]; then - cd "$SELECTED_DIRS" - if [[ -n "$(git -C "$SELECTED_DIRS" status --porcelain)" ]]; then - git status --porcelain 2>/dev/null + if [[ -n "$TMUX" ]]; then + opensessions "$SELECTED_DIRS" + else + cd "$SELECTED_DIRS" || return + if [[ -n "$(git -C "$SELECTED_DIRS" status --porcelain 2>/dev/null)" ]]; then + git status --porcelain + fi fi else opensessions "$SELECTED_DIRS" diff --git a/ar/.local/bin/ecrypt b/ar/.local/bin/ecrypt index e13c033..4240c71 100755 --- a/ar/.local/bin/ecrypt +++ b/ar/.local/bin/ecrypt @@ -27,6 +27,9 @@ attempt_mount() { targets="$HOME/.secret" mounts="$HOME/Private" pw="default" +[ -d "$targets" ] || mkdir -p "$targets" +[ -d "$mounts" ] || mkdir -p "$mounts" + set -- $mounts # Set positional parameters to mounts i=1 for target in $targets; do diff --git a/ar/.local/bin/mounter b/ar/.local/bin/mounter index a9d7a61..c8eabbf 100755 --- a/ar/.local/bin/mounter +++ b/ar/.local/bin/mounter @@ -81,7 +81,7 @@ unopenedluks="$(for drive in $allluks; do done | filter)" # Get all normal, non-encrypted or decrypted partitions that are not mounted. -normalparts="$(echo "$lsblkoutput" | grep -v crypto_LUKS | grep -v 'part 1M' | grep 'part\|rom\|crypt' | sed "s/^/💾 /" | filter)" +normalparts="$(echo "$lsblkoutput" | grep -v crypto_LUKS | grep -v 'LVM2_member' | grep -v 'part 1M' | grep 'part\|rom\|crypt' | sed "s/^/💾 /" | filter)" # Get all available IP addresses with open Samba shares in the wlan0 subnet, excluding eth0 IP smbips="$(sudo arp-scan --interface=eth0 --interface=wlan0 --localnet | grep -vEi '(EFM Networks|DUP:)' | awk '/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/{print $1}')" diff --git a/ar/.local/bin/opensessions b/ar/.local/bin/opensessions index 6f9f236..d16f42f 100755 --- a/ar/.local/bin/opensessions +++ b/ar/.local/bin/opensessions @@ -18,7 +18,10 @@ set -- $dirs for dir in $dirs; do if [ -d "$dir" ]; then session_name=$(get_session_name "$dir") - if ! tmux has-session -t "$session_name" 2>/dev/null; then + if tmux has-session -t "$session_name" 2>/dev/null; then + session_path=$(tmux display-message -t "$session_name" -p '#{session_path}') + tmux send-keys -t "$session_name" "cd \"$session_path\"" C-m + else tmux new-session -d -s "$session_name" -c "$dir" if git -C "$dir" rev-parse --is-inside-work-tree >/dev/null 2>&1 && [ -n "$(git -C "$dir" status --porcelain)" ]; then tmux send-keys -t "$session_name" "git status --porcelain" C-m diff --git a/global/.gnupg/sshcontrol b/global/.gnupg/sshcontrol index e61bd20..e64aa3c 100644 --- a/global/.gnupg/sshcontrol +++ b/global/.gnupg/sshcontrol @@ -21,3 +21,7 @@ CEA80B05ABA46C5DE584655EFD7D26E81A2DFF65 # Ed25519 key added on: 2025-12-26 23:24:56 # Fingerprints: MD5:4d:4a:d4:bf:7f:05:d5:5c:b1:e6:15:dc:6f:f8:fb:d8 # SHA256:T8WNYKy8dz+VIYeVm3k3bqpcZiViQChxrNc3BIVgykk +# Ed25519 key added on: 2026-01-09 00:07:16 +# Fingerprints: MD5:94:45:bc:ff:b2:5e:9f:56:04:a1:b5:e4:6d:c0:1f:c1 +# SHA256:VL5p1d+iHFL8EJZ/y/tgrUXhpxads6ik1SoZim+U/fk +5A04F5DC42D5A09E50DFEB163B5F3E5A89FC04FE 0 diff --git a/global/.ssh/config b/global/.ssh/config index 0202208..bbeb10f 100644 --- a/global/.ssh/config +++ b/global/.ssh/config @@ -6,9 +6,11 @@ Host diary RequestTTY yes RemoteCommand cd /var/www/thesiah/diary && exec $SHELL -l -Host github.com +Host github + HostName github.com User git IdentityAgent ~/.gnupg/S.gpg-agent.ssh + IdentitiesOnly yes Host evcp HostName 3.36.92.165 diff --git a/global/Music/.music.txt b/global/Music/.music.txt index a64bfc5..723a23d 100644 --- a/global/Music/.music.txt +++ b/global/Music/.music.txt @@ -914,3 +914,5 @@ youtube edJ1dXbaqak youtube Qe8fa4b5xNU youtube RgKAFK5djSk youtube 6wmuFMBouyQ +youtube t8p8FF16zJs +youtube Ejc__vhP2U8 diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua index 52ceb01..ee97612 100644 --- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua +++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua @@ -260,6 +260,75 @@ return { }, }, { + "greggh/claude-code.nvim", + dependencies = { + "nvim-lua/plenary.nvim", -- Required for git operations + }, + config = function() + require("claude-code").setup({ + -- Terminal window settings + window = { + split_ratio = 0.3, -- Percentage of screen for the terminal window (height for horizontal, width for vertical splits) + position = "vertical", -- Position of the window: "botright", "topleft", "vertical", "float", etc. + enter_insert = true, -- Whether to enter insert mode when opening Claude Code + hide_numbers = true, -- Hide line numbers in the terminal window + hide_signcolumn = true, -- Hide the sign column in the terminal window + + -- Floating window configuration (only applies when position = "float") + float = { + width = "80%", -- Width: number of columns or percentage string + height = "80%", -- Height: number of rows or percentage string + row = "center", -- Row position: number, "center", or percentage string + col = "center", -- Column position: number, "center", or percentage string + relative = "editor", -- Relative to: "editor" or "cursor" + border = "rounded", -- Border style: "none", "single", "double", "rounded", "solid", "shadow" + }, + }, + -- File refresh settings + refresh = { + enable = true, -- Enable file change detection + updatetime = 100, -- updatetime when Claude Code is active (milliseconds) + timer_interval = 1000, -- How often to check for file changes (milliseconds) + show_notifications = true, -- Show notification when files are reloaded + }, + -- Git project settings + git = { + use_git_root = true, -- Set CWD to git root when opening Claude Code (if in git project) + }, + -- Shell-specific settings + shell = { + separator = "&&", -- Command separator used in shell commands + pushd_cmd = "pushd", -- Command to push directory onto stack (e.g., 'pushd' for bash/zsh, 'enter' for nushell) + popd_cmd = "popd", -- Command to pop directory from stack (e.g., 'popd' for bash/zsh, 'exit' for nushell) + }, + -- Command settings + command = "claude", -- Command used to launch Claude Code + -- Command variants + command_variants = { + -- Conversation management + continue = "--continue", -- Resume the most recent conversation + resume = "--resume", -- Display an interactive conversation picker + + -- Output options + verbose = "--verbose", -- Enable verbose logging with full turn-by-turn output + }, + -- Keymaps + keymaps = { + toggle = { + normal = "<C-,>", -- Normal mode keymap for toggling Claude Code, false to disable + terminal = "<C-,>", -- Terminal mode keymap for toggling Claude Code, false to disable + variants = { + continue = "<leader>cC", -- Normal mode keymap for Claude Code with continue flag + verbose = "<leader>cV", -- Normal mode keymap for Claude Code with verbose flag + }, + }, + window_navigation = true, -- Enable window navigation keymaps (<C-h/j/k/l>) + scrolling = true, -- Enable scrolling keymaps (<C-f/b>) for page up/down + }, + }) + end, + }, + { "NickvanDyke/opencode.nvim", dependencies = { -- Recommended for `ask()` and `select()`. @@ -277,7 +346,7 @@ return { vim.o.autoread = true -- Recommended/example keymaps. - vim.keymap.set({ "n", "x" }, "<C-a>", function() + vim.keymap.set({ "n", "x" }, "<C-q>", function() require("opencode").ask("@this: ", { submit = true }) end, { desc = "Ask opencode" }) vim.keymap.set({ "n", "x" }, "<C-x>", function() @@ -387,7 +456,7 @@ return { instructions_file = "avante.md", ---@alias Provider "claude" | "openai" | "azure" | "gemini" | "cohere" | "copilot" | string ---@type Provider - provider = "openai", -- The provider used in Aider mode or in the planning phase of Cursor Planning Mode + provider = "claude", -- The provider used in Aider mode or in the planning phase of Cursor Planning Mode ---@alias Mode "agentic" | "legacy" ---@type Mode mode = "agentic", -- The default mode for interaction. "agentic" uses tools to automatically generate code, "legacy" uses the old planning method to generate code. @@ -398,6 +467,7 @@ return { providers = { claude = { endpoint = "https://api.anthropic.com", + auth_type = "max", -- Set to "max" to sign in with Claude Pro/Max subscription model = "claude-sonnet-4-20250514", timeout = 30000, -- Timeout in milliseconds extra_request_body = { diff --git a/mac/.config/zsh/scripts.zsh b/mac/.config/zsh/scripts.zsh index f92a6c4..ac59ca6 100644 --- a/mac/.config/zsh/scripts.zsh +++ b/mac/.config/zsh/scripts.zsh @@ -388,9 +388,13 @@ EOF ) [[ -z "${SELECTED_DIRS// }" ]] && return if [[ "$(echo "$SELECTED_DIRS" | wc -l)" -eq 1 ]]; then - cd "$SELECTED_DIRS" - if [[ -n "$(git -C "$SELECTED_DIRS" status --porcelain)" ]]; then - git status --porcelain 2>/dev/null + if [[ -n "$TMUX" ]]; then + opensessions "$SELECTED_DIRS" + else + cd "$SELECTED_DIRS" || return + if [[ -n "$(git -C "$SELECTED_DIRS" status --porcelain 2>/dev/null)" ]]; then + git status --porcelain + fi fi else opensessions "$SELECTED_DIRS" diff --git a/mac/.local/bin/opensessions b/mac/.local/bin/opensessions index 6f9f236..d16f42f 100755 --- a/mac/.local/bin/opensessions +++ b/mac/.local/bin/opensessions @@ -18,7 +18,10 @@ set -- $dirs for dir in $dirs; do if [ -d "$dir" ]; then session_name=$(get_session_name "$dir") - if ! tmux has-session -t "$session_name" 2>/dev/null; then + if tmux has-session -t "$session_name" 2>/dev/null; then + session_path=$(tmux display-message -t "$session_name" -p '#{session_path}') + tmux send-keys -t "$session_name" "cd \"$session_path\"" C-m + else tmux new-session -d -s "$session_name" -c "$dir" if git -C "$dir" rev-parse --is-inside-work-tree >/dev/null 2>&1 && [ -n "$(git -C "$dir" status --porcelain)" ]; then tmux send-keys -t "$session_name" "git status --porcelain" C-m |
