diff options
Diffstat (limited to 'config')
26 files changed, 523 insertions, 116 deletions
| diff --git a/config/X/xmonad/xmonad.hs b/config/X/xmonad/xmonad.hs index bc1115d..858b39b 100644 --- a/config/X/xmonad/xmonad.hs +++ b/config/X/xmonad/xmonad.hs @@ -244,7 +244,7 @@ defaults = ewmh def {          , ("M-S-<L>",   CWS.shiftToPrev >> CWS.prevWS)          , ("M-m",       spawn "emacs")          -- launch firefox -        , ("M-b",       spawn "firefox") +        , ("M-b",       spawn "$BROWSER")          -- take screenshots          , ("M-s",       spawn "maim ~/pictures/screenshot-$(date +%y%m%d_%H_%M_%S).png")          , ("M-C-s",   spawn "maim -i $(xdotool getactivewindow) ~/pictures/screenshot-$(date +%y%m%d_%H_%M_%S).png") diff --git a/config/common/mpd/mpd.conf b/config/common/mpd/mpd.conf index dda6f45..606c8d4 100644 --- a/config/common/mpd/mpd.conf +++ b/config/common/mpd/mpd.conf @@ -18,3 +18,10 @@ audio_output {  	always_on       "yes"			# prevent MPD from disconnecting all listeners when playback is stopped.  	tags            "yes"			# httpd supports sending tags to listening streams.  } + +audio_output { +	type "fifo" +	name "fifo" +	path "~/.config/mpd/mpd.fifo" +	format "44100:16:2" +} diff --git a/config/common/ncmpcpp/config b/config/common/ncmpcpp/config index 9a87787..2136109 100644 --- a/config/common/ncmpcpp/config +++ b/config/common/ncmpcpp/config @@ -445,7 +445,7 @@  ##  ## Note: You can define startup screen by choosing screen from the list above.  ## -startup_screen = browser +# startup_screen = browser  #  ##  ## Note: You can define startup slave screen by choosing screen from the list @@ -508,7 +508,7 @@ startup_screen = browser  #  #media_library_sort_by_mtime = no  # -enable_window_title = no +# enable_window_title = no  #  ##  ## Note: You can choose default search mode for search engine. Available modes @@ -595,4 +595,11 @@ enable_window_title = no  #window_border_color = green  #  #active_window_border = red -# + +startup_screen = browser +enable_window_title = no +visualizer_data_source = "~/.config/mpd/mpd.fifo" +visualizer_output_name = "fifo" +visualizer_in_stereo = "yes" +visualizer_type = "spectrum" +visualizer_look = "+|" diff --git a/config/common/newsboat/config b/config/common/newsboat/config index 84e6490..5f93d68 100644 --- a/config/common/newsboat/config +++ b/config/common/newsboat/config @@ -1,4 +1,4 @@ -browser firefox +browser linkhandler  # from contrib  color background          color15    default @@ -30,4 +30,12 @@ bind-key a toggle-article-read  show-keymap-hint no  swap-title-and-hints yes -browser linkhandler +download-path "~/dl" +max-downloads 2 +player "mpv" + +urls-source "miniflux" +miniflux-url "http://192.168.178.79:24961/" +miniflux-login "debuc" +miniflux-passwordeval "pass show db/miniflux | head -n 1" +miniflux-min-items 0 diff --git a/config/common/newsboat/urls b/config/common/newsboat/urls new file mode 100644 index 0000000..7245bfc --- /dev/null +++ b/config/common/newsboat/urls @@ -0,0 +1,3 @@ + +"query:Unread:unread = \"yes\"" + diff --git a/config/common/tmux/tmux.conf b/config/common/tmux/tmux.conf index 40a9cb7..45166c0 100755 --- a/config/common/tmux/tmux.conf +++ b/config/common/tmux/tmux.conf @@ -25,8 +25,7 @@ set -g focus-events on  bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded ~/.tmux.conf"  # Clipboard  bind -T copy-mode-vi v send-keys -X begin-selection -bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -r -selection clipboard" -bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -r -selection clipboard" +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "oclipp"  # Unbind ESC  set -sg escape-time 0  # Toggle status bar diff --git a/config/essentials/nvim/after/plugin/dap.lua b/config/essentials/nvim/after/plugin/dap.lua new file mode 100644 index 0000000..e32b5ee --- /dev/null +++ b/config/essentials/nvim/after/plugin/dap.lua @@ -0,0 +1,40 @@ +local dap = require('dap') + +dap.adapters.coreclr = { +  type = 'executable', +  command = 'netcoredbg', +  args = {'--interpreter=vscode'} +} + +dap.configurations.cs = { +  { +    type = "coreclr", +    name = "launch - netcoredbg", +    request = "launch", +    program = function() +        return vim.fn.input('Path to dll', vim.fn.getcwd() .. '/bin/Debug/', 'file') +    end, +  }, +} + +local function nnoremap(rhs, lhs, bufopts, desc) +  bufopts.desc = desc +  vim.keymap.set("n", rhs, lhs, bufopts) +end +local bufopts = { noremap=true, silent=true } + + +nnoremap('<F5>' , dap.continue, bufopts, "Continue") +nnoremap('<F6>' , dap.disconnect, bufopts, "Continue") +nnoremap('<F10>' , dap.step_over, bufopts, "Step over") +nnoremap('<F11>' , dap.step_into, bufopts, "Step into") +nnoremap('<F12>' , dap.step_out, bufopts, "Step out") +nnoremap('<Leader>b' , dap.toggle_breakpoint, bufopts, "Toggle breakpoint") + +nnoremap('<Leader>B' , function() dap.set_breakpoint(vim.fn.input('Breakpoint condition: ')) +	end, bufopts, "Set breakpoint") +nnoremap('<Leader>lp' , function() dap.set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) +	end, bufopts, "set breakpoint with log point message") + +nnoremap('<Leader>dr' , dap.repl.open, bufopts, "Reply open") +nnoremap('<Leader>dl' , dap.run_last, bufopts, "Run las") diff --git a/config/essentials/nvim/after/plugin/dapui.lua b/config/essentials/nvim/after/plugin/dapui.lua new file mode 100644 index 0000000..faec590 --- /dev/null +++ b/config/essentials/nvim/after/plugin/dapui.lua @@ -0,0 +1,94 @@ +local dap, dapui = require("dap"), require("dapui") + +dapui.setup({ +  icons = { expanded = "▾", collapsed = "▸", current_frame = "▸" }, +  mappings = { +    -- Use a table to apply multiple mappings +    expand = { "<CR>", "<2-LeftMouse>" }, +    open = "o", +    remove = "d", +    edit = "e", +    repl = "r", +    toggle = "t", +  }, +  -- Use this to override mappings for specific elements +  element_mappings = { +    -- Example: +    -- stacks = { +    --   open = "<CR>", +    --   expand = "o", +    -- } +  }, +  -- Expand lines larger than the window +  -- Requires >= 0.7 +  expand_lines = vim.fn.has("nvim-0.7") == 1, +  -- Layouts define sections of the screen to place windows. +  -- The position can be "left", "right", "top" or "bottom". +  -- The size specifies the height/width depending on position. It can be an Int +  -- or a Float. Integer specifies height/width directly (i.e. 20 lines/columns) while +  -- Float value specifies percentage (i.e. 0.3 - 30% of available lines/columns) +  -- Elements are the elements shown in the layout (in order). +  -- Layouts are opened in order so that earlier layouts take priority in window sizing. +  layouts = { +    { +      elements = { +      -- Elements can be strings or table with id and size keys. +        { id = "scopes", size = 0.25 }, +        "breakpoints", +        "stacks", +        "watches", +      }, +      size = 40, -- 40 columns +      position = "left", +    }, +    { +      elements = { +        "repl", +        "console", +      }, +      size = 0.25, -- 25% of total lines +      position = "bottom", +    }, +  }, +  controls = { +    -- Requires Neovim nightly (or 0.8 when released) +    enabled = true, +    -- Display controls in this element +    element = "repl", +    icons = { +      pause = "", +      play = "", +      step_into = "", +      step_over = "", +      step_out = "", +      step_back = "", +      run_last = "↻", +      terminate = "□", +    }, +  }, +  floating = { +    max_height = nil, -- These can be integers or a float between 0 and 1. +    max_width = nil, -- Floats will be treated as percentage of your screen. +    border = "single", -- Border style. Can be "single", "double" or "rounded" +    mappings = { +      close = { "q", "<Esc>" }, +    }, +  }, +  windows = { indent = 1 }, +  render = { +    max_type_length = nil, -- Can be integer or nil. +    max_value_lines = 100, -- Can be integer or nil. +  } +}) + + +dap.listeners.after.event_initialized["dapui_config"] = function() +  dapui.open() +end +dap.listeners.before.event_terminated["dapui_config"] = function() +  dapui.close() +end +dap.listeners.before.event_exited["dapui_config"] = function() +  dapui.close() +end + diff --git a/config/essentials/nvim/after/plugin/luasnip.lua b/config/essentials/nvim/after/plugin/luasnip.lua index 5657560..3f607ab 100644 --- a/config/essentials/nvim/after/plugin/luasnip.lua +++ b/config/essentials/nvim/after/plugin/luasnip.lua @@ -155,6 +155,10 @@ ls.add_snippets("sh", {  		stty \$old_stty_cfg  	}  	]], {}), +	parse("fdie", +	[[ +	die () { >&2 printf '%s\n' "\$@"; exit 1; } +	]], {}),  	parse("flogn",  	[[  	logn () { >&2 printf '%s\n' "\$@"; } @@ -202,6 +206,10 @@ ls.add_snippets("javascript", {  	{ i(1), rep(1), i(0) })),  }) +ls.add_snippets("cs", { +	parse("cw", "Console.WriteLine($1);$0"), +}) +  ls.add_snippets("telekasten", {  	--link  	s("ln", fmt( diff --git a/config/essentials/nvim/ftplugin/telekasten.lua b/config/essentials/nvim/ftplugin/telekasten.lua index 622972f..9454cc1 100644 --- a/config/essentials/nvim/ftplugin/telekasten.lua +++ b/config/essentials/nvim/ftplugin/telekasten.lua @@ -10,17 +10,17 @@ vim.cmd("hi link CalNavi CalRuler")  vim.cmd("hi tkTagSep ctermfg=gray guifg=gray")  vim.cmd("hi tkTag ctermfg=175 guifg=#d3869B") -vim.keymap.set("n", "<LocalLeader>a", "<cmd>Telekasten show_tags<cr>") -vim.keymap.set("n", "<LocalLeader>b", "<cmd>Telekasten show_backlinks<cr>") -vim.keymap.set("n", "<LocalLeader>c", "<cmd>Telekasten show_calendar<cr>") +vim.keymap.set("n", "<LocalLeader>a", require("telekasten").show_tags) +vim.keymap.set("n", "<LocalLeader>b", require("telekasten").show_backlinks) +vim.keymap.set("n", "<LocalLeader>c", require("telekasten").show_calendar)  vim.keymap.set("n", "<LocalLeader>C", "<cmd>CalendarT<cr>")  vim.keymap.set({"n", "i"}, "<LocalLeader>i", "<Esc><cmd>Telekasten insert_link<cr>") -vim.keymap.set({"n", "i"}, "<LocalLeader>I", "<cmd>Telekasten insert_img_link<cr>") -vim.keymap.set("n", "<LocalLeader>F", "<cmd>Telekasten find_friends<cr>") -vim.keymap.set("n", "<LocalLeader>r", "<cmd>Telekasten rename_note<cr>") -vim.keymap.set("n", "<LocalLeader>t", "<cmd>Telekasten toggle_todo<cr>") +vim.keymap.set({"n", "i"}, "<LocalLeader>I", require("telekasten").insert_img_link) +vim.keymap.set("n", "<LocalLeader>F", require("telekasten").find_friends) +vim.keymap.set("n", "<LocalLeader>r", require("telekasten").rename_note) +vim.keymap.set("n", "<LocalLeader>t", require("telekasten").toggle_todo)  vim.keymap.set("i", "<LocalLeader>t", "<cmd>Telekasten toggle_todo<cr><Esc>A") -vim.keymap.set("n", "<LocalLeader>y", "<cmd>Telekasten yank_notelink<cr>") -vim.keymap.set("n", "<LocalLeader>z", "<cmd>Telekasten follow_link<cr>") +vim.keymap.set("n", "<LocalLeader>y", require("telekasten").yank_notelink) +vim.keymap.set("n", "<LocalLeader>z", require("telekasten").follow_link)  vim.keymap.set("i", "<LocalLeader>l", "<esc>I[<esc>A]()<left><C-r>+<esc>A") diff --git a/config/essentials/nvim/lua/user/aucommands.vim b/config/essentials/nvim/lua/user/aucommands.vim index 873f9c9..cdd0ae7 100644 --- a/config/essentials/nvim/lua/user/aucommands.vim +++ b/config/essentials/nvim/lua/user/aucommands.vim @@ -8,7 +8,6 @@ augroup END  " terminal specific layout  augroup neovim_terminal autocmd!   	autocmd TermOpen * startinsert  -	autocmd TermOpen * :GitGutterBufferDisable  	autocmd TermOpen * :set nonumber norelativenumber signcolumn=no  	autocmd TermOpen * nnoremap <buffer> <C-c> i<C-c>   augroup END diff --git a/config/essentials/nvim/lua/user/cmp/init.lua b/config/essentials/nvim/lua/user/cmp/init.lua index d40a67c..1ca0a10 100644 --- a/config/essentials/nvim/lua/user/cmp/init.lua +++ b/config/essentials/nvim/lua/user/cmp/init.lua @@ -4,11 +4,12 @@ require("user.cmp.arduino")  require("user.cmp.bash")  require("user.cmp.clangd")  require("user.cmp.cs") -require("user.cmp.html")  require("user.cmp.css") +require("user.cmp.emmet") +require("user.cmp.html")  require("user.cmp.java")  require("user.cmp.js") -require("user.cmp.emmet")  require("user.cmp.lua") +require("user.cmp.php")  require("user.cmp.python") -require("user.cmp.cs") +require("user.cmp.rust") diff --git a/config/essentials/nvim/lua/user/cmp/php.lua b/config/essentials/nvim/lua/user/cmp/php.lua new file mode 100644 index 0000000..9b2fa18 --- /dev/null +++ b/config/essentials/nvim/lua/user/cmp/php.lua @@ -0,0 +1 @@ +require'lspconfig'.phpactor.setup{} diff --git a/config/essentials/nvim/lua/user/cmp/rust.lua b/config/essentials/nvim/lua/user/cmp/rust.lua new file mode 100644 index 0000000..46a97eb --- /dev/null +++ b/config/essentials/nvim/lua/user/cmp/rust.lua @@ -0,0 +1,173 @@ +require'lspconfig'.rust_analyzer.setup{ +	settings = { +		['rust-analyzer'] = { +			diagnostics = { +				enable = false; +			} +		} +	}, +	capabilities = +	{ +		experimental = { +			serverStatusNotification = true +		}, +		general = { +			positionEncodings = { "utf-16" } +		}, +		textDocument = { +			callHierarchy = { +				dynamicRegistration = false +			}, +			codeAction = { +				codeActionLiteralSupport = { +					codeActionKind = { +						valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" } +					} +				}, +				dataSupport = true, +				dynamicRegistration = true, +				isPreferredSupport = true, +				resolveSupport = { +					properties = { "edit" } +				} +			}, +			completion = { +				completionItem = { +					commitCharactersSupport = false, +					deprecatedSupport = false, +					documentationFormat = { "markdown", "plaintext" }, +					preselectSupport = false, +					snippetSupport = false +				}, +				completionItemKind = { +					valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 } +				}, +				contextSupport = false, +				dynamicRegistration = false +			}, +			declaration = { +				linkSupport = true +			}, +			definition = { +				dynamicRegistration = true, +				linkSupport = true +			}, +			diagnostic = { +				dynamicRegistration = false +			}, +			documentHighlight = { +				dynamicRegistration = false +			}, +			documentSymbol = { +				dynamicRegistration = false, +				hierarchicalDocumentSymbolSupport = true, +				symbolKind = { +					valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } +				} +			}, +			formatting = { +				dynamicRegistration = true +			}, +			hover = { +				contentFormat = { "markdown", "plaintext" }, +				dynamicRegistration = true +			}, +			implementation = { +				linkSupport = true +			}, +			inlayHint = { +				dynamicRegistration = true, +				resolveSupport = { +					properties = {} +				} +			}, +			publishDiagnostics = { +				dataSupport = true, +				relatedInformation = true, +				tagSupport = { +					valueSet = { 1, 2 } +				} +			}, +			rangeFormatting = { +				dynamicRegistration = true +			}, +			references = { +				dynamicRegistration = false +			}, +			rename = { +				dynamicRegistration = true, +				prepareSupport = true +			}, +			semanticTokens = { +				augmentsSyntaxTokens = true, +				dynamicRegistration = false, +				formats = { "relative" }, +				multilineTokenSupport = false, +				overlappingTokenSupport = true, +				requests = { +					full = { +						delta = true +					}, +					range = false +				}, +				serverCancelSupport = false, +				tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" }, +				tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" } +			}, +			signatureHelp = { +				dynamicRegistration = false, +				signatureInformation = { +					activeParameterSupport = true, +					documentationFormat = { "markdown", "plaintext" }, +					parameterInformation = { +						labelOffsetSupport = true +					} +				} +			}, +			synchronization = { +				didSave = true, +				dynamicRegistration = false, +				willSave = true, +				willSaveWaitUntil = true +			}, +			typeDefinition = { +				linkSupport = true +			} +		}, +		window = { +			showDocument = { +				support = true +			}, +			showMessage = { +				messageActionItem = { +					additionalPropertiesSupport = false +				} +			}, +			workDoneProgress = true +		}, +		workspace = { +			applyEdit = true, +			configuration = true, +			didChangeWatchedFiles = { +				dynamicRegistration = true, +				relativePatternSupport = true +			}, +			inlayHint = { +				refreshSupport = true +			}, +			semanticTokens = { +				refreshSupport = true +			}, +			symbol = { +				dynamicRegistration = false, +				symbolKind = { +					valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 } +				} +			}, +			workspaceEdit = { +				resourceOperations = { "rename", "create", "delete" } +			}, +			workspaceFolders = true +		} +	} +} diff --git a/config/essentials/nvim/lua/user/cmp/setup.lua b/config/essentials/nvim/lua/user/cmp/setup.lua index 36d55e3..bb91e31 100644 --- a/config/essentials/nvim/lua/user/cmp/setup.lua +++ b/config/essentials/nvim/lua/user/cmp/setup.lua @@ -1,4 +1,4 @@ -local cmp = require'cmp' +local cmp = require 'cmp'  cmp.setup({  	snippet = {  		expand = function(args) @@ -14,11 +14,11 @@ cmp.setup({  		['<C-f>'] = cmp.mapping.scroll_docs(4),  		['<C-Space>'] = cmp.mapping.complete(),  		['<C-c>'] = cmp.mapping.abort(), -		['<C-k>'] = cmp.mapping.confirm({ select = true }), +		['<C-y>'] = cmp.mapping.confirm({ select = true }),  	}),  	sources = cmp.config.sources({  		{ name = 'nvim_lua' }, -		{ name = 'nvim_lsp'}, +		{ name = 'nvim_lsp' },  		{ name = 'path' },  		{ name = 'luasnip' },  		{ name = 'nvim_lsp_signature_help' }, @@ -44,21 +44,22 @@ cmp.setup.cmdline(':', {  })  local function nnoremap(rhs, lhs, bufopts, desc) -  bufopts.desc = desc -  vim.keymap.set("n", rhs, lhs, bufopts) +	bufopts.desc = desc +	vim.keymap.set("n", rhs, lhs, bufopts)  end +vim.keymap.set('c', '<tab>', '<C-z>', { silent = false }) -- to fix cmp  -- Regular Neovim LSP client keymappings -local bufopts = { noremap=true, silent=true } +local bufopts = { noremap = true, silent = true }  nnoremap('gD', vim.lsp.buf.declaration, bufopts, "Go to declaration")  nnoremap('gd', vim.lsp.buf.definition, bufopts, "Go to definition")  nnoremap('gi', vim.lsp.buf.implementation, bufopts, "Go to implementation")  nnoremap('K', vim.lsp.buf.hover, bufopts, "Hover text") -nnoremap('<C-k>', vim.lsp.buf.signature_help, bufopts, "Show signature") +nnoremap('<leader>k', vim.lsp.buf.signature_help, bufopts, "Show signature")  nnoremap('<leader>wa', vim.lsp.buf.add_workspace_folder, bufopts, "Add workspace folder")  nnoremap('<leader>wr', vim.lsp.buf.remove_workspace_folder, bufopts, "Remove workspace folder")  nnoremap('<leader>wl', function() -print(vim.inspect(vim.lsp.buf.list_workspace_folders())) +	print(vim.inspect(vim.lsp.buf.list_workspace_folders()))  end, bufopts, "List workspace folders")  nnoremap('<leader>D', vim.lsp.buf.type_definition, bufopts, "Go to type definition")  nnoremap('<leader>rn', vim.lsp.buf.rename, bufopts, "Rename") diff --git a/config/essentials/nvim/lua/user/packer.lua b/config/essentials/nvim/lua/user/packer.lua index 605c0e2..94d4dff 100644 --- a/config/essentials/nvim/lua/user/packer.lua +++ b/config/essentials/nvim/lua/user/packer.lua @@ -49,7 +49,7 @@ return require('packer').startup(function(use)  	use('ojroques/vim-oscyank', {branch = "main"})  	use("potamides/pantran.nvim")  	use('alx741/vinfo') -	use('github/copilot.vim') +	-- use('github/copilot.vim')  	-- objects  	use('michaeljsmith/vim-indent-object') @@ -65,7 +65,9 @@ return require('packer').startup(function(use)  	use('hrsh7th/cmp-nvim-lsp-signature-help')  	use('alvan/vim-closetag') +	-- debugging  	use('mfussenegger/nvim-dap') +	use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} }  	-- java  	use('mfussenegger/nvim-jdtls') diff --git a/config/essentials/nvim/lua/user/zk.lua b/config/essentials/nvim/lua/user/zk.lua index ee055d6..989560a 100644 --- a/config/essentials/nvim/lua/user/zk.lua +++ b/config/essentials/nvim/lua/user/zk.lua @@ -1,5 +1,6 @@  local home = vim.fn.expand("~/docs/zk") -require('telekasten').setup({ + +require("telekasten").setup({  	home         = home,  	take_over_my_home = true,  	auto_set_filetype = true, @@ -65,8 +66,8 @@ require('telekasten').setup({  			template_new_note = home .. "/" .. "templates/new_note.md",  			new_note_filename = "title",  		}, -		dotNetEssentials = { -			home = home .. "/" .. "dotNetEssentials", +		NETEssentials = { +			home = home .. "/" .. "NETEssentials",  			template_new_note = home .. "/" .. "templates/new_note.md",  			new_note_filename = "title",  		}, @@ -75,6 +76,16 @@ require('telekasten').setup({  			template_new_note = home .. "/" .. "templates/new_note.md",  			new_note_filename = "title",  		}, +		ScalingNetworks = { +			home = home .. "/" .. "ScalingNetworks", +			template_new_note = home .. "/" .. "templates/new_note.md", +			new_note_filename = "title", +		}, +		RoutingSwitchingEssentials = { +			home = home .. "/" .. "RoutingSwitchingEssentials", +			template_new_note = home .. "/" .. "templates/new_note.md", +			new_note_filename = "title", +		},  		SoftwareDesign2 = {  			home = home .. "/" .. "SoftwareDesign2",  			template_new_note = home .. "/" .. "templates/new_note.md", @@ -88,21 +99,21 @@ require('telekasten').setup({  	}  }) -vim.keymap.set("n", "<leader>z", "<cmd>Telekasten panel<cr>") -vim.keymap.set("n", "<leader>zb", "<cmd>Telekasten show_backlinks<cr>") -vim.keymap.set("n", "<leader>zz", "<cmd>Telekasten follow_link<cr>") -vim.keymap.set("n", "<leader>zN", "<cmd>Telekasten new_templated_note<cr>") -vim.keymap.set("n", "<leader>zT", "<cmd>Telekasten goto_today<cr>") -vim.keymap.set("n", "<leader>zW", "<cmd>Telekasten goto_thisweek<cr>") -vim.keymap.set("n", "<leader>zd", "<cmd>Telekasten find_daily_notes<cr>") -vim.keymap.set("n", "<leader>zf", "<cmd>Telekasten find_notes<cr>") -vim.keymap.set("n", "<leader>zg", "<cmd>Telekasten search_notes<cr>") -vim.keymap.set("n", "<leader>zm", "<cmd>Telekasten browse_media<cr>") -vim.keymap.set("n", "<leader>zn", "<cmd>Telekasten new_note<cr>") -vim.keymap.set("n", "<leader>zp", "<cmd>Telekasten preview_img<cr>") -vim.keymap.set("n", "<leader>zr", "<cmd>Telekasten rename_note<cr>") -vim.keymap.set("n", "<leader>zs", "<cmd>Telekasten switch_vault<cr>") -vim.keymap.set("n", "<leader>zS", "<cmd>Telekasten search_notes<cr>") -vim.keymap.set("n", "<leader>zt", "<cmd>Telekasten panel<cr>") -vim.keymap.set("n", "<leader>zw", "<cmd>Telekasten find_weekly_notes<cr>") -vim.keymap.set("n", "<leader>z#", "<cmd>Telekasten show_tags<cr>") +vim.keymap.set("n", "<leader>z", require("telekasten").panel) +vim.keymap.set("n", "<leader>zb", require("telekasten").show_backlinks) +vim.keymap.set("n", "<leader>zz", require("telekasten").follow_link) +vim.keymap.set("n", "<leader>zN", require("telekasten").new_templated_note) +vim.keymap.set("n", "<leader>zT", require("telekasten").goto_today) +vim.keymap.set("n", "<leader>zW", require("telekasten").goto_thisweek) +vim.keymap.set("n", "<leader>zd", require("telekasten").find_daily_notes) +vim.keymap.set("n", "<leader>zf", require("telekasten").find_notes) +vim.keymap.set("n", "<leader>zg", require("telekasten").search_notes) +vim.keymap.set("n", "<leader>zm", require("telekasten").browse_media) +vim.keymap.set("n", "<leader>zn", require("telekasten").new_note) +vim.keymap.set("n", "<leader>zp", require("telekasten").preview_img) +vim.keymap.set("n", "<leader>zr", require("telekasten").rename_note) +vim.keymap.set("n", "<leader>zs", require("telekasten").switch_vault) +vim.keymap.set("n", "<leader>zS", require("telekasten").search_notes) +vim.keymap.set("n", "<leader>zt", require("telekasten").panel) +vim.keymap.set("n", "<leader>zw", require("telekasten").find_weekly_notes) +vim.keymap.set("n", "<leader>z#", require("telekasten").show_backlinks) diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 1260bb0..414a7d7 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -18,31 +18,26 @@ zle -N edit-command-line  zstyle ':compinstall' filename '/home/aluc/.zshrc'  zstyle ':completion:*' menu select  autoload -Uz compinit -compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION  autoload -Uz surround  zle -N delete-surround surround  zle -N add-surround surround  zle -N change-surround surround  compinit -if grep -qi "debian\|ubuntu" /usr/lib/os-release /etc/os-release 2>/dev/null -then -    sfiles=( -        /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh -        /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -    ) -else -    sfiles=( -        /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh -        /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh) -fi -sfiles+=( -		~/.config/zsh/functions.zsh -		~/.config/zsh/aliases.sh -) -for f in "${sfiles[@]}"; do -    test -f "$f" && source "$f" +# Source files +. $ZDOTDIR/functions.zsh +. $ZDOTDIR/aliases.sh + +local PLUGPATH +for file in /etc/os-release /usr/lib/os-release +do [ -f "$file" ] && . "$file" && break  done +case "${ID:=unknown}" in +	debian|ubuntu) PLUGPATH=/usr/share/ ;; +	*) PLUGPATH=/usr/share/zsh/plugins ;; +esac +. $PLUGPATH/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +. $PLUGPATH/zsh-autosuggestions/zsh-autosuggestions.zsh  bindkey -v  bindkey -a cs change-surround @@ -121,14 +116,9 @@ RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(par  setopt prompt_subst  parse_git_remote() { -	b="$(git branch -v 2>/dev/null | grep "^*" | cut -f2 -d'[' | cut -f1 -d' ')" -	if [ "$b" = "behind" ] -	then -		printf "↓ " -	elif [ "$b" = "ahead" ] -	then -		printf "↑ " -	fi +	git branch -v 2>/dev/null | +		grep '^\*' | cut -f2 -d'[' | cut -f1 -d' ' | +		sed 's/ahead/↑ /;s/behind/↓ /;s/\*//'  }  parse_git_branch() {      git symbolic-ref --short HEAD 2> /dev/null || git rev-parse --short HEAD 2> /dev/null @@ -137,6 +127,23 @@ parse_git_status() {  	git status --short 2> /dev/null | head -n1 | awk '{print $1 " "}'  } +# Completion +_dotnet_zsh_complete() +{ +  local completions=("$(dotnet complete "$words")") + +  # If the completion list is empty, just continue with filename selection +  if [ -z "$completions" ] +  then +    _arguments '*::arguments: _normal' +    return +  fi + +  # This is not a variable assignment, don't remove spaces! +  _values = "${(ps:\n:)completions}" +} +compdef _dotnet_zsh_complete dotnet +  export REPORTTIME=2  export TIMEFMT="-> %*E"  # override built-in time command diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index ea1c719..4aff77e 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -121,7 +121,6 @@ alias trclipo='transmission-remote debuc.com -a "$(clipo)"'  alias grub-update='doas grub-mkconfig -o /boot/grub/grub.cfg'  # vim -alias scr='nvim +"setlocal buftype=nofile bufhidden=hide noswapfile filetype=txt" scratch'  alias vimp="vim '+PlugInstall'"  alias nvimp="nvim '+PackerSync'"  alias nvg='git status > /dev/null 2>&1 && nvim "+Git"' @@ -173,7 +172,7 @@ alias pipreq='pip install -r requirements.txt'  alias ch='chown ${USER}:${USER} -R'  alias kll='killall' -alias pi='ping archlinux.org -c4' +alias pi='ping 9.9.9.9 -c4'  alias sba='source env/bin/activate || source bin/activate'  alias smc='systemctl'  alias dsmc='doas systemctl' @@ -206,13 +205,16 @@ alias est='$EDITOR ~/proj/suckless/st/config.def.h'  alias esl='$EDITOR ~/proj/suckless/slock/config.def.h'  alias esls='$EDITOR ~/proj/suckless/slstatus/config.def.h'  alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' +alias ehyb='$EDITOR ~/.config/hypr/binds.conf'  alias ewbj='$EDITOR ~/src/dotfiles/config/hyprland/waybar/config.jsonc'  alias ewbs='$EDITOR ~/src/dotfiles/config/hyprland/waybar/style.css'  alias cfd='$EDITOR config.def.h'  # /# quick cd
jV}k:!sort -t "'" -k 2
  alias cdl='cd ~/dl'  alias cdoc='cd ~/docs' +alias czk='cd ~/docs/zk'  alias cda='cd ~/docs/android/projects' +alias csv='cd ~/docs/school/Vakken'  alias cdm='cd ~/music'  alias cdp='cd ~/pics'  alias cdpa='cd ~/pics/ai-outputs/' @@ -239,17 +241,21 @@ alias czo='cd ~/zot/'  alias cdpw='cd ${PASSWORD_STORE_DIR:-~/.password-store}'  alias cdng='cd /etc/nginx'  alias cdrs='cd /srv/' +alias god='cd "$(find . -mindepth 1 -maxdepth 1 -type d | fzf)"'  # fzf aliases -alias ppj='cd ~/proj/personal/"$(find ~/proj/personal -mindepth 1 -maxdepth 1 -type d -printf "%f\n"| fzf)"' -alias fil='$EDITOR ~/docs/filios/"$(find ~/docs/filios -type f -printf "%f\n" | fzf)"' -alias cfg='find -L ~/src/dotfiles -type f 2> /dev/null | fzf | xargs -r $EDITOR' +alias ppj='cd ~/proj/personal/"$(find ~/proj/personal -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"' +alias ppjs='cd ~/proj/personal/scripts/"$(find ~/proj/personal/scripts -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"' +alias scr='edit_in_dir ~/proj/personal/scripts/' +alias fil='edit_in_dir ~/docs/filios/' +alias cfg='edit_in_dir ~/src/dotfiles'  alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp'  alias asf='alias | fzf'  alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp"  alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl clients -j | jq '\''.[] | select(.pid == {}) | {class, title, workspace, xwayland}'\''"'  alias pff='find ${PASSWORD_STORE_DIR:=~/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c'  alias fzps='fzf --print0 | xargs -0I{}' +alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s - %(title)s.%(ext)s"'  alias dcb='docker build'  alias dcbt='docker build -t' @@ -265,6 +271,8 @@ alias sshdb='ssh -t db "tmux a || tmux"'  alias dbsmu='rsync -aPz db:/media/basilisk/music/ /media/kilimanjaro/music'  # oh-my-zsh git aliases +alias gitdotf='GIT_WORK_TREE=~/src/dotfiles/ GIT_DIR=~/src/dotfiles/.git' +alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs $EDITOR'  alias g='git'  alias ga='git add'  alias gaa='git add --all' diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 35aaf58..85efda4 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -32,6 +32,7 @@ ranger() { test -z "$RANGER_LEVEL" && /usr/bin/ranger "$@" || exit }  # googoo aliases  _googoo_fzf_opt()  { +	unset dest opt  	if [ "$1" ]  	then  		[ -d "$1" ] && dest="$1" || opt="-q $1" @@ -65,6 +66,7 @@ oclip() { printf "\033]52;c;$(echo -n "$@" | base64)\a"; }  sms() { ssh -t phone sendmsg "$1" "'$2'"; }  trcp() { scp "$1" db:/media/basilisk/downloads/transmission/torrents/; }  rln() { ln -s "$(readlink -f "$1")" "$2"; } +getgit() { git clone git@db:"$1"; }  ipc()   { @@ -99,9 +101,7 @@ clip() {  }  unzipp() { -    file=$1 -    shift -    unzip $file $@ || exit 1 +	unzip -- "$(readlink -f -- "$1")" || return 1      rm $file  } @@ -243,10 +243,9 @@ pacsize()  mime-default ()  {  	logn "Setting '$1' as default for its mimetypes" -	grep "MimeType=" /usr/share/applications/"$1" | -		cut -d '=' -f 2- | -		tr ';' '\n' | -		xargs -I {} xdg-mime default "$1" "{}" +	grep "MimeType=" /usr/share/applications/"$1".desktop | +		cut -d '=' -f 2- | tr ';' '\0' | +		xargs -0I{} xdg-mime default "$1".desktop "{}"  	logn "Done."  } @@ -287,3 +286,9 @@ resize()  		return 1  	convert -resize $1^ -gravity center -crop $1+0+0 -- "$2" "${3:-$1}"  } + +edit_in_dir() {  +	file="$1/$(goo f "$1" | sed "s@^$1@@" | fzf)" +	[ -f "$file" ] || return 1 +	$EDITOR "$file" +} diff --git a/config/home/.zshenv b/config/home/.zshenv index 32c92f4..cfaef9c 100644 --- a/config/home/.zshenv +++ b/config/home/.zshenv @@ -2,7 +2,7 @@  export EDITOR="nvim"  export VISUAL="nvim" -export BROWSER="firefox" +export BROWSER="librewolf"  export VIEWER="zathura"  export PLAYER="mpv" @@ -69,3 +69,4 @@ export PATH="$HOME/bin:$PATH"  export PATH="$HOME/go/bin:$PATH"  export PATH="$XDG_CONFIG_HOME/cargo/bin:$PATH"  export PATH="$PATH:./node_modules/.bin" +export PATH="$PATH:$HOME/.dotnet/tools" diff --git a/config/hyprland/hypr/binds.conf b/config/hyprland/hypr/binds.conf index d52392c..9219f84 100644 --- a/config/hyprland/hypr/binds.conf +++ b/config/hyprland/hypr/binds.conf @@ -13,19 +13,6 @@ bind = $mainMod, F, togglefloating,  bind = $mainMod SHIFT, P, pseudo  bind = $mainMod, S, togglesplit -bind = $mainMod, A, submap, applications -submap = applications -bind = $mainMod, B, exec, firefox -bind = , B, exec, firefox -bind = $mainMod, T, exec, $term -e tmux a || tmux -bind = , T, exec, $term -e tmux a || tmux -bind = $mainMod, D, exec, foot -e ssh -t db tmux a -bind = , D, exec, foot -e ssh -t db tmux a -bind = $mainMod, M, exec, gamelaunch -bind = , M, exec, gamelaunch -source = ./reset-submap.conf -submap = reset -  bind = $mainMod, E, focusmonitor, +1  bind = $mainMod, W, focusmonitor, -1  binde = $mainMod, H, movefocus, l @@ -84,6 +71,28 @@ bind = $mainMod, mouse_up, workspace, e-1  bindm = $mainMod, mouse:272, movewindow  bindm = $mainMod, mouse:273, resizewindow +bind = $mainMod, A, submap, apps +submap = apps +bind = $mainMod, D, exec, discord +bind = , D, exec, discord +bind = $mainMod, B, exec, $BROWSER +bind = , B, exec, $BROWSER +bind = $mainMod, G, exec, lutris +bind = , G, exec, lutris +bind = $mainMod, M, exec, mclaunch +bind = , M, exec, mclaunch +source = ./reset-submap.conf +submap = reset + +bind = $mainMod, T, submap, termapps +submap = termapps +bind = $mainMod, T, exec, $term -e tmux a || tmux +bind = , T, exec, $term -e tmux a || tmux +bind = $mainMod, D, exec, foot -e ssh -t db tmux a +bind = , D, exec, foot -e ssh -t db tmux a +source = ./reset-submap.conf +submap = reset +  bind = $mainMod, M, submap, menuscripts  submap = menuscripts  bind = $mainMod, A, exec, dmask @@ -104,19 +113,22 @@ bind = $mainMod, I, exec, mapimg  bind =, I, exec, mapimg  bind = $mainMod, L, exec, dmlang  bind =, L, exec, dmlang -bind = $mainMod, M, exec, mpass -bind =, M, exec, mpass -bind = $mainMod, P, exec, mmedia pdf -bind =, P, exec, mmedia pdf -bind = $mainMod, O, exec, mpower -bind =, O, exec, mpower -bind = $mainMod, U, exec, mmedia cursus -bind =, U, exec, mmedia cursus +bind = $mainMod, S, exec, mmedia schoolpdf +bind =, S, exec, mmedia schoolpdf  bind = $mainMod, V, exec, mmedia video  bind =, V, exec, mmedia video +bind = $mainMod, U, exec, mmedia cursus +bind =, U, exec, mmedia cursus +bind = $mainMod, M, exec, mmedia +bind =, M, exec, mmedia +bind = $mainMod, P, exec, mpass +bind =, P, exec, mpass +bind = $mainMod, O, exec, mpower +bind =, O, exec, mpower  source = ./reset-submap.conf  submap = reset +bind = $mainMod SHIFT, M, exec, mplay  bind =, XF86AudioLowerVolume, exec, pamixer -d 5  bind =, XF86AudioRaiseVolume, exec, pamixer -i 5  bind =, XF86AudioMute, exec, pamixer -t diff --git a/config/hyprland/hypr/hyprland.conf b/config/hyprland/hypr/hyprland.conf index 17f0235..ed932e0 100644 --- a/config/hyprland/hypr/hyprland.conf +++ b/config/hyprland/hypr/hyprland.conf @@ -86,7 +86,9 @@ gestures {  windowrulev2 = noanim, class:^(.*[Pp]inentry.*)$  windowrulev2 = float, class:^(.*[Pp]inentry.*)$ +windowrulev2 = float, class:^(feh|imv)$  windowrulev2 = noanim, class:dmenu +windowrulev2 = float, class:^(imv)$  layerrule = noanim, launcher diff --git a/config/hyprland/hypr/startup.sh b/config/hyprland/hypr/startup.sh index 6d5957f..8887cf2 100755 --- a/config/hyprland/hypr/startup.sh +++ b/config/hyprland/hypr/startup.sh @@ -5,4 +5,4 @@ gammastep &  wl-paste --watch cliphist store &  keyadd id_rsa &  swayidle 300 locker & -$TERMINAL & +$TERMINAL -e tmux a || $TERMINAL tmux & diff --git a/config/hyprland/waybar/config.jsonc b/config/hyprland/waybar/config.jsonc index ebf9cf9..4c95c25 100644 --- a/config/hyprland/waybar/config.jsonc +++ b/config/hyprland/waybar/config.jsonc @@ -2,7 +2,7 @@  	"layer": "top",  	"modules-left": ["battery", "hyprland/workspaces", "mpd", "hyprland/window"],  	"modules-center": ["clock"], -	"modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "tray"], +	"modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "bluetooth", "tray"],  	"mpd": {  		"format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})",  		"artist-len": 24, @@ -67,6 +67,15 @@  		"format-alt": "{:(%T) %A %d %B}",  		"interval": 1,  	}, +	"bluetooth": { +		"format": "", +		"format-disabled": "", +		"format-connected": "", +		"format-on": "", +		"tooltip-format": "{controller_alias}\t{controller_address}", +		"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{device_enumerate}", +		"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}" +	},  	"tray": {  		"spacing": 5,  	} diff --git a/config/hyprland/waybar/schemes/base16.css b/config/hyprland/waybar/schemes/base16.css index 76efbb3..b32d3df 100644 --- a/config/hyprland/waybar/schemes/base16.css +++ b/config/hyprland/waybar/schemes/base16.css @@ -51,11 +51,12 @@ window#waybar.PCSX2 #window {  	margin-right: 2px;  }  .modules-left { -	margin-left: 2px; +	margin-left: 3px;  } -#workspaces, #mpd, #battery, #clock, -#custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory, #tray { +#workspaces, #mpd, #battery,  +#clock, +#custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory, #bluetooth, #tray {  	border: solid @background;  	border-width: 2px 2px 2px 0;  	margin-top: 4px; @@ -67,6 +68,9 @@ window#waybar.PCSX2 #window {  	color: @color6;  	background: @background;  	border-color: @color4; +	border-width: 2px; +	padding: 0 12px; +	margin-right: 16px;  }  #workspaces { @@ -148,6 +152,11 @@ window#waybar.PCSX2 #window {  	background: @color5;  } +#bluetooth { +	color: @color6; +	background: @color8; +} +  #tray * {  	padding: unset;  } | 
