Merge branch 'main' of https://git.snaile.de/luca/dotfiles
This commit is contained in:
commit
77cffe32be
8 changed files with 75 additions and 80 deletions
common
.config
.local/libexec/statusbar
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
26
common/.config/nvim/lua/config/autocmds.lua
Normal file
26
common/.config/nvim/lua/config/autocmds.lua
Normal file
|
@ -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
|
|
@ -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"
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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="█" ;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue