summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua2
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/image.lua4
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/snippets.lua8
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua45
-rw-r--r--ar/.config/git/ignore5
-rw-r--r--ar/.config/mimeapps.list2
-rw-r--r--ar/.config/pipewire/pipewire.conf.d/10-no-rtkit.conf10
-rw-r--r--ar/.config/wireplumber/main.lua.d/51-device-priority.conf74
-rwxr-xr-xar/.local/bin/fzffiles4
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua4
10 files changed, 124 insertions, 34 deletions
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua
index ee97612..90b62e2 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua
@@ -349,7 +349,7 @@ return {
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()
+ vim.keymap.set({ "n", "x" }, "<C-CR>", function()
require("opencode").select()
end, { desc = "Execute opencode action…" })
vim.keymap.set({ "n", "t" }, "<C-.>", function()
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/image.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/image.lua
index a4f126f..81fa28b 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/image.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/image.lua
@@ -64,9 +64,9 @@ return {
local absolute_image_path = current_file_path .. "/" .. image_path
-- Check if the image exists in the current path
if not file_exists(absolute_image_path) then
- -- If not found, search ../Screenshots/
+ -- If not found, search ../screenshots/
local fallback_path = vim.fn.fnamemodify(current_file_path, ":h")
- .. "/Screenshots/"
+ .. "/screenshots/"
.. image_path
if file_exists(fallback_path) then
absolute_image_path = fallback_path
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/snippets.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/snippets.lua
index 96c52a7..aff6f62 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/snippets.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/snippets.lua
@@ -33,25 +33,25 @@ return {
vim.cmd.runtime({ args = { "lua/TheSiahxyz/snippets/*.lua" }, bang = true }) -- load custom snippets
- vim.keymap.set({ "i", "x" }, "<A-L>", function()
+ vim.keymap.set({ "i", "x" }, "<C-L>", function()
if ls.expand_or_jumpable() then
ls.expand_or_jump()
end
end, { silent = true, desc = "Expand snippet or jump to the next snippet node" })
- vim.keymap.set({ "i", "x" }, "<A-H>", function()
+ vim.keymap.set({ "i", "x" }, "<C-H>", function()
if ls.jumpable(-1) then
ls.jump(-1)
end
end, { silent = true, desc = "Previous spot in the snippet" })
- vim.keymap.set({ "i", "x" }, "<A-l>", function()
+ vim.keymap.set({ "i", "s" }, "<C-j>", function()
if ls.choice_active() then
ls.change_choice(1)
end
end, { silent = true, desc = "Next snippet choice" })
- vim.keymap.set({ "i", "x" }, "<A-h>", function()
+ vim.keymap.set({ "i", "s" }, "<C-k>", function()
if ls.choice_active() then
ls.change_choice(-1)
end
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua
index f1c636b..4f233d1 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/diary.lua
@@ -5,37 +5,38 @@ local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local t = ls.text_node
+local d = ls.dynamic_node
+local sn = ls.snippet_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 function bgm_node_generator()
+ return function()
+ local handle = io.popen("ssh root@thesiah.xyz 'ls /var/www/thesiah/bgm/' 2>/dev/null")
+ if not handle then
+ return sn(nil, { i(1, "bgm") })
+ end
- local result = handle:read("*a")
- handle:close()
+ local result = handle:read("*a")
+ handle:close()
- if not result or result == "" then
- return nil
- end
+ if not result or result == "" then
+ return sn(nil, { i(1, "bgm") })
+ end
- local choices = {}
- for filename in result:gmatch("[^\r\n]+") do
- table.insert(choices, t(filename))
- end
+ local choices = {}
+ for filename in result:gmatch("[^\r\n]+") do
+ table.insert(choices, t(filename))
+ end
- if #choices == 0 then
- return nil
- end
+ if #choices == 0 then
+ return sn(nil, { i(1, "bgm") })
+ end
- return choices
+ return sn(nil, { c(1, choices) })
+ end
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(
@@ -52,7 +53,7 @@ bgm: <bgm>
date = f(function()
return os.date("%Y-%m-%d")
end, {}),
- bgm = bgm_node,
+ bgm = d(2, bgm_node_generator(), {}),
story = i(3),
}
)
diff --git a/ar/.config/git/ignore b/ar/.config/git/ignore
index 779455d..59d7e31 100644
--- a/ar/.config/git/ignore
+++ b/ar/.config/git/ignore
@@ -1,3 +1,8 @@
+# AI
+.claude
+CLAUDE.md
+**/.claude/settings.local.json
+
# Api/Keys
api.json
credentials
diff --git a/ar/.config/mimeapps.list b/ar/.config/mimeapps.list
index 2c5c133..ffcfdb8 100644
--- a/ar/.config/mimeapps.list
+++ b/ar/.config/mimeapps.list
@@ -14,7 +14,7 @@ application/x-bittorrent=torrent.desktop;
application/x-xpinstall=librewolf.desktop;firefox.desktop;
application/xhtml+xml=librewolf.desktop;firefox.desktop;
application/vnd.openxmlformats-officedocument.presentationml.presentation=office.desktop;
-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=csv.desktop;
+application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=office.desktop;
application/vnd.openxmlformats-officedocument.wordprocessingml.document=office.desktop;
inode/directory=file.desktop;
image/jpeg=img.desktop;
diff --git a/ar/.config/pipewire/pipewire.conf.d/10-no-rtkit.conf b/ar/.config/pipewire/pipewire.conf.d/10-no-rtkit.conf
new file mode 100644
index 0000000..9d5903f
--- /dev/null
+++ b/ar/.config/pipewire/pipewire.conf.d/10-no-rtkit.conf
@@ -0,0 +1,10 @@
+context.modules = [
+ { name = libpipewire-module-rt
+ args = {
+ rt.prio = 20
+ rt.time.soft = -1
+ rt.time.hard = -1
+ }
+ flags = [ ifexists nofail ]
+ }
+]
diff --git a/ar/.config/wireplumber/main.lua.d/51-device-priority.conf b/ar/.config/wireplumber/main.lua.d/51-device-priority.conf
new file mode 100644
index 0000000..13c4987
--- /dev/null
+++ b/ar/.config/wireplumber/main.lua.d/51-device-priority.conf
@@ -0,0 +1,74 @@
+monitor.alsa.rules = [
+ {
+ matches = [
+ {
+ node.name = "~alsa_output.*hdmi.*"
+ }
+ ]
+ actions = {
+ update-props = {
+ priority.driver = 2000
+ priority.session = 2000
+ }
+ }
+ }
+ {
+ matches = [
+ {
+ node.name = "~alsa_output.*analog.*"
+ }
+ ]
+ actions = {
+ update-props = {
+ priority.driver = 1000
+ priority.session = 1000
+ }
+ }
+ }
+]
+
+monitor.bluez.rules = [
+ {
+ matches = [
+ {
+ device.name = "~bluez_card.*"
+ }
+ ]
+ actions = {
+ update-props = {
+ priority.driver = 3000
+ priority.session = 3000
+ bluez5.auto-connect = [ a2dp_sink ]
+ }
+ }
+ }
+]
+
+node.rules = [
+ {
+ matches = [
+ {
+ node.name = "~bluez_output.*"
+ }
+ ]
+ actions = {
+ update-props = {
+ priority.driver = 3000
+ priority.session = 3000
+ }
+ }
+ }
+ {
+ matches = [
+ {
+ node.name = "~bluez_input.*"
+ }
+ ]
+ actions = {
+ update-props = {
+ priority.driver = 3000
+ priority.session = 3000
+ }
+ }
+ }
+]
diff --git a/ar/.local/bin/fzffiles b/ar/.local/bin/fzffiles
index 9f5cd90..64c7a6d 100755
--- a/ar/.local/bin/fzffiles
+++ b/ar/.local/bin/fzffiles
@@ -11,7 +11,7 @@ IFS='
files=$(fzf-tmux \
--header "^a pwd ^b public ^d .dotfiles ^f configs ^g git ^h home ^k desktop ^r scripts ^s suckless ^u staged files ^v private ^/ help" \
--preview "selection={};
- clean=\$(printf '%s' \"\$selection\" | sed -e 's/^πŸ“„ //' -e 's/^✏️ //' -e 's/^βœ… //' -e 's/^❌ //' -e 's/^πŸ”€ //' -e 's/^❓ //');
+ clean=\$(printf '%s' \"\$selection\" | sed -e 's/^πŸ“„ //' -e 's/^✏ //' -e 's/^βœ… //' -e 's/^❌ //' -e 's/^πŸ”€ //' -e 's/^❓ //');
[ -z \"\$clean\" ] && { echo 'No selection'; exit 0; }
target=\$(readlink -f \"\$clean\" 2>/dev/null || printf '%s' \"\$clean\");
if [ -z \"\$target\" ]; then
@@ -65,7 +65,7 @@ files=$(fzf-tmux \
else if (staged == \"!\" && unstaged == \"!\") icon=\"❌\";
else if (staged != \" \" && staged != \"?\" && unstaged != \" \" && unstaged != \"?\") icon=\"πŸ”€\";
else if (staged != \" \" && staged != \"?\") icon=\"βœ…\";
- else if (unstaged != \" \") icon=\"✏️\";
+ else if (unstaged != \" \") icon=\"✏\";
else icon=\"❓\";
print icon \" \" root \"/\" file
}'; else echo 'This is not a git repository.'; fi)" \
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua
index 36bd545..9f0d55b 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua
@@ -346,10 +346,10 @@ 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()
+ vim.keymap.set({ "n", "x" }, "<C-CR>", function()
require("opencode").select()
end, { desc = "Execute opencode action…" })
vim.keymap.set({ "n", "t" }, "<C-.>", function()