Compare commits

...

2 Commits

@ -5,6 +5,19 @@ def main [] {
}
def `main open-file` [path: string] {
zellij action move-focus right
zellij action write-chars $":open ($path)\r"
match ($path | path parse | get extension | str downcase) {
"png" => { open-image $path }
"jpg" => { open-image $path }
"jpeg" => { open-image $path }
_ => { open-editor $path }
}
}
def open-editor [path: string] {
zellij ac move-focus right
zellij ac write-chars $":open ($path)\r"
}
def open-image [path: string] {
zellij ac new-pane -f -- chafa -C on --scale max $path
}

@ -1,4 +1,6 @@
modal = true
default_flags = "g"
show_selection_mark = true
[[verbs]]
invocation = "open"
@ -6,3 +8,9 @@ key = "enter"
external = "nu ~/.local/share/scripts/ide.nu open-file '{file}'"
apply_to = "file"
leave_broot = false
[[verbs]]
invocation = "touch {name}"
external = "nu -c \"touch {directory}/{name}\""
apply_to = "any"
leave_broot = false

@ -3,7 +3,7 @@ theme = "dracula-purple"
[editor]
rulers = [120]
shell = ["zsh", "-c"]
shell = ["nu", "-c"]
true-color = true
cursorline = true
color-modes = true
@ -13,6 +13,8 @@ insert = "bar"
normal = "block"
select = "underline"
[editor.soft-wrap]
enable = true
[editor.statusline]
left = ["mode", "spinner", "spacer", "file-name"]

@ -11,7 +11,7 @@ layout {
tab split_direction="Vertical" {
pane split_direction="Vertical" {
pane command="nu" size="15%" {
args "-c" "broot --conf ~/.config/broot/ide.toml"
args "-c" "broot --conf ~/.config/broot/ide.toml --sort-by-type-dirs-first"
}
pane command="nu" size="50%" {
args "-c helix"

Loading…
Cancel
Save