Merge branch 'main' of ssh://git.clustercockpit.org:1073/moebiusband/dotfiles

This commit is contained in:
Jan Eitzinger 2024-11-23 11:06:27 +01:00
commit c9a97d9e24
Signed by: moebiusband
GPG Key ID: 2574BA29B90D6DD5
18 changed files with 211 additions and 68 deletions

View File

@ -24,4 +24,6 @@ LICENSE
.config/nvim/lua/plugins/telescope.lua
.config/nvim/lua/plugins/core.lua
.config/nvim/lua/plugins/disabled.lua
.config/fish/conf.d/fish-ssh-agent.fish
.config/fish/functions/__ssh_agent_*
{{ end }}

View File

@ -0,0 +1 @@
/home/jan/.local/share/broot/launcher/bash/1

View File

@ -0,0 +1,4 @@
This file tells broot the installation of the br function was done.
If there's a problem and you want to install it again run
broot -- install

View File

@ -0,0 +1,7 @@
if test -z "$SSH_ENV"
set -xg SSH_ENV $HOME/.ssh/environment
end
if not __ssh_agent_is_started
__ssh_agent_start
end

View File

@ -1,5 +1,4 @@
jorgebucaran/fisher
kidonng/zoxide.fish
danhper/fish-ssh-agent
plttn/fish-eza
patrickf1/fzf.fish
danhper/fish-ssh-agent
jorgebucaran/fisher

View File

