kwerty

yazi

Terminal file manager with vim keybindings and image preview

linuxmacosratataquetoolsfilemanager

Overview

yazi is a blazing-fast terminal file manager written in Rust with image preview, bulk operations, and vim-style navigation. ratataque uses it as the primary file browser, replacing graphical file managers entirely.

Configuration

# yazi.toml
[mgr]
show_hidden = true
 
[[plugin.prepend_fetchers]]
id   = "git"
name = "*"
run  = "git"
 
[[plugin.prepend_fetchers]]
id   = "git"
name = "*/"
run  = "git"

Keybindings

# keymap.toml
[[mgr.prepend_keymap]]
on   = "l"
run  = "plugin smart-enter"
desc = "Enter the child directory, or open the file"
 
[[mgr.prepend_keymap]]
on   = "<C-j>"
run  = "arrow 1"
desc = "Move down"
 
[[mgr.prepend_keymap]]
on   = "s"
run  = "plugin fzf"
desc = "Fuzzy search in current file"

Zoom & Preview

[[mgr.prepend_keymap]]
on   = "i"
run  = "plugin zoom 1"
desc = "Zoom in hovered file"
 
[[mgr.prepend_keymap]]
on   = "-"
run  = "plugin zoom -1"
desc = "Zoom out hovered file"

File Operations

[[mgr.prepend_keymap]]
on   = [ "c", "m" ]
run  = "plugin chmod"
desc = "Chmod on selected files"
 
[[mgr.prepend_keymap]]
on = "y"
run = [ 'shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list', "yank" ]
 
[[mgr.prepend_keymap]]
on = [ "S" ]
run = '''shell 'fish -c "share \"$@\""' --confirm'''
desc = "Share file"
 
[[mgr.prepend_keymap]]
on = "<C-i>"
run = 'shell -- dragon-drop -x -i -T "$@"'
desc = "Drag and drop"

Directory Shortcuts

[[mgr.prepend_keymap]]
on = [ ";", "w" ]
run = "cd ~"
desc = "Home directory"
 
[[mgr.prepend_keymap]]
on = [ ";", "d" ]
run = "cd ~/Downloads"
desc = "Downloads"
 
[[mgr.prepend_keymap]]
on = [ ";", "c" ]
run = "cd ~/.config/"
desc = "Config directory"
 
[[mgr.prepend_keymap]]
on = [ ";", "j" ]
run = "cd ~/projets/"
desc = "Projects"
 
[[mgr.prepend_keymap]]
on = [ ";", "u" ]
run = "cd /run/media/ewan/"
desc = "Media"

Advanced Features

[[mgr.prepend_keymap]]
on  = "M"
run = "plugin mount"
 
[[mgr.prepend_keymap]]
on   = "F"
run  = "plugin smart-filter"
desc = "Smart filter"
 
[[mgr.prepend_keymap]]
on   = "<C-s>"
run  = 'shell --block --confirm "sesh connect \"$0\" && exit"'
desc = "Quit and connect to sesh session"
 
[[mgr.prepend_keymap]]
on = "<C-p>"
run = [ "sort mtime --reverse", "arrow top" ]
desc = "Go to newest folder"
 
[[mgr.prepend_keymap]]
on = "<C-n>"
run  = [ "sort mtime --reverse=no", "arrow bot" ]
desc = "Jump to newest file"

Theme

# theme.toml - Custom Cyan/Green Color Scheme
[manager]
cwd = { fg = "#00d1e9" }
 
# Tab
tab_active   = { reversed = true }
tab_inactive = {}
tab_width    = 1
 
# Count indicators
count_copied   = { fg = "#222327", bg = "#6ae073" }
count_cut      = { fg = "#222327", bg = "#ff6e64" }
count_selected = { fg = "#222327", bg = "#ffde57" }
 
# Border
border_symbol = "│"
border_style  = { fg = "#63E1B2" }
 
[tabs]
active   = { fg = "#222327", bg = "#63E1B2", bold = true }
inactive = { fg = "#63E1B2", bg = "#393939" }
 
# Separator
sep_inner = { open = "", close = "" }
sep_outer = { open = "", close = "" }
 
[mode]
normal_main = { fg = "#222327", bg = "#63E1B2", bold = true }
normal_alt  = { fg = "#63E1B2", bg = "#393939" }
select_main = { fg = "#222327", bg = "#6ae073", bold = true }
select_alt  = { fg = "#6ae073", bg = "#393939" }
unset_main  = { fg = "#222327", bg = "#f2cdcd", bold = true }
unset_alt   = { fg = "#f2cdcd", bg = "#393939" }
 
[status]
separator_open  = ""
separator_close = ""

Plugins

-- init.lua
require("full-border"):setup()
require("git"):setup()

Active plugins include:

  • full-border: Enhanced border styling
  • git: Git status integration in file listings
  • smart-enter: Intelligent directory/file navigation
  • zoom: Image and file preview zooming
  • smart-filter: Advanced file filtering
  • mount: Device mounting capabilities
  • chmod: Quick file permission management
  • fzf: Fuzzy file searching

File Preview

yazi supports inline image preview in kitty terminal via the kitty graphics protocol. It also previews code with syntax highlighting, PDFs, archives, and videos.

Integration

Sesh Integration

Press <C-s> to quit yazi and connect to a sesh session directly.

Drag & Drop

Use <C-i> to initiate drag-and-drop with dragon-drop for easy file transfers.

Wayland Clipboard

File paths are copied as file:// URIs to the Wayland clipboard using wl-copy.

Source Repositories