diff options
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua | 32 | ||||
| -rw-r--r-- | ar/.config/lf/lfrc | 4 | ||||
| -rw-r--r-- | ar/.config/shell/aliasrc | 2 | ||||
| -rwxr-xr-x | ar/.local/bin/gitupdate | 2 | ||||
| -rwxr-xr-x | ar/.local/bin/statusbar/sb-forecast | 3 | ||||
| -rw-r--r-- | global/.local/share/thesiah/chars/emoji | 2 | ||||
| -rw-r--r-- | mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua | 5 | ||||
| -rw-r--r-- | mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua | 32 | ||||
| -rw-r--r-- | mac/.config/git/ignore | 2 |
9 files changed, 76 insertions, 8 deletions
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua index 90528a1..f1c636b 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua @@ -3,15 +3,46 @@ local ls = require("luasnip") local s = ls.snippet local i = ls.insert_node local f = ls.function_node +local c = ls.choice_node +local t = ls.text_node local fmt = require("luasnip.extras.fmt").fmta +local function bgm_list() + local handle = io.popen("ssh root@thesiah.xyz 'ls /var/www/thesiah/bgm/' 2>/dev/null") + if not handle then + return nil + end + + local result = handle:read("*a") + handle:close() + + if not result or result == "" then + return nil + end + + local choices = {} + for filename in result:gmatch("[^\r\n]+") do + table.insert(choices, t(filename)) + end + + if #choices == 0 then + return nil + end + + return choices +end + +local bgm_choices = bgm_list() +local bgm_node = bgm_choices and c(2, bgm_choices) or i(2, "bgm") + local diary_snippet = s( "diary", fmt( [[--- title: <title> date: <date> +bgm: <bgm> --- <story> @@ -21,6 +52,7 @@ date: <date> date = f(function() return os.date("%Y-%m-%d") end, {}), + bgm = bgm_node, story = i(3), } ) diff --git a/ar/.config/lf/lfrc b/ar/.config/lf/lfrc index 0d866eb..becd52c 100644 --- a/ar/.config/lf/lfrc +++ b/ar/.config/lf/lfrc @@ -110,6 +110,10 @@ cmd mkdir %{{ cmd touch %{{ IFS=" " file="$*" + case "$file" in + /*) ;; + *) file="$PWD/$file" ;; + esac dir="${file%/*}" [ "$dir" != "$file" ] && mkdir -p -- "$dir" touch -- "$file" diff --git a/ar/.config/shell/aliasrc b/ar/.config/shell/aliasrc index 1e129f6..1cf6045 100644 --- a/ar/.config/shell/aliasrc +++ b/ar/.config/shell/aliasrc @@ -12,7 +12,7 @@ [ -f "$MBSYNCRC" ] && alias mbsync='mbsync -c $MBSYNCRC' # sudo not required for some system commands -for command in blkid lsblk mount umount pacman poweroff reboot shutdown su sv updatedb; do +for command in arp-scan blkid docker ecrypt lazydocker lsblk mount umount pacman poweroff reboot shutdown su sv updatedb; do alias $command="sudo $command" done unset command diff --git a/ar/.local/bin/gitupdate b/ar/.local/bin/gitupdate index 87c13c3..3dabf34 100755 --- a/ar/.local/bin/gitupdate +++ b/ar/.local/bin/gitupdate @@ -2,8 +2,6 @@ set -eu -pidof transmission-daemon >/dev/null && echo "Turn off transmission-daemon first!" && exit 1 - # Check if inside a Git repository ! git rev-parse --is-inside-work-tree >/dev/null 2>&1 && echo "Not a git repository." && exit 1 diff --git a/ar/.local/bin/statusbar/sb-forecast b/ar/.local/bin/statusbar/sb-forecast index 063c8e5..65bcd1a 100755 --- a/ar/.local/bin/statusbar/sb-forecast +++ b/ar/.local/bin/statusbar/sb-forecast @@ -11,7 +11,8 @@ weatherreportjson="${XDG_CACHE_HOME:-${HOME}/.cache}/weatherreport.json" error() { rm -f "$weatherreport" "$weatherreportjson" - notify-send -u critical "⛔ Failed to update 'weather$1'" + notify-send "⛔ Failed to update 'weather$1'" + echo "❓" exit 1 } diff --git a/global/.local/share/thesiah/chars/emoji b/global/.local/share/thesiah/chars/emoji index 093c6c3..6513cbb 100644 --- a/global/.local/share/thesiah/chars/emoji +++ b/global/.local/share/thesiah/chars/emoji @@ -310,7 +310,7 @@ 👬 men holding hands 💏 kiss 💑 couple with heart -🗣️ speaking head +🗣 speaking head 👤 bust in silhouette 👥 busts in silhouette 🫂 people hugging diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua index ee97612..36bd545 100644 --- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua +++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua @@ -346,7 +346,7 @@ return { vim.o.autoread = true -- Recommended/example keymaps. - vim.keymap.set({ "n", "x" }, "<C-q>", function() + vim.keymap.set({ "n", "x" }, "<C-a>", function() require("opencode").ask("@this: ", { submit = true }) end, { desc = "Ask opencode" }) vim.keymap.set({ "n", "x" }, "<C-x>", function() @@ -456,7 +456,7 @@ return { instructions_file = "avante.md", ---@alias Provider "claude" | "openai" | "azure" | "gemini" | "cohere" | "copilot" | string ---@type Provider - provider = "claude", -- The provider used in Aider mode or in the planning phase of Cursor Planning Mode + provider = "openai", -- 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. @@ -467,7 +467,6 @@ 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/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua index 90528a1..f1c636b 100644 --- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua +++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua @@ -3,15 +3,46 @@ local ls = require("luasnip") local s = ls.snippet local i = ls.insert_node local f = ls.function_node +local c = ls.choice_node +local t = ls.text_node local fmt = require("luasnip.extras.fmt").fmta +local function bgm_list() + local handle = io.popen("ssh root@thesiah.xyz 'ls /var/www/thesiah/bgm/' 2>/dev/null") + if not handle then + return nil + end + + local result = handle:read("*a") + handle:close() + + if not result or result == "" then + return nil + end + + local choices = {} + for filename in result:gmatch("[^\r\n]+") do + table.insert(choices, t(filename)) + end + + if #choices == 0 then + return nil + end + + return choices +end + +local bgm_choices = bgm_list() +local bgm_node = bgm_choices and c(2, bgm_choices) or i(2, "bgm") + local diary_snippet = s( "diary", fmt( [[--- title: <title> date: <date> +bgm: <bgm> --- <story> @@ -21,6 +52,7 @@ date: <date> date = f(function() return os.date("%Y-%m-%d") end, {}), + bgm = bgm_node, story = i(3), } ) diff --git a/mac/.config/git/ignore b/mac/.config/git/ignore index 2121586..7c177dc 100644 --- a/mac/.config/git/ignore +++ b/mac/.config/git/ignore @@ -119,3 +119,5 @@ thesiah.mom # thesiah.mom */thesiah/thesiah.mom + +**/.claude/settings.local.json |