@ -0,0 +1,62 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR --export EZA_LAAD_OPTIONS:\x2d\x2dall\x1e\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2donly\x2ddirs
SETUVAR --export EZA_LAAID_OPTIONS:\x2d\x2dall\x1e\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2dicons\x1e\x2d\x2donly\x2ddirs
SETUVAR --export EZA_LAAI_OPTIONS:\x2d\x2dall\x1e\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2dicons
SETUVAR --export EZA_LAA_OPTIONS:\x2d\x2dall\x1e\x2d\x2dall\x1e\x2d\x2dbinary
SETUVAR --export EZA_LAD_OPTIONS:\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2donly\x2ddirs
SETUVAR --export EZA_LAID_OPTIONS:\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2dicons\x1e\x2d\x2donly\x2ddirs
SETUVAR --export EZA_LAI_OPTIONS:\x2d\x2dall\x1e\x2d\x2dbinary\x1e\x2d\x2dicons
SETUVAR --export EZA_LA_OPTIONS:\x2d\x2dall\x1e\x2d\x2dbinary
SETUVAR --export EZA_LC_OPTIONS:\x2d\x2dacross
SETUVAR --export EZA_LD_OPTIONS:\x2d\x2donly\x2ddirs
SETUVAR --export EZA_LE_OPTIONS:\x2d\x2dextended\x1e\x2d\x2dlong
SETUVAR --export EZA_LG_OPTIONS:\x2d\x2dgit\x1e\x2d\x2dgit\x2dignore\x1e\x2d\x2dlong
SETUVAR --export EZA_LID_OPTIONS:\x2d\x2dicons\x1e\x2d\x2donly\x2ddirs
SETUVAR --export EZA_LI_OPTIONS:\x2d\x2dicons
SETUVAR --export EZA_LL_OPTIONS:\x2d\x2dlong
SETUVAR --export EZA_LO_OPTIONS:\x2d\x2doneline
SETUVAR --export EZA_LT_OPTIONS:\x2d\x2dtree\x1e\x2d\x2dlevel
SETUVAR --export EZA_L_OPTIONS:\x1d
SETUVAR --export EZA_STANDARD_OPTIONS:\x2d\x2dgroup\x1e\x2d\x2dheader\x1e\x2d\x2dgroup\x2ddirectories\x2dfirst
SETUVAR --export __FISH_EZA_ALIASES:l\x1ela\x1eld\x1eli\x1elid\x1elaa\x1elad\x1elai\x1elaid\x1elaad\x1elaai\x1elaaid\x1ell\x1ella\x1elld\x1elli\x1ellid\x1ellaa\x1ellad\x1ellai\x1ellaid\x1ellaad\x1ellaai\x1ellaaid\x1elg\x1elga\x1elgd\x1elgi\x1elgid\x1elgaa\x1elgad\x1elgai\x1elgaid\x1elgaad\x1elgaai\x1elgaaid\x1ele\x1elea\x1eled\x1elei\x1eleid\x1eleaa\x1elead\x1eleai\x1eleaid\x1eleaad\x1eleaai\x1eleaaid\x1elt\x1elta\x1eltd\x1elti\x1eltid\x1eltad\x1eltai\x1eltaid\x1eltaad\x1eltaai\x1eltaaid\x1elc\x1elca\x1elcd\x1elci\x1elcid\x1elcaa\x1elcad\x1elcai\x1elcaid\x1elcaad\x1elcaai\x1elcaaid\x1elo\x1eloa\x1elod\x1eloi\x1eloid\x1eloaa\x1eload\x1eloai\x1eloaid\x1eloaad\x1eloaai\x1eloaaid
SETUVAR --export __FISH_EZA_BASE_ALIASES:l\x1ell\x1elg\x1ele\x1elt\x1elc\x1elo
SETUVAR --export __FISH_EZA_EXPANDED:a\x1ed\x1ei\x1eid\x1eaa\x1ead\x1eai\x1eaid\x1eaad\x1eaai\x1eaaid
SETUVAR --export __FISH_EZA_EXPANDED_OPT_NAME:LA\x1eLD\x1eLI\x1eLID\x1eLAA\x1eLAD\x1eLAI\x1eLAID\x1eLAAD\x1eLAAI\x1eLAAID
SETUVAR --export __FISH_EZA_OPT_NAMES:EZA_L_OPTIONS\x1eEZA_LA_OPTIONS\x1eEZA_LD_OPTIONS\x1eEZA_LI_OPTIONS\x1eEZA_LID_OPTIONS\x1eEZA_LAA_OPTIONS\x1eEZA_LAD_OPTIONS\x1eEZA_LAI_OPTIONS\x1eEZA_LAID_OPTIONS\x1eEZA_LAAD_OPTIONS\x1eEZA_LAAI_OPTIONS\x1eEZA_LAAID_OPTIONS\x1eEZA_LL_OPTIONS\x1eEZA_LG_OPTIONS\x1eEZA_LE_OPTIONS\x1eEZA_LT_OPTIONS\x1eEZA_LC_OPTIONS\x1eEZA_LO_OPTIONS
SETUVAR --export __FISH_EZA_SORT_OPTIONS:name\x1e\x2ename\x1esize\x1eext\x1emod\x1eold\x1eacc\x1ecr\x1einode
SETUVAR __fish_initialized:3400
SETUVAR _fisher_danhper_2F_fish_2D_ssh_2D_agent_files:\x7e/\x2econfig/fish/functions/__ssh_agent_is_started\x2efish\x1e\x7e/\x2econfig/fish/functions/__ssh_agent_start\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fish\x2dssh\x2dagent\x2efish
SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_patrickf1_2F_fzf_2E_fish_files:\x7e/\x2econfig/fish/functions/_fzf_configure_bindings_help\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_extract_var_info\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_changed_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_diff_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_file_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_log\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_status\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_history\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_processes\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_variables\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_wrapper\x2efish\x1e\x7e/\x2econfig/fish/functions/fzf_configure_bindings\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fzf\x2efish\x1e\x7e/\x2econfig/fish/completions/fzf_configure_bindings\x2efish
SETUVAR _fisher_plttn_2F_fish_2D_eza_files:\x7e/\x2econfig/fish/functions/eza_git\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fish\x2deza\x2efish
SETUVAR _fisher_plugins:danhper/fish\x2dssh\x2dagent\x1eplttn/fish\x2deza\x1epatrickf1/fzf\x2efish\x1ejorgebucaran/fisher
SETUVAR _fisher_upgraded_to_4_4:\x1d
SETUVAR fish_color_autosuggestion:brblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:blue
SETUVAR fish_color_comment:red
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:green
SETUVAR fish_color_error:brred
SETUVAR fish_color_escape:brcyan
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:brcyan
SETUVAR fish_color_param:cyan
SETUVAR fish_color_quote:yellow
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_greeting:\x1d
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:yellow\x1e\x2di
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr

View File

