diff --git a/common/.config/lf/lfrc b/common/.config/lf/lfrc index ed9b1452..4bb7aa3a 100644 --- a/common/.config/lf/lfrc +++ b/common/.config/lf/lfrc @@ -31,7 +31,7 @@ cmd trash &{{ cmd trash-restore ${{ fileid=$( - trash-util list "$PWD" | + trash-util list -f null "$PWD" | fzf -d '\0' \ --with-nth=1 \ --nth=1 \ diff --git a/common/.config/lf/rifle.conf b/common/.config/lf/rifle.conf index c3636543..9009c131 100644 --- a/common/.config/lf/rifle.conf +++ b/common/.config/lf/rifle.conf @@ -16,10 +16,10 @@ ext x?html?, has w3m, terminal = w3m "$@" #------------------------------------------- # Misc #------------------------------------------- -label editor, mime ^text|x-empty$ = ${VISUAL:-$EDITOR} -- "$@" -label pager, mime ^text|x-empty$ = $PAGER -- "$@" -label editor, ext xml|json|csv|tex|py|pl|rb|rs|js|sh|php|dart = ${VISUAL:-$EDITOR} -- "$@" -label pager, ext xml|json|csv|tex|py|pl|rb|rs|js|sh|php|dart = $PAGER -- "$@" +label editor, mime ^text|x-empty$ = ${VISUAL:-$EDITOR} -- "$@" +label pager, mime ^text|x-empty$ = $PAGER -- "$@" +label editor, ext xml|json|csv|tex|py|pl|rb|rs|js|sh|php|dart|j2 = ${VISUAL:-$EDITOR} -- "$@" +label pager, ext xml|json|csv|tex|py|pl|rb|rs|js|sh|php|dart|j2 = $PAGER -- "$@" #-------------------------------------------- # Audio without X diff --git a/common/.config/nvim/init.lua b/common/.config/nvim/init.lua index e874bc4f..ed159d27 100644 --- a/common/.config/nvim/init.lua +++ b/common/.config/nvim/init.lua @@ -79,24 +79,3 @@ require("lazy").setup({ }, }, }) - -for _, autocmd in ipairs({ - { -- Automatically change line numeration - { "BufEnter", "FocusGained", "InsertLeave", "WinEnter" }, - { command = 'if &nu && mode() != "i" | set rnu | endif' }, - }, - { -- Automatically change line numeration - { "BufLeave", "FocusLost", "InsertEnter", "WinLeave" }, - { command = "if &nu | set nornu | endif" }, - }, - { -- Trigger shortcuts script - "BufWritePost", - { pattern = { vim.fn.stdpath("config") .. "directories" }, command = "silent!!shortcuts" }, - }, - { -- Trigger xrdb - "BufWritePost", - { pattern = { "xresources" }, command = "silent!!xrdb %" }, - }, -}) do - vim.api.nvim_create_autocmd(autocmd[1], autocmd[2]) -end diff --git a/common/.config/nvim/lua/config/autocmds.lua b/common/.config/nvim/lua/config/autocmds.lua new file mode 100644 index 00000000..eb43940f --- /dev/null +++ b/common/.config/nvim/lua/config/autocmds.lua @@ -0,0 +1,26 @@ +for _, autocmd in ipairs({ + { -- Automatically change line numeration + { "BufEnter", "FocusGained", "InsertLeave", "WinEnter" }, + { command = 'if &nu && mode() != "i" | set rnu | endif' }, + }, + { -- Automatically change line numeration + { "BufLeave", "FocusLost", "InsertEnter", "WinLeave" }, + { command = "if &nu | set nornu | endif" }, + }, + { -- Trigger shortcuts script + "BufWritePost", + { pattern = { "directories", "files" }, command = "silent!!shortcuts" }, + }, + { -- Trigger xrdb + "BufWritePost", + { pattern = { "xresources" }, command = "silent!!xrdb %" }, + }, +}) do + vim.api.nvim_create_autocmd(autocmd[1], autocmd[2]) +end + +for _, augroup in ipairs({ + "lazyvim_wrap_spell", +}) do + vim.api.nvim_del_augroup_by_name(augroup) +end diff --git a/common/.config/nvim/lua/config/options.lua b/common/.config/nvim/lua/config/options.lua index 3075ec5f..302394f9 100644 --- a/common/.config/nvim/lua/config/options.lua +++ b/common/.config/nvim/lua/config/options.lua @@ -9,10 +9,11 @@ o.shiftwidth = 4 o.tabstop = 4 o.scrolloff = 8 o.conceallevel = 0 +o.smoothscroll = false g.lazyvim_php_lsp = "intelephense" g.lazyvim_python_lsp = "basedpyright" -g.ai_cm = true +g.ai_cmp = true g.autoformat = false g.snacks_animate = false g.zk_notebook_dir = os.getenv("HOME") .. "/Public/notes" diff --git a/common/.config/nvim/lua/plugins/ai.lua b/common/.config/nvim/lua/plugins/ai.lua index 16623c1d..ff379897 100644 --- a/common/.config/nvim/lua/plugins/ai.lua +++ b/common/.config/nvim/lua/plugins/ai.lua @@ -1,7 +1,7 @@ return { { "yetone/avante.nvim", - event = "VeryLazy", + event = "BufReadPost", dependencies = { "stevearc/dressing.nvim", "ibhagwan/fzf-lua", @@ -30,6 +30,9 @@ return { provider_opts = {}, }, }, + keys = { + { "<leader>aC", "<cmd>AvanteClear<cr>", desc = "avante: Clear" }, + }, build = "make", }, { @@ -87,20 +90,6 @@ return { [""] = false, }, }, - keys = { - { "<leader>a", group = "ai" }, - { - "<leader>aT", - "<CMD>Copilot toggle<CR>", - desc = "copilot: toggle", - }, - }, - }, - { -- temporary fix - "nvim-lualine/lualine.nvim", - opts = function(_, opts) - table.remove(opts.sections.lualine_x, 2) - end, }, { "folke/which-key.nvim", diff --git a/common/.config/zsh/config/bindings.zsh b/common/.config/zsh/config/bindings.zsh index a817acd3..0245c4b5 100644 --- a/common/.config/zsh/config/bindings.zsh +++ b/common/.config/zsh/config/bindings.zsh @@ -5,39 +5,40 @@ zmodload zsh/terminfo typeset -gA key_info key_info=( - 'Control' "\C-" - 'Escape' "\e" - 'Meta' "\M-" - 'Backspace' "^?" - 'Delete' "^[[3~" - 'F1' "$terminfo[kf1]" - 'F2' "$terminfo[kf2]" - 'F3' "$terminfo[kf3]" - 'F4' "$terminfo[kf4]" - 'F5' "$terminfo[kf5]" - 'F6' "$terminfo[kf6]" - 'F7' "$terminfo[kf7]" - 'F8' "$terminfo[kf8]" - 'F9' "$terminfo[kf9]" - 'F10' "$terminfo[kf10]" - 'F11' "$terminfo[kf11]" - 'F12' "$terminfo[kf12]" - 'Insert' "$terminfo[kich1]" - 'Home' "$terminfo[khome]" - 'PageUp' "$terminfo[kpp]" - 'End' "$terminfo[kend]" - 'PageDown' "$terminfo[knp]" - 'Up' "$terminfo[kcuu1]" - 'Left' "$terminfo[kcub1]" - 'Down' "$terminfo[kcud1]" - 'Right' "$terminfo[kcuf1]" - 'BackTab' "$terminfo[kcbt]" - 'AltLeft' "${key_info[Escape]}${key_info[Left]} \e[1;3D" - 'AltRight' "${key_info[Escape]}${key_info[Right]} \e[1;3C" - 'ControlLeft' "\e[1;5D" - 'ControlRight' "\e[1;5C" - 'ControlPageUp' "\e[5;5~" - 'ControlPageDown' "\e[6;5~" + 'Control' "\C-" + 'Escape' "\e" + 'Meta' "\M-" + 'Backspace' "^?" + 'ControlBackspace' "^H" + 'Delete' "^[[3~" + 'F1' "$terminfo[kf1]" + 'F2' "$terminfo[kf2]" + 'F3' "$terminfo[kf3]" + 'F4' "$terminfo[kf4]" + 'F5' "$terminfo[kf5]" + 'F6' "$terminfo[kf6]" + 'F7' "$terminfo[kf7]" + 'F8' "$terminfo[kf8]" + 'F9' "$terminfo[kf9]" + 'F10' "$terminfo[kf10]" + 'F11' "$terminfo[kf11]" + 'F12' "$terminfo[kf12]" + 'Insert' "$terminfo[kich1]" + 'Home' "$terminfo[khome]" + 'PageUp' "$terminfo[kpp]" + 'End' "$terminfo[kend]" + 'PageDown' "$terminfo[knp]" + 'Up' "$terminfo[kcuu1]" + 'Left' "$terminfo[kcub1]" + 'Down' "$terminfo[kcud1]" + 'Right' "$terminfo[kcuf1]" + 'BackTab' "$terminfo[kcbt]" + 'AltLeft' "${key_info[Escape]}${key_info[Left]} \e[1;3D" + 'AltRight' "${key_info[Escape]}${key_info[Right]} \e[1;3C" + 'ControlLeft' "\e[1;5D" + 'ControlRight' "\e[1;5C" + 'ControlPageUp' "\e[5;5~" + 'ControlPageDown' "\e[6;5~" ) local -A global_keybinds @@ -57,10 +58,10 @@ global_keybinds=( local -A viins_keybinds viins_keybinds=( - "$key_info[Control]W" backward-kill-word - "$key_info[Backspace]" backward-delete-char - "$key_info[ControlLeft]" vi-backward-word - "$key_info[ControlRight]" vi-forward-word + "$key_info[ControlBackspace]" backward-kill-word + "$key_info[Backspace]" backward-delete-char + "$key_info[ControlLeft]" vi-backward-word + "$key_info[ControlRight]" vi-forward-word ) local -A vicmd_keybinds diff --git a/common/.local/libexec/statusbar/libsb b/common/.local/libexec/statusbar/libsb index ad265d2c..3c8a5cf8 100755 --- a/common/.local/libexec/statusbar/libsb +++ b/common/.local/libexec/statusbar/libsb @@ -23,7 +23,6 @@ export bggray="background='#414868$bgalpha'" export bgwhite="background='#C0CAF5$bgalpha'" meter_bar() { - # shellcheck disable=SC2194 case $1 in 9[0-9] | 100) color="$fgred" bar="▉" ;; 8[0-9]) color="$fgred" bar="█" ;;