From bc78fba718dc414f47ef9336db2660607254b823 Mon Sep 17 00:00:00 2001 From: Robear Selwans Date: Thu, 4 Jun 2026 09:42:20 +0300 Subject: [PATCH] [*] Updated configs --- fish/.config/fish/config.fish | 7 + fish/.config/fish/fish_plugins | 1 + fish/.config/fish/fish_variables | 5 + fish/.config/fish/functions/__bass.py | 140 ++++++++++++++++++ fish/.config/fish/functions/bass.fish | 29 ++++ kwm/.config/kwm/config.zon | 14 +- .../nvim/lua/functions/api_extensions.lua | 1 - nvim/.config/nvim/lua/lsps/init.lua | 6 +- .../nvim/lua/plugins/configs/fzf-lua.lua | 1 + .../nvim/lua/plugins/configs/image.lua | 12 ++ .../.config/nvim/lua/plugins/configs/mini.lua | 47 ++++++ .../nvim/lua/plugins/configs/nvim-dap.lua | 26 ++-- .../nvim/lua/plugins/configs/obsidian.lua | 23 +++ nvim/.config/nvim/lua/plugins/configs/oil.lua | 1 + .../nvim/lua/plugins/configs/overseer.lua | 15 ++ nvim/.config/nvim/lua/plugins/init.lua | 13 +- nvim/.config/nvim/lua/settings/keymaps.lua | 32 ++-- nvim/.config/nvim/nvim-pack-lock.json | 28 +++- river/.config/river/init | 5 + .../yazi/flavors/ayu-dark.yazi/flavor.toml | 16 +- yazi/.config/yazi/keymap.toml | 15 ++ yazi/.config/yazi/package.toml | 11 +- .../yazi/plugins/open-with-cmd.yazi/LICENSE | 19 +++ .../yazi/plugins/open-with-cmd.yazi/README.md | 25 ++++ .../yazi/plugins/open-with-cmd.yazi/main.lua | 19 +++ .../yazi/plugins/smart-enter.yazi/LICENSE | 21 +++ .../yazi/plugins/smart-enter.yazi/README.md | 40 +++++ .../yazi/plugins/smart-enter.yazi/main.lua | 11 ++ 28 files changed, 533 insertions(+), 50 deletions(-) create mode 100644 fish/.config/fish/fish_plugins create mode 100644 fish/.config/fish/functions/__bass.py create mode 100644 fish/.config/fish/functions/bass.fish create mode 100644 nvim/.config/nvim/lua/plugins/configs/image.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/obsidian.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/overseer.lua create mode 100644 yazi/.config/yazi/plugins/open-with-cmd.yazi/LICENSE create mode 100644 yazi/.config/yazi/plugins/open-with-cmd.yazi/README.md create mode 100644 yazi/.config/yazi/plugins/open-with-cmd.yazi/main.lua create mode 100644 yazi/.config/yazi/plugins/smart-enter.yazi/LICENSE create mode 100644 yazi/.config/yazi/plugins/smart-enter.yazi/README.md create mode 100644 yazi/.config/yazi/plugins/smart-enter.yazi/main.lua diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index 56f547f..48950d4 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -14,4 +14,11 @@ export VISUAL=nvim # end +bass source ~/Dev/VulkanSDK/1.4.341.1/setup-env.sh +fish_add_path ~/.cargo/bin + +export BAT_THEME="Solarized (dark)" +export RADV_EXPERIMENTAL=heap + +source /usr/share/wikiman/widgets/widget.fish diff --git a/fish/.config/fish/fish_plugins b/fish/.config/fish/fish_plugins new file mode 100644 index 0000000..379794f --- /dev/null +++ b/fish/.config/fish/fish_plugins @@ -0,0 +1 @@ +edc/bass diff --git a/fish/.config/fish/fish_variables b/fish/.config/fish/fish_variables index e562d9d..39b0acf 100644 --- a/fish/.config/fish/fish_variables +++ b/fish/.config/fish/fish_variables @@ -3,6 +3,10 @@ SETUVAR __done_min_cmd_duration:10000 SETUVAR __done_notification_urgency_level:low SETUVAR __fish_initialized:4300 +SETUVAR _fisher_edc_2F_bass_files:\x7e/\x2econfig/fish/functions/__bass\x2epy\x1e\x7e/\x2econfig/fish/functions/bass\x2efish +SETUVAR _fisher_plugins:edc/bass +SETUVAR _fisher_upgraded_to_4_4:\x1d +SETUVAR fish_user_paths:/home/sisyphus/\x2ecargo/bin SETUVAR pure_begin_prompt_with_current_directory:true SETUVAR pure_check_for_new_release:false SETUVAR pure_color_at_sign:pure_color_mute @@ -72,6 +76,7 @@ SETUVAR pure_symbol_reverse_prompt:\u276e SETUVAR pure_symbol_ssh_prefix: SETUVAR pure_symbol_title_bar_separator:\x2d SETUVAR pure_symbol_virtualenv_prefix: +SETUVAR pure_system_time_format:\x2b\x25T SETUVAR pure_threshold_command_duration:5 SETUVAR pure_truncate_prompt_current_directory_keeps:\x2d1 SETUVAR pure_truncate_window_title_current_directory_keeps:\x2d1 diff --git a/fish/.config/fish/functions/__bass.py b/fish/.config/fish/functions/__bass.py new file mode 100644 index 0000000..3f02bd4 --- /dev/null +++ b/fish/.config/fish/functions/__bass.py @@ -0,0 +1,140 @@ +""" +To be used with a companion fish function like this: + + function refish + set -l _x (python /tmp/bass.py source ~/.nvm/nvim.sh ';' nvm use iojs); source $_x; and rm -f $_x + end + +""" + +from __future__ import print_function + +import json +import os +import signal +import subprocess +import sys +import traceback + + +BASH = 'bash' + +FISH_READONLY = [ + 'PWD', 'SHLVL', 'history', 'pipestatus', 'status', 'version', + 'FISH_VERSION', 'fish_pid', 'hostname', '_', 'fish_private_mode' +] + +IGNORED = [ + 'PS1', 'XPC_SERVICE_NAME' +] + +def ignored(name): + if name == 'PWD': # this is read only, but has special handling + return False + # ignore other read only variables + if name in FISH_READONLY: + return True + if name in IGNORED or name.startswith("BASH_FUNC"): + return True + if name.startswith('%'): + return True + return False + +def escape(string): + # use json.dumps to reliably escape quotes and backslashes + return json.dumps(string).replace(r'$', r'\$') + +def escape_identifier(word): + return escape(word.replace('?', '\\?')) + +def comment(string): + return '\n'.join(['# ' + line for line in string.split('\n')]) + +def gen_script(): + # Use the following instead of /usr/bin/env to read environment so we can + # deal with multi-line environment variables (and other odd cases). + env_reader = "%s -c 'import os,json; print(json.dumps({k:v for k,v in os.environ.items()}))'" % (sys.executable) + args = [BASH, '-c', env_reader] + output = subprocess.check_output(args, universal_newlines=True) + old_env = output.strip() + + pipe_r, pipe_w = os.pipe() + if sys.version_info >= (3, 4): + os.set_inheritable(pipe_w, True) + command = 'eval $1 && ({}; alias) >&{}'.format( + env_reader, + pipe_w + ) + args = [BASH, '-c', command, 'bass', ' '.join(sys.argv[1:])] + p = subprocess.Popen(args, universal_newlines=True, close_fds=False) + os.close(pipe_w) + with os.fdopen(pipe_r) as f: + new_env = f.readline() + alias_str = f.read() + if p.wait() != 0: + raise subprocess.CalledProcessError( + returncode=p.returncode, + cmd=' '.join(sys.argv[1:]), + output=new_env + alias_str + ) + new_env = new_env.strip() + + old_env = json.loads(old_env) + new_env = json.loads(new_env) + + script_lines = [] + + for k, v in new_env.items(): + if ignored(k): + continue + v1 = old_env.get(k) + if not v1: + script_lines.append(comment('adding %s=%s' % (k, v))) + elif v1 != v: + script_lines.append(comment('updating %s=%s -> %s' % (k, v1, v))) + # process special variables + if k == 'PWD': + script_lines.append('cd %s' % escape(v)) + continue + else: + continue + if k == 'PATH': + value = ' '.join([escape(directory) + for directory in v.split(':')]) + else: + value = escape(v) + script_lines.append('set -g -x %s %s' % (k, value)) + + for var in set(old_env.keys()) - set(new_env.keys()): + script_lines.append(comment('removing %s' % var)) + script_lines.append('set -e %s' % var) + + script = '\n'.join(script_lines) + + alias_lines = [] + for line in alias_str.splitlines(): + _, rest = line.split(None, 1) + k, v = rest.split("=", 1) + alias_lines.append("alias " + escape_identifier(k) + "=" + v) + alias = '\n'.join(alias_lines) + + return script + '\n' + alias + +script_file = os.fdopen(3, 'w') + +if not sys.argv[1:]: + print('__bass_usage', file=script_file, end='') + sys.exit(0) + +try: + script = gen_script() +except subprocess.CalledProcessError as e: + sys.exit(e.returncode) +except Exception: + print('Bass internal error!', file=sys.stderr) + raise # traceback will output to stderr +except KeyboardInterrupt: + signal.signal(signal.SIGINT, signal.SIG_DFL) + os.kill(os.getpid(), signal.SIGINT) +else: + script_file.write(script) diff --git a/fish/.config/fish/functions/bass.fish b/fish/.config/fish/functions/bass.fish new file mode 100644 index 0000000..2b3af16 --- /dev/null +++ b/fish/.config/fish/functions/bass.fish @@ -0,0 +1,29 @@ +function bass + set -l bash_args $argv + set -l bass_debug + if test "$bash_args[1]_" = '-d_' + set bass_debug true + set -e bash_args[1] + end + + set -l script_file (mktemp) + if command -v python3 >/dev/null 2>&1 + command python3 -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file + else + command python -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file + end + set -l bass_status $status + if test $bass_status -ne 0 + return $bass_status + end + + if test -n "$bass_debug" + cat $script_file + end + source $script_file + command rm $script_file +end + +function __bass_usage + echo "Usage: bass [-d] " +end diff --git a/kwm/.config/kwm/config.zon b/kwm/.config/kwm/config.zon index e489d88..9ef5422 100644 --- a/kwm/.config/kwm/config.zon +++ b/kwm/.config/kwm/config.zon @@ -19,14 +19,14 @@ // solid color background // note: set this to .none if you use other wallpaper program like `swaybg`, orelse it will be covered by this and unable to see - .background = .{ .color = 0x33000000 }, + .background = .none, .bar = .{ .show_default = true, // .top // .bottom .position = .top, - .font = "monospace:size=14", + .font = "Fira Code Nerd Font:size=14", .color = .{ .normal = .{ .fg = 0x828bb8ff, @@ -792,7 +792,7 @@ .event = .{ .click = .{ .pressed = .{ - .modify_mfact = .{ .step = 0.01 }, + .modify_mfact = .{ .change = .{ .step = 0.01 } }, }, }, }, @@ -803,7 +803,7 @@ .event = .{ .click = .{ .pressed = .{ - .modify_mfact = .{ .step = -0.01 }, + .modify_mfact = .{ .change = .{ .step = -0.01 } }, }, }, }, @@ -932,7 +932,7 @@ .event = .{ .click = .{ .pressed = .{ - .spawn_shell = .{ .cmd = "shotman -c output" }, + .spawn_shell = .{ .cmd = "shotman -C -c output" }, }, }, }, @@ -943,7 +943,7 @@ .event = .{ .click = .{ .pressed = .{ - .spawn_shell = .{ .cmd = "shotman -c region" }, + .spawn_shell = .{ .cmd = "shotman -C -c region" }, }, }, }, @@ -1128,7 +1128,7 @@ .{ .app_id = .{ .str = "DesktopEditors" }, .floating = true }, .{ .app_id = .{ .str = "xdg-desktop-portal-gtk" }, .floating = true }, .{ .app_id = .{ .str = "chromium" }, .tag = 0b10, .scroller_mfact = 0.9 }, - .{ .app_id = .{ .str = "~ - fish" }, .is_terminal = true, .scroller_mfact = 0.8 }, + .{ .app_id = .{ .str = "wezterm" }, .is_terminal = true, .scroller_mfact = 0.8 }, }, // output rules diff --git a/nvim/.config/nvim/lua/functions/api_extensions.lua b/nvim/.config/nvim/lua/functions/api_extensions.lua index 9487128..6dd7272 100644 --- a/nvim/.config/nvim/lua/functions/api_extensions.lua +++ b/nvim/.config/nvim/lua/functions/api_extensions.lua @@ -39,4 +39,3 @@ vim.keymap.pop = function(mode, lhs) }) end end - diff --git a/nvim/.config/nvim/lua/lsps/init.lua b/nvim/.config/nvim/lua/lsps/init.lua index 3bfcfdf..a8b2916 100644 --- a/nvim/.config/nvim/lua/lsps/init.lua +++ b/nvim/.config/nvim/lua/lsps/init.lua @@ -2,6 +2,8 @@ local enabled_lsps_lspconf = { 'clangd', 'lua_ls', + 'mesonlsp', + 'zls', -- 'rust_analyzer', -- 'pylsp', } @@ -77,8 +79,8 @@ for _, lsp_name in ipairs(enabled_lsps_lspconf) do end -local opts = { noremap=true, silent=true } -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) +-- Currently not used +-- vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { noremap=true, silent=true }) local config = { virtual_text = true, diff --git a/nvim/.config/nvim/lua/plugins/configs/fzf-lua.lua b/nvim/.config/nvim/lua/plugins/configs/fzf-lua.lua index ce34b76..d2fe68a 100644 --- a/nvim/.config/nvim/lua/plugins/configs/fzf-lua.lua +++ b/nvim/.config/nvim/lua/plugins/configs/fzf-lua.lua @@ -24,6 +24,7 @@ return -- Keymaps to be set after the plugin is loaded keymaps = { + { keys="f" , cmd="" , desc="Find" }, { keys="ff", cmd=require('fzf-lua').files , desc="Files" }, { keys="ft", cmd=require('fzf-lua').live_grep , desc="Text" }, { keys="fb", cmd=require('fzf-lua').buffers , desc="Buffers" }, diff --git a/nvim/.config/nvim/lua/plugins/configs/image.lua b/nvim/.config/nvim/lua/plugins/configs/image.lua new file mode 100644 index 0000000..0cb0080 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/image.lua @@ -0,0 +1,12 @@ +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() + require('image').setup{} + end, + + -- Keymaps to be set after the plugin is loaded + keymaps = { + -- { [modes='n'], keys, cmd, desc } + } +} diff --git a/nvim/.config/nvim/lua/plugins/configs/mini.lua b/nvim/.config/nvim/lua/plugins/configs/mini.lua index 88e097c..245ef5a 100644 --- a/nvim/.config/nvim/lua/plugins/configs/mini.lua +++ b/nvim/.config/nvim/lua/plugins/configs/mini.lua @@ -13,5 +13,52 @@ return start_with_preview = 'gL', }, } + require('mini.notify').setup() + local miniclue = require('mini.clue') + miniclue.setup{ + triggers = { + -- Leader triggers + { mode = { 'n', 'x' }, keys = '' }, + + -- `[` and `]` keys + { mode = 'n', keys = '[' }, + { mode = 'n', keys = ']' }, + + -- Built-in completion + { mode = 'i', keys = '' }, + + -- `g` key + { mode = { 'n', 'x' }, keys = 'g' }, + + -- Marks + { mode = { 'n', 'x' }, keys = "'" }, + { mode = { 'n', 'x' }, keys = '`' }, + + -- Registers + { mode = { 'n', 'x' }, keys = '"' }, + { mode = { 'i', 'c' }, keys = '' }, + + -- Window commands + { mode = 'n', keys = '' }, + + -- `z` key + { mode = { 'n', 'x' }, keys = 'z' }, + }, + + clues = { + -- Enhance this by adding descriptions for mapping groups + miniclue.gen_clues.square_brackets(), + miniclue.gen_clues.builtin_completion(), + miniclue.gen_clues.g(), + miniclue.gen_clues.marks(), + miniclue.gen_clues.registers(), + miniclue.gen_clues.windows(), + miniclue.gen_clues.z(), + }, + + window = { + delay = 50 + } + } end, } diff --git a/nvim/.config/nvim/lua/plugins/configs/nvim-dap.lua b/nvim/.config/nvim/lua/plugins/configs/nvim-dap.lua index 89e3b1e..5d8dd11 100644 --- a/nvim/.config/nvim/lua/plugins/configs/nvim-dap.lua +++ b/nvim/.config/nvim/lua/plugins/configs/nvim-dap.lua @@ -7,18 +7,18 @@ return command = 'codelldb', } - dap.configurations.c = { - { - name = 'Launch file', - type = 'codelldb', - request = 'launch', - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = '${workspaceFolder}', - stopOnEntry = false, - } - } + -- dap.configurations.c = { + -- { + -- name = 'Launch file', + -- type = 'codelldb', + -- request = 'launch', + -- program = function() + -- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + -- end, + -- cwd = '${workspaceFolder}', + -- stopOnEntry = false, + -- } + -- } dap.listeners.before.attach.key_config = function() vim.keymap.push('n', '' , dap.step_over) @@ -39,6 +39,8 @@ return end, keymaps = { + { keys = 'd' , cmd = "" , desc = 'Debugger' }, + { keys = 'dr', cmd = require('dap').continue , desc = 'Run' }, { keys = 'db', cmd = require('dap').toggle_breakpoint, desc = 'Toggle Breakpoint' }, { keys = 'dn', cmd = require('dap').step_over , desc = 'Step Over' }, }, diff --git a/nvim/.config/nvim/lua/plugins/configs/obsidian.lua b/nvim/.config/nvim/lua/plugins/configs/obsidian.lua new file mode 100644 index 0000000..3c95f6d --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/obsidian.lua @@ -0,0 +1,23 @@ +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() + require("obsidian").setup({ + workspaces = { + { + name = "graphics", + path = "~/.obsidian/graphics", + }, + { + name = "todo", + path = "~/.obsidian/todo", + }, + }, + }) + end, + + -- Keymaps to be set after the plugin is loaded + keymaps = { + -- { [modes='n'], keys, cmd, desc } + } +} diff --git a/nvim/.config/nvim/lua/plugins/configs/oil.lua b/nvim/.config/nvim/lua/plugins/configs/oil.lua index 753023a..e410269 100644 --- a/nvim/.config/nvim/lua/plugins/configs/oil.lua +++ b/nvim/.config/nvim/lua/plugins/configs/oil.lua @@ -16,6 +16,7 @@ return -- Keymaps to be set after the plugin is loaded keymaps = { + { keys = 'o' , cmd = "" , desc = 'Oil' }, { keys = 'oo', cmd = require('oil').open , desc = 'Open' }, { keys = 'oc', cmd = require('oil').close , desc = 'Close' }, { keys = 'of', cmd = function() require('oil').toggle_float(nil, { preview = {} }) end, desc = 'Toggle Floating' }, diff --git a/nvim/.config/nvim/lua/plugins/configs/overseer.lua b/nvim/.config/nvim/lua/plugins/configs/overseer.lua new file mode 100644 index 0000000..3d40dad --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/overseer.lua @@ -0,0 +1,15 @@ +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() + require('overseer').setup{} + end, + + -- Keymaps to be set after the plugin is loaded + keymaps = { + { keys = 't' , cmd = "" , desc = 'Task Runner' }, + { keys = 'tr', cmd = require('overseer').run_task, desc = 'Run Task' }, + { keys = 'tt', cmd = require('overseer').toggle , desc = 'Toggle View' }, + -- { [modes='n'], keys, cmd, desc } + } +} diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 540ba09..36d8cd1 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -13,7 +13,7 @@ return { src = 'https://github.com/nvim-mini/mini.nvim', name = 'mini' }, { src = 'https://github.com/stevearc/oil.nvim', name = 'oil' }, 'https://github.com/ibhagwan/fzf-lua', - { src = 'https://github.com/stevearc/overseer.nvim', name = 'overseer', data = { simple_init = true } }, + { src = 'https://github.com/stevearc/overseer.nvim', name = 'overseer' }, { src = 'https://codeberg.org/andyg/leap.nvim', name = 'leap' }, @@ -28,4 +28,15 @@ return -- Misc. { src = 'https://github.com/folke/lazydev.nvim', name = 'lazydev', data = { simple_init = true } }, + + 'https://github.com/nvim-lua/plenary.nvim', + { src = 'https://git.neosisyphus.com/mo7sen/memos.nvim', name = 'memos', data = { simple_init = true } }, + + -- { src = 'https://github.com/MeanderingProgrammer/render-markdown.nvim', name = 'render-markdown', data = { simple_init = true } }, + { src = 'https://github.com/OXY2DEV/markview.nvim', name = 'markview', data = { simple_init = true } }, + + { src = 'https://github.com/epwalsh/obsidian.nvim', name = 'obsidian' }, + + -- { src = 'https://github.com/3rd/image.nvim', name = 'image' }, + } diff --git a/nvim/.config/nvim/lua/settings/keymaps.lua b/nvim/.config/nvim/lua/settings/keymaps.lua index cb0e53f..5c27072 100644 --- a/nvim/.config/nvim/lua/settings/keymaps.lua +++ b/nvim/.config/nvim/lua/settings/keymaps.lua @@ -31,26 +31,28 @@ keymap("n", "", ":vertical resize -2", {silent=true}) keymap("n", "", ":vertical resize +2", {silent=true}) -- Navigate buffers -- -keymap("n", "j", ":bnext", {silent=true}) -keymap("n", "k", ":bprevious", {silent=true}) -keymap("n", "d", ":bdelete", {silent=true}) +keymap("n", "b" , "" , {desc = "Buffers"}) +keymap("n", "bj", ":bnext" , {desc = "Next" , silent=true}) +keymap("n", "bk", ":bprevious", {desc = "Prev" , silent=true}) +keymap("n", "bd", ":bdelete" , {desc = "Close", silent=true}) -- Faster command -- keymap("n", ";", ":") -- LSP Commands -- -keymap("n", "l?", vim.lsp.buf.hover) -keymap("n", "li", vim.lsp.buf.implementation) -keymap("n", "ld", vim.lsp.buf.definition) -keymap("n", "lD", vim.lsp.buf.declaration) -keymap("n", "lR", vim.lsp.buf.rename) -keymap("n", "lca", vim.lsp.buf.code_action) -keymap("n", "lr", vim.lsp.buf.references) -keymap("n", "lf", vim.diagnostic.open_float) -keymap("n", "lF", vim.lsp.buf.format) -keymap("n", "li", vim.lsp.inlay_hint.toggle) -keymap("i", "", vim.lsp.buf.signature_help) -keymap("i", "", vim.lsp.completion.get) +keymap("n", "l" , "" , {desc = "LSP"}) +keymap("n", "lg" , "" , {desc = "Go To"}) +keymap("n", "lgi", vim.lsp.buf.implementation, {desc = "Implementation"}) +keymap("n", "lgd", vim.lsp.buf.definition , {desc = "Definition"}) +keymap("n", "lgD", vim.lsp.buf.declaration , {desc = "Declaration"}) +keymap("n", "l?" , vim.lsp.buf.hover , {desc = "Inspect Cursor"}) +keymap("n", "lR" , vim.lsp.buf.rename , {desc = "Rename"}) +keymap("n", "la" , vim.lsp.buf.code_action , {desc = "Code Action"}) +keymap("n", "lr" , vim.lsp.buf.references , {desc = "List References"}) +keymap("n", "lF" , vim.lsp.buf.format , {desc = "Format"}) +keymap("n", "lh" , vim.lsp.inlay_hint.toggle , {desc = "Toggle Hints"}) +keymap("i", "" , vim.lsp.buf.signature_help) +keymap("i", "" , vim.lsp.completion.get) -- Insert -- -- Quicker escape -- diff --git a/nvim/.config/nvim/nvim-pack-lock.json b/nvim/.config/nvim/nvim-pack-lock.json index 806837f..81a2362 100644 --- a/nvim/.config/nvim/nvim-pack-lock.json +++ b/nvim/.config/nvim/nvim-pack-lock.json @@ -1,13 +1,17 @@ { "plugins": { "fzf-lua": { - "rev": "14e2ebc7ed4cef90ffb4fd192ca28c33741818eb", + "rev": "9f0432fdd7825ab163520045831a40b6df82ea28", "src": "https://github.com/ibhagwan/fzf-lua" }, "helpview.nvim": { "rev": "518789535a0cb146224a428edf93a70f98b795db", "src": "https://github.com/OXY2DEV/helpview.nvim" }, + "image": { + "rev": "da2be65c153ba15a14a342b05591652a6df70d58", + "src": "https://github.com/3rd/image.nvim" + }, "lazydev": { "rev": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d", "src": "https://github.com/folke/lazydev.nvim" @@ -16,10 +20,18 @@ "rev": "e20f33507bd2d6c671b7273f797f2d3cf521ac61", "src": "https://codeberg.org/andyg/leap.nvim" }, + "markview": { + "rev": "dbf74b6db11c1468d5128a38b26b6d99dc7316e9", + "src": "https://github.com/OXY2DEV/markview.nvim" + }, "mason": { "rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65", "src": "https://github.com/mason-org/mason.nvim" }, + "memos": { + "rev": "1d478708adc55a6678801b7d93532526826395cd", + "src": "https://git.neosisyphus.com/mo7sen/memos.nvim" + }, "mini": { "rev": "439cdcd6992bc9012efd7d8ed7a7b7a0f1fac32a", "src": "https://github.com/nvim-mini/mini.nvim" @@ -52,6 +64,10 @@ "rev": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849", "src": "https://github.com/nvim-treesitter/nvim-treesitter" }, + "obsidian": { + "rev": "726b60c89f4bafef267a714ea1faa1335bdd414a", + "src": "https://github.com/epwalsh/obsidian.nvim" + }, "oil": { "rev": "0fcc83805ad11cf714a949c98c605ed717e0b83e", "src": "https://github.com/stevearc/oil.nvim" @@ -59,6 +75,14 @@ "overseer": { "rev": "a2194447f4c5a1baf95139c5c7b539fa7b0d012f", "src": "https://github.com/stevearc/overseer.nvim" + }, + "plenary.nvim": { + "rev": "74b06c6c75e4eeb3108ec01852001636d85a932b", + "src": "https://github.com/nvim-lua/plenary.nvim" + }, + "render-markdown": { + "rev": "0fd43fb4b1f073931c4b481f5f3b7cea3749e190", + "src": "https://github.com/MeanderingProgrammer/render-markdown.nvim" } } -} \ No newline at end of file +} diff --git a/river/.config/river/init b/river/.config/river/init index 0cf3f63..bdc802b 100755 --- a/river/.config/river/init +++ b/river/.config/river/init @@ -1,4 +1,9 @@ #!/bin/bash + +export XDG_CURRENT_DESKTOP=river +dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY DBUS_SESSION_BUS_ADDRESS XDG_SESSION_TYPE XDG_CURRENT_DESKTOP +systemctl --user import-environment WAYLAND_DISPLAY DISPLAY DBUS_SESSION_BUS_ADDRESS XDG_SESSION_TYPE XDG_CURRENT_DESKTOP + # while true; do ~/.config/kwm/bar.sh; sleep 1; done | kwm & ~/.config/kwm/bar.sh & kwm & diff --git a/yazi/.config/yazi/flavors/ayu-dark.yazi/flavor.toml b/yazi/.config/yazi/flavors/ayu-dark.yazi/flavor.toml index 7fafb1b..d9f83b3 100644 --- a/yazi/.config/yazi/flavors/ayu-dark.yazi/flavor.toml +++ b/yazi/.config/yazi/flavors/ayu-dark.yazi/flavor.toml @@ -99,10 +99,10 @@ title_error = { fg = "#a85361" } [filetype] rules = [ # directories - { name = "*/", fg = "#1f6f88" }, + { url = "*/", fg = "#1f6f88" }, # executables - { name = "*", is = "exec", fg = "#7e9350" }, + { url = "*", is = "exec", fg = "#7e9350" }, # images { mime = "image/*", fg = "#c2a05c" }, @@ -122,16 +122,16 @@ rules = [ { mime = "text/x-{c,c++}", fg = "#1f6f88" }, # config files - { name = "*.json", fg = "#c2a05c" }, - { name = "*.yml", fg = "#1f6f88" }, - { name = "*.toml", fg = "#9464b6" }, + { url = "*.json", fg = "#c2a05c" }, + { url = "*.yml", fg = "#1f6f88" }, + { url = "*.toml", fg = "#9464b6" }, # special files - { name = "*", is = "orphan", bg = "#0a0e14" }, + { url = "*", is = "orphan", bg = "#0a0e14" }, # dummy files - { name = "*", is = "dummy", bg = "#0a0e14" }, + { url = "*", is = "dummy", bg = "#0a0e14" }, # fallback - { name = "*/", fg = "#1f6f88" }, + { url = "*/", fg = "#1f6f88" }, ] diff --git a/yazi/.config/yazi/keymap.toml b/yazi/.config/yazi/keymap.toml index cde50f4..4559da9 100644 --- a/yazi/.config/yazi/keymap.toml +++ b/yazi/.config/yazi/keymap.toml @@ -2,3 +2,18 @@ on = [ "g", "s" ] run = "cd sftp://pebble" desc = "Go to pebble" + +[[mgr.prepend_keymap]] +on = "o" +run = "plugin open-with-cmd -- block" +desc = "Open with command in the terminal" + +[[mgr.prepend_keymap]] +on = "O" +run = "plugin open-with-cmd" +desc = "Open with command" + +[[mgr.prepend_keymap]] +on = "l" +run = "plugin smart-enter" +desc = "Enter the child directory, or open the file" diff --git a/yazi/.config/yazi/package.toml b/yazi/.config/yazi/package.toml index d26e87a..6940fb6 100644 --- a/yazi/.config/yazi/package.toml +++ b/yazi/.config/yazi/package.toml @@ -1,5 +1,12 @@ -[plugin] -deps = [] +[[plugin.deps]] +use = "Ape/open-with-cmd" +rev = "e3d430f" +hash = "d29c1ffa99099181faf8c01d1f59aa4c" + +[[plugin.deps]] +use = "yazi-rs/plugins:smart-enter" +rev = "1962818" +hash = "187cc58ba7ac3befd49c342129e6f1b6" [[flavor.deps]] use = "kmlupreti/ayu-dark" diff --git a/yazi/.config/yazi/plugins/open-with-cmd.yazi/LICENSE b/yazi/.config/yazi/plugins/open-with-cmd.yazi/LICENSE new file mode 100644 index 0000000..0399f1c --- /dev/null +++ b/yazi/.config/yazi/plugins/open-with-cmd.yazi/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2024 Lauri Niskanen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/yazi/.config/yazi/plugins/open-with-cmd.yazi/README.md b/yazi/.config/yazi/plugins/open-with-cmd.yazi/README.md new file mode 100644 index 0000000..ffef1cd --- /dev/null +++ b/yazi/.config/yazi/plugins/open-with-cmd.yazi/README.md @@ -0,0 +1,25 @@ +# open-with-cmd.yazi + +This is a Yazi plugin for opening files with a prompted command. + +## Installation + +Install the plugin: + +``` +ya pkg add Ape/open-with-cmd +``` + +Create `~/.config/yazi/keymap.toml` and add: + +``` +[[manager.prepend_keymap]] +on = "o" +run = "plugin open-with-cmd -- block" +desc = "Open with command in the terminal" + +[[manager.prepend_keymap]] +on = "O" +run = "plugin open-with-cmd" +desc = "Open with command" +``` diff --git a/yazi/.config/yazi/plugins/open-with-cmd.yazi/main.lua b/yazi/.config/yazi/plugins/open-with-cmd.yazi/main.lua new file mode 100644 index 0000000..7233873 --- /dev/null +++ b/yazi/.config/yazi/plugins/open-with-cmd.yazi/main.lua @@ -0,0 +1,19 @@ +return { + entry = function(_, job) + local block = job.args[1] and job.args[1] == "block" + + local value, event = ya.input({ + title = block and "Open with (block):" or "Open with:", + pos = { "hovered", y = 1, w = 50 }, + }) + + if event == 1 then + local s = ya.target_family() == "windows" and " %*" or ' "$@"' + ya.mgr_emit("shell", { + value .. s, + block = block, + orphan = not block, + }) + end + end, +} diff --git a/yazi/.config/yazi/plugins/smart-enter.yazi/LICENSE b/yazi/.config/yazi/plugins/smart-enter.yazi/LICENSE new file mode 100644 index 0000000..fb5b1d6 --- /dev/null +++ b/yazi/.config/yazi/plugins/smart-enter.yazi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 yazi-rs + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/yazi/.config/yazi/plugins/smart-enter.yazi/README.md b/yazi/.config/yazi/plugins/smart-enter.yazi/README.md new file mode 100644 index 0000000..9c19bc7 --- /dev/null +++ b/yazi/.config/yazi/plugins/smart-enter.yazi/README.md @@ -0,0 +1,40 @@ +# smart-enter.yazi + +[`Open`][open] files or [`enter`][enter] directories all in one key! + +## Installation + +```sh +ya pkg add yazi-rs/plugins:smart-enter +``` + +## Usage + +Bind your l key to the plugin, in your `~/.config/yazi/keymap.toml`: + +```toml +[[mgr.prepend_keymap]] +on = "l" +run = "plugin smart-enter" +desc = "Enter the child directory, or open the file" +``` + +## Advanced + +By default, `--hovered` is passed to the [`open`][open] action, make the behavior consistent with [`enter`][enter] avoiding accidental triggers, +which means both will only target the currently hovered file. + +If you still want `open` to target multiple selected files, add this to your `~/.config/yazi/init.lua`: + +```lua +require("smart-enter"):setup { + open_multi = true, +} +``` + +## License + +This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file. + +[open]: https://yazi-rs.github.io/docs/configuration/keymap/#mgr.open +[enter]: https://yazi-rs.github.io/docs/configuration/keymap/#mgr.enter diff --git a/yazi/.config/yazi/plugins/smart-enter.yazi/main.lua b/yazi/.config/yazi/plugins/smart-enter.yazi/main.lua new file mode 100644 index 0000000..e9e2ec6 --- /dev/null +++ b/yazi/.config/yazi/plugins/smart-enter.yazi/main.lua @@ -0,0 +1,11 @@ +--- @since 25.5.31 +--- @sync entry + +local function setup(self, opts) self.open_multi = opts.open_multi end + +local function entry(self) + local h = cx.active.current.hovered + ya.emit(h and h.cha.is_dir and "enter" or "open", { hovered = not self.open_multi }) +end + +return { entry = entry, setup = setup }