@ -0,0 +1,14 @@
function __ssh_agent_is_started -d "check if ssh agent is already started"
if begin; test -f $SSH_ENV; and test -z "$SSH_AGENT_PID"; end
source $SSH_ENV > /dev/null
end
if begin; test -z "$SSH_AGENT_PID"; and test -z "$SSH_CONNECTION"; end
return 1
end
ssh-add -l > /dev/null 2>&1
if test $status -eq 2
return 1
end
end

View File

@ -0,0 +1,5 @@
function __ssh_agent_start -d "start a new ssh agent"
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
chmod 600 $SSH_ENV
source $SSH_ENV > /dev/null
end

View File

@ -0,0 +1,19 @@
# This script was automatically generated by the broot program
# More information can be found in https://github.com/Canop/broot
# This function starts broot and executes the command
# it produces, if any.
# It's needed because some shell commands, like `cd`,
# have no useful effect if executed in a subshell.
function br --wraps=broot
set -l cmd_file (mktemp)
if broot --outcmd $cmd_file $argv
read --local --null cmd < $cmd_file
rm -f $cmd_file
eval $cmd
else
set -l code $status
rm -f $cmd_file
return $code
end
end

View File

@ -1,6 +1,6 @@
function fisher --argument-names cmd --description "A plugin manager for Fish"
set --query fisher_path || set --local fisher_path $__fish_config_dir
set --local fisher_version 4.4.4
set --local fisher_version 4.4.5
set --local fish_plugins $__fish_config_dir/fish_plugins
switch "$cmd"
@ -29,7 +29,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
set --local old_plugins $_fisher_plugins
set --local new_plugins
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins | string replace -- \~ ~)
if ! set --query argv[2]
if test "$cmd" != update
@ -206,7 +206,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
end
printf "%s\n" $commit_plugins >$fish_plugins
string replace --regex -- $HOME \~ $commit_plugins >$fish_plugins
else
set --erase _fisher_plugins
command rm -f $fish_plugins

View File

View File

@ -161,7 +161,7 @@ o.wildignore =
'deps,.svn,CVS,.git,.hg,*.o,*.a,*.class,*.mo,*.la,*.so,*.obj,*.swp,*.jpg,*.png,*.xpm,*.gif,.DS_Store,*.aux,*.out,*.toc'
vim.cmd([[
au BufRead,BufNewFile *.md set tw=80 syntax=markdown
au BufRead,BufNewFile *.md set spell tw=80 syntax=markdown
]])
vim.g.markdown_recommended_style = 0

View File

