[*] Updated configs

This commit is contained in:
2026-06-04 09:42:20 +03:00
parent 819959b395
commit bc78fba718
28 changed files with 533 additions and 50 deletions
+7
View File
@@ -14,4 +14,11 @@ export VISUAL=nvim
# end # 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
+1
View File
@@ -0,0 +1 @@
edc/bass
+5
View File
@@ -3,6 +3,10 @@
SETUVAR __done_min_cmd_duration:10000 SETUVAR __done_min_cmd_duration:10000
SETUVAR __done_notification_urgency_level:low SETUVAR __done_notification_urgency_level:low
SETUVAR __fish_initialized:4300 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_begin_prompt_with_current_directory:true
SETUVAR pure_check_for_new_release:false SETUVAR pure_check_for_new_release:false
SETUVAR pure_color_at_sign:pure_color_mute 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_ssh_prefix:
SETUVAR pure_symbol_title_bar_separator:\x2d SETUVAR pure_symbol_title_bar_separator:\x2d
SETUVAR pure_symbol_virtualenv_prefix: SETUVAR pure_symbol_virtualenv_prefix:
SETUVAR pure_system_time_format:\x2b\x25T
SETUVAR pure_threshold_command_duration:5 SETUVAR pure_threshold_command_duration:5
SETUVAR pure_truncate_prompt_current_directory_keeps:\x2d1 SETUVAR pure_truncate_prompt_current_directory_keeps:\x2d1
SETUVAR pure_truncate_window_title_current_directory_keeps:\x2d1 SETUVAR pure_truncate_window_title_current_directory_keeps:\x2d1
+140
View File
@@ -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)
+29
View File
@@ -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] <bash-command>"
end
+7 -7
View File
@@ -19,14 +19,14 @@
// solid color background // 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 // 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 = .{ .bar = .{
.show_default = true, .show_default = true,
// .top // .top
// .bottom // .bottom
.position = .top, .position = .top,
.font = "monospace:size=14", .font = "Fira Code Nerd Font:size=14",
.color = .{ .color = .{
.normal = .{ .normal = .{
.fg = 0x828bb8ff, .fg = 0x828bb8ff,
@@ -792,7 +792,7 @@
.event = .{ .event = .{
.click = .{ .click = .{
.pressed = .{ .pressed = .{
.modify_mfact = .{ .step = 0.01 }, .modify_mfact = .{ .change = .{ .step = 0.01 } },
}, },
}, },
}, },
@@ -803,7 +803,7 @@
.event = .{ .event = .{
.click = .{ .click = .{
.pressed = .{ .pressed = .{
.modify_mfact = .{ .step = -0.01 }, .modify_mfact = .{ .change = .{ .step = -0.01 } },
}, },
}, },
}, },
@@ -932,7 +932,7 @@
.event = .{ .event = .{
.click = .{ .click = .{
.pressed = .{ .pressed = .{
.spawn_shell = .{ .cmd = "shotman -c output" }, .spawn_shell = .{ .cmd = "shotman -C -c output" },
}, },
}, },
}, },
@@ -943,7 +943,7 @@
.event = .{ .event = .{
.click = .{ .click = .{
.pressed = .{ .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 = "DesktopEditors" }, .floating = true },
.{ .app_id = .{ .str = "xdg-desktop-portal-gtk" }, .floating = true }, .{ .app_id = .{ .str = "xdg-desktop-portal-gtk" }, .floating = true },
.{ .app_id = .{ .str = "chromium" }, .tag = 0b10, .scroller_mfact = 0.9 }, .{ .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 // output rules
@@ -39,4 +39,3 @@ vim.keymap.pop = function(mode, lhs)
}) })
end end
end end
+4 -2
View File
@@ -2,6 +2,8 @@
local enabled_lsps_lspconf = { local enabled_lsps_lspconf = {
'clangd', 'clangd',
'lua_ls', 'lua_ls',
'mesonlsp',
'zls',
-- 'rust_analyzer', -- 'rust_analyzer',
-- 'pylsp', -- 'pylsp',
} }
@@ -77,8 +79,8 @@ for _, lsp_name in ipairs(enabled_lsps_lspconf) do
end end
local opts = { noremap=true, silent=true } -- Currently not used
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, opts) -- vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { noremap=true, silent=true })
local config = { local config = {
virtual_text = true, virtual_text = true,
@@ -24,6 +24,7 @@ return
-- Keymaps to be set after the plugin is loaded -- Keymaps to be set after the plugin is loaded
keymaps = { keymaps = {
{ keys="<leader>f" , cmd="<Nop>" , desc="Find" },
{ keys="<leader>ff", cmd=require('fzf-lua').files , desc="Files" }, { keys="<leader>ff", cmd=require('fzf-lua').files , desc="Files" },
{ keys="<leader>ft", cmd=require('fzf-lua').live_grep , desc="Text" }, { keys="<leader>ft", cmd=require('fzf-lua').live_grep , desc="Text" },
{ keys="<leader>fb", cmd=require('fzf-lua').buffers , desc="Buffers" }, { keys="<leader>fb", cmd=require('fzf-lua').buffers , desc="Buffers" },
@@ -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 }
}
}
@@ -13,5 +13,52 @@ return
start_with_preview = 'gL', start_with_preview = 'gL',
}, },
} }
require('mini.notify').setup()
local miniclue = require('mini.clue')
miniclue.setup{
triggers = {
-- Leader triggers
{ mode = { 'n', 'x' }, keys = '<Leader>' },
-- `[` and `]` keys
{ mode = 'n', keys = '[' },
{ mode = 'n', keys = ']' },
-- Built-in completion
{ mode = 'i', keys = '<C-x>' },
-- `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 = '<C-r>' },
-- Window commands
{ mode = 'n', keys = '<C-w>' },
-- `z` key
{ mode = { 'n', 'x' }, keys = 'z' },
},
clues = {
-- Enhance this by adding descriptions for <Leader> 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, end,
} }
@@ -7,18 +7,18 @@ return
command = 'codelldb', command = 'codelldb',
} }
dap.configurations.c = { -- dap.configurations.c = {
{ -- {
name = 'Launch file', -- name = 'Launch file',
type = 'codelldb', -- type = 'codelldb',
request = 'launch', -- request = 'launch',
program = function() -- program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') -- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end, -- end,
cwd = '${workspaceFolder}', -- cwd = '${workspaceFolder}',
stopOnEntry = false, -- stopOnEntry = false,
} -- }
} -- }
dap.listeners.before.attach.key_config = function() dap.listeners.before.attach.key_config = function()
vim.keymap.push('n', '<Down>' , dap.step_over) vim.keymap.push('n', '<Down>' , dap.step_over)
@@ -39,6 +39,8 @@ return
end, end,
keymaps = { keymaps = {
{ keys = '<leader>d' , cmd = "<Nop>" , desc = 'Debugger' },
{ keys = '<leader>dr', cmd = require('dap').continue , desc = 'Run' },
{ keys = '<leader>db', cmd = require('dap').toggle_breakpoint, desc = 'Toggle Breakpoint' }, { keys = '<leader>db', cmd = require('dap').toggle_breakpoint, desc = 'Toggle Breakpoint' },
{ keys = '<leader>dn', cmd = require('dap').step_over , desc = 'Step Over' }, { keys = '<leader>dn', cmd = require('dap').step_over , desc = 'Step Over' },
}, },
@@ -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 }
}
}
@@ -16,6 +16,7 @@ return
-- Keymaps to be set after the plugin is loaded -- Keymaps to be set after the plugin is loaded
keymaps = { keymaps = {
{ keys = '<leader>o' , cmd = "<Nop>" , desc = 'Oil' },
{ keys = '<leader>oo', cmd = require('oil').open , desc = 'Open' }, { keys = '<leader>oo', cmd = require('oil').open , desc = 'Open' },
{ keys = '<leader>oc', cmd = require('oil').close , desc = 'Close' }, { keys = '<leader>oc', cmd = require('oil').close , desc = 'Close' },
{ keys = '<leader>of', cmd = function() require('oil').toggle_float(nil, { preview = {} }) end, desc = 'Toggle Floating' }, { keys = '<leader>of', cmd = function() require('oil').toggle_float(nil, { preview = {} }) end, desc = 'Toggle Floating' },
@@ -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 = '<leader>t' , cmd = "<Nop>" , desc = 'Task Runner' },
{ keys = '<leader>tr', cmd = require('overseer').run_task, desc = 'Run Task' },
{ keys = '<leader>tt', cmd = require('overseer').toggle , desc = 'Toggle View' },
-- { [modes='n'], keys, cmd, desc }
}
}
+12 -1
View File
@@ -13,7 +13,7 @@ return
{ src = 'https://github.com/nvim-mini/mini.nvim', name = 'mini' }, { src = 'https://github.com/nvim-mini/mini.nvim', name = 'mini' },
{ src = 'https://github.com/stevearc/oil.nvim', name = 'oil' }, { src = 'https://github.com/stevearc/oil.nvim', name = 'oil' },
'https://github.com/ibhagwan/fzf-lua', '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' }, { src = 'https://codeberg.org/andyg/leap.nvim', name = 'leap' },
@@ -28,4 +28,15 @@ return
-- Misc. -- Misc.
{ src = 'https://github.com/folke/lazydev.nvim', name = 'lazydev', data = { simple_init = true } }, { 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' },
} }
+17 -15
View File
@@ -31,26 +31,28 @@ keymap("n", "<M-h>", ":vertical resize -2<cr>", {silent=true})
keymap("n", "<M-l>", ":vertical resize +2<cr>", {silent=true}) keymap("n", "<M-l>", ":vertical resize +2<cr>", {silent=true})
-- Navigate buffers -- -- Navigate buffers --
keymap("n", "<leader>j", ":bnext<cr>", {silent=true}) keymap("n", "<leader>b" , "<Nop>" , {desc = "Buffers"})
keymap("n", "<leader>k", ":bprevious<cr>", {silent=true}) keymap("n", "<leader>bj", ":bnext<cr>" , {desc = "Next" , silent=true})
keymap("n", "<leader>d", ":bdelete<cr>", {silent=true}) keymap("n", "<leader>bk", ":bprevious<cr>", {desc = "Prev" , silent=true})
keymap("n", "<leader>bd", ":bdelete<cr>" , {desc = "Close", silent=true})
-- Faster command -- -- Faster command --
keymap("n", ";", ":") keymap("n", ";", ":")
-- LSP Commands -- -- LSP Commands --
keymap("n", "<leader>l?", vim.lsp.buf.hover) keymap("n", "<leader>l" , "<Nop>" , {desc = "LSP"})
keymap("n", "<leader>li", vim.lsp.buf.implementation) keymap("n", "<leader>lg" , "<Nop>" , {desc = "Go To"})
keymap("n", "<leader>ld", vim.lsp.buf.definition) keymap("n", "<leader>lgi", vim.lsp.buf.implementation, {desc = "Implementation"})
keymap("n", "<leader>lD", vim.lsp.buf.declaration) keymap("n", "<leader>lgd", vim.lsp.buf.definition , {desc = "Definition"})
keymap("n", "<leader>lR", vim.lsp.buf.rename) keymap("n", "<leader>lgD", vim.lsp.buf.declaration , {desc = "Declaration"})
keymap("n", "<leader>lca", vim.lsp.buf.code_action) keymap("n", "<leader>l?" , vim.lsp.buf.hover , {desc = "Inspect Cursor"})
keymap("n", "<leader>lr", vim.lsp.buf.references) keymap("n", "<leader>lR" , vim.lsp.buf.rename , {desc = "Rename"})
keymap("n", "<leader>lf", vim.diagnostic.open_float) keymap("n", "<leader>la" , vim.lsp.buf.code_action , {desc = "Code Action"})
keymap("n", "<leader>lF", vim.lsp.buf.format) keymap("n", "<leader>lr" , vim.lsp.buf.references , {desc = "List References"})
keymap("n", "<leader>li", vim.lsp.inlay_hint.toggle) keymap("n", "<leader>lF" , vim.lsp.buf.format , {desc = "Format"})
keymap("i", "<C-k>", vim.lsp.buf.signature_help) keymap("n", "<leader>lh" , vim.lsp.inlay_hint.toggle , {desc = "Toggle Hints"})
keymap("i", "<C-space>", vim.lsp.completion.get) keymap("i", "<C-k>" , vim.lsp.buf.signature_help)
keymap("i", "<C-space>" , vim.lsp.completion.get)
-- Insert -- -- Insert --
-- Quicker escape -- -- Quicker escape --
+26 -2
View File
@@ -1,13 +1,17 @@
{ {
"plugins": { "plugins": {
"fzf-lua": { "fzf-lua": {
"rev": "14e2ebc7ed4cef90ffb4fd192ca28c33741818eb", "rev": "9f0432fdd7825ab163520045831a40b6df82ea28",
"src": "https://github.com/ibhagwan/fzf-lua" "src": "https://github.com/ibhagwan/fzf-lua"
}, },
"helpview.nvim": { "helpview.nvim": {
"rev": "518789535a0cb146224a428edf93a70f98b795db", "rev": "518789535a0cb146224a428edf93a70f98b795db",
"src": "https://github.com/OXY2DEV/helpview.nvim" "src": "https://github.com/OXY2DEV/helpview.nvim"
}, },
"image": {
"rev": "da2be65c153ba15a14a342b05591652a6df70d58",
"src": "https://github.com/3rd/image.nvim"
},
"lazydev": { "lazydev": {
"rev": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d", "rev": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d",
"src": "https://github.com/folke/lazydev.nvim" "src": "https://github.com/folke/lazydev.nvim"
@@ -16,10 +20,18 @@
"rev": "e20f33507bd2d6c671b7273f797f2d3cf521ac61", "rev": "e20f33507bd2d6c671b7273f797f2d3cf521ac61",
"src": "https://codeberg.org/andyg/leap.nvim" "src": "https://codeberg.org/andyg/leap.nvim"
}, },
"markview": {
"rev": "dbf74b6db11c1468d5128a38b26b6d99dc7316e9",
"src": "https://github.com/OXY2DEV/markview.nvim"
},
"mason": { "mason": {
"rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65", "rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65",
"src": "https://github.com/mason-org/mason.nvim" "src": "https://github.com/mason-org/mason.nvim"
}, },
"memos": {
"rev": "1d478708adc55a6678801b7d93532526826395cd",
"src": "https://git.neosisyphus.com/mo7sen/memos.nvim"
},
"mini": { "mini": {
"rev": "439cdcd6992bc9012efd7d8ed7a7b7a0f1fac32a", "rev": "439cdcd6992bc9012efd7d8ed7a7b7a0f1fac32a",
"src": "https://github.com/nvim-mini/mini.nvim" "src": "https://github.com/nvim-mini/mini.nvim"
@@ -52,6 +64,10 @@
"rev": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849", "rev": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849",
"src": "https://github.com/nvim-treesitter/nvim-treesitter" "src": "https://github.com/nvim-treesitter/nvim-treesitter"
}, },
"obsidian": {
"rev": "726b60c89f4bafef267a714ea1faa1335bdd414a",
"src": "https://github.com/epwalsh/obsidian.nvim"
},
"oil": { "oil": {
"rev": "0fcc83805ad11cf714a949c98c605ed717e0b83e", "rev": "0fcc83805ad11cf714a949c98c605ed717e0b83e",
"src": "https://github.com/stevearc/oil.nvim" "src": "https://github.com/stevearc/oil.nvim"
@@ -59,6 +75,14 @@
"overseer": { "overseer": {
"rev": "a2194447f4c5a1baf95139c5c7b539fa7b0d012f", "rev": "a2194447f4c5a1baf95139c5c7b539fa7b0d012f",
"src": "https://github.com/stevearc/overseer.nvim" "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"
} }
} }
} }
+5
View File
@@ -1,4 +1,9 @@
#!/bin/bash #!/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 & # while true; do ~/.config/kwm/bar.sh; sleep 1; done | kwm &
~/.config/kwm/bar.sh & ~/.config/kwm/bar.sh &
kwm & kwm &
@@ -99,10 +99,10 @@ title_error = { fg = "#a85361" }
[filetype] [filetype]
rules = [ rules = [
# directories # directories
{ name = "*/", fg = "#1f6f88" }, { url = "*/", fg = "#1f6f88" },
# executables # executables
{ name = "*", is = "exec", fg = "#7e9350" }, { url = "*", is = "exec", fg = "#7e9350" },
# images # images
{ mime = "image/*", fg = "#c2a05c" }, { mime = "image/*", fg = "#c2a05c" },
@@ -122,16 +122,16 @@ rules = [
{ mime = "text/x-{c,c++}", fg = "#1f6f88" }, { mime = "text/x-{c,c++}", fg = "#1f6f88" },
# config files # config files
{ name = "*.json", fg = "#c2a05c" }, { url = "*.json", fg = "#c2a05c" },
{ name = "*.yml", fg = "#1f6f88" }, { url = "*.yml", fg = "#1f6f88" },
{ name = "*.toml", fg = "#9464b6" }, { url = "*.toml", fg = "#9464b6" },
# special files # special files
{ name = "*", is = "orphan", bg = "#0a0e14" }, { url = "*", is = "orphan", bg = "#0a0e14" },
# dummy files # dummy files
{ name = "*", is = "dummy", bg = "#0a0e14" }, { url = "*", is = "dummy", bg = "#0a0e14" },
# fallback # fallback
{ name = "*/", fg = "#1f6f88" }, { url = "*/", fg = "#1f6f88" },
] ]
+15
View File
@@ -2,3 +2,18 @@
on = [ "g", "s" ] on = [ "g", "s" ]
run = "cd sftp://pebble" run = "cd sftp://pebble"
desc = "Go to 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"
+9 -2
View File
@@ -1,5 +1,12 @@
[plugin] [[plugin.deps]]
deps = [] use = "Ape/open-with-cmd"
rev = "e3d430f"
hash = "d29c1ffa99099181faf8c01d1f59aa4c"
[[plugin.deps]]
use = "yazi-rs/plugins:smart-enter"
rev = "1962818"
hash = "187cc58ba7ac3befd49c342129e6f1b6"
[[flavor.deps]] [[flavor.deps]]
use = "kmlupreti/ayu-dark" use = "kmlupreti/ayu-dark"
@@ -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.
@@ -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"
```
@@ -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,
}
@@ -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.
@@ -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 <kbd>l</kbd> 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
@@ -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 }