Skip to content

Commit 36b109f

Browse files
committed
feat(yazi): add change ratio plugin
1 parent 89628bb commit 36b109f

5 files changed

Lines changed: 21 additions & 3 deletions

File tree

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
flavors/
2-
plugins/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
git.yazi/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--- @sync entry
2+
3+
local function entry(_, job)
4+
rt.mgr.ratio = {
5+
tonumber(job.args[1]),
6+
tonumber(job.args[2]),
7+
tonumber(job.args[3]),
8+
}
9+
10+
ya.emit("app:resize", {})
11+
end
12+
13+
return { entry = entry }

home/dot_config/exact_yazi/keymap.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,15 @@ keymap = [
130130
# Tasks
131131
{ on = "w", run = "tasks:show" },
132132

133+
# Layout
134+
{ on = ["z", "z"], run = "plugin change-ratio -- 1 1 1" }, # Default columns
135+
{ on = ["z", "s"], run = "plugin change-ratio -- 0 1 0" }, # Single column
136+
{ on = ["z", "f"], run = "plugin change-ratio -- 1 3 1" }, # Focused column
137+
133138
# Help
134139
{ on = "~", run = "help" },
135140
{ on = "<F1>", run = "help" },
136141

137142
# Zoxide
138-
{ on = "Z", run = "plugin zoxide" },
143+
{ on = "<C-k>", run = "plugin zoxide" },
139144
]

home/dot_config/exact_yazi/yazi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[mgr]
44
show_hidden = true
55
ratio = [1, 1, 1]
6-
title_format = "yazi: {cwd}"
6+
title_format = "{cwd}: yazi"
77
linemode = "size"
88

99
[[plugin.prepend_fetchers]]

0 commit comments

Comments
 (0)