@ -1,36 +1,5 @@
return {
{{- if eq .chezmoi.os "openbsd" }}
-- snippets
{
"L3MON4D3/LuaSnip",
build = "gmake install_jsregexp",
dependencies = {
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_snipmate").lazy_load()
end,
},
opts = {
history = true,
delete_check_events = "TextChanged",
},
-- stylua: ignore
keys = {
{
"<tab>",
function()
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
end,
expr = true,
silent = true,
mode = "i",
},
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
},
},
-- auto completion
{
"hrsh7th/nvim-cmp",
@ -40,7 +9,13 @@ return {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"saadparwaiz1/cmp_luasnip",
{
"garymjr/nvim-snippets",
opts = {
friendly_snippets = true,
},
dependencies = { "rafamadriz/friendly-snippets" },
},
},
opts = function()
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
@ -72,7 +47,6 @@ return {
TypeParameter = "󰅲",
}
local luasnip = require('luasnip')
local cmp = require("cmp")
local defaults = require("cmp.config.default")()
return {
@ -81,7 +55,7 @@ return {
},
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
vim.snippet.expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
@ -103,7 +77,7 @@ return {
}),
sources = cmp.config.sources({
{ name = "nvim_lsp", keyword_length = 1 },
{ name = "luasnip", keyword_length = 2 },
{ name = "snippets" },
{ name = "path" },
}, {
{ name = "buffer", keyword_length = 3 },
@ -116,7 +90,7 @@ return {
vim_item.menu = ({
buffer = "[Buffer]",
nvim_lsp = "[LSP]",
luasnip = "[LuaSnip]",
snippets = "[Snippets]",
nvim_lua = "[Lua]",
latex_symbols = "[LaTeX]",
})[entry.source.name]
@ -131,6 +105,26 @@ return {
sorting = defaults.sorting,
}
end,
keys = {
{
"<Tab>",
function()
return vim.snippet.active({ direction = 1 }) and "<cmd>lua vim.snippet.jump(1)<cr>" or "<Tab>"
end,
expr = true,
silent = true,
mode = { "i", "s" },
},
{
"<S-Tab>",
function()
return vim.snippet.active({ direction = -1 }) and "<cmd>lua vim.snippet.jump(-1)<cr>" or "<S-Tab>"
end,
expr = true,
silent = true,
mode = { "i", "s" },
},
},
config = function(_, opts)
for _, source in ipairs(opts.sources) do
source.group_index = source.group_index or 1

View File

@ -87,32 +87,31 @@ return {
{
"folke/which-key.nvim",
event = "VeryLazy",
opts_extend = { "spec" },
opts = {
plugins = { spelling = true },
defaults = {
mode = { "n", "v" },
["g"] = { name = "+goto" },
["gs"] = { name = "+surround" },
["]"] = { name = "+next" },
["["] = { name = "+prev" },
["<leader><tab>"] = { name = "+tabs" },
["<leader>b"] = { name = "+buffer" },
["<leader>c"] = { name = "+code" },
["<leader>f"] = { name = "+file/find" },
["<leader>g"] = { name = "+git" },
["<leader>gh"] = { name = "+hunks" },
["<leader>q"] = { name = "+quit/session" },
["<leader>s"] = { name = "+search" },
["<leader>u"] = { name = "+ui" },
["<leader>w"] = { name = "+windows" },
["<leader>x"] = { name = "+diagnostics/quickfix" },
defaults = {},
spec = {
{
mode = { "n", "v" },
{ "<leader><tab>", group = "tabs" },
{ "<leader>b", group = "buffer" },
{ "<leader>c", group = "code" },
{ "<leader>f", group = "file/find" },
{ "<leader>g", group = "git" },
{ "<leader>gh", group = "hunks" },
{ "<leader>q", group = "quit/session" },
{ "<leader>s", group = "search" },
{ "<leader>sn", group = "noice" },
{ "<leader>u", group = "ui" },
{ "<leader>w", group = "windows" },
{ "<leader>x", group = "diagnostics/quickfix" },
{ "[", group = "prev" },
{ "]", group = "next" },
{ "g", group = "goto" },
{ "gs", group = "surround" },
},
},
},
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
wk.register(opts.defaults)
end,
},
-- git signs highlights text that has changed since the list

View File

@ -178,7 +178,7 @@ return {
}
lsp.svelte.setup { on_attach = on_attach }
lsp.perlls.setup { on_attach = on_attach }
lsp.tsserver.setup { on_attach = on_attach }
lsp.ts_ls.setup { on_attach = on_attach }
lsp.lua_ls.setup {
settings = {
Lua = {

View File

@ -1,4 +1,22 @@
return {
{{- if eq .chezmoi.os "openbsd" }}
{
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown" },
code = {
sign = false,
width = "block",
right_pad = 1,
},
heading = {
sign = false,
icons = {},
},
},
ft = { "markdown" },
},
{{- end }}
{
"renerocksai/telekasten.nvim",
lazy = true,

View File

@ -206,6 +206,25 @@ return {
},
-- icons
{
"echasnovski/mini.icons",
lazy = true,
opts = {
file = {
[".keep"] = { glyph = "󰊢", hl = "MiniIconsGrey" },
["devcontainer.json"] = { glyph = "", hl = "MiniIconsAzure" },
},
filetype = {
dotenv = { glyph = "", hl = "MiniIconsYellow" },
},
},
init = function()
package.preload["nvim-web-devicons"] = function()
require("mini.icons").mock_nvim_web_devicons()
return package.loaded["nvim-web-devicons"]
end
end,
},
{
"nvim-tree/nvim-web-devicons",
lazy = true,

View File

@ -1,4 +1,4 @@
syncthing -no-browser -home="/home/jan/.config/syncthing" &
syncthing -no-browser &
unclutter -root -idle 2 -noevents &
xidle -timeout 300 -program "/usr/local/bin/slock" &
feh --no-fehbg --bg-center '/home/jan/.config/background.png'