feat(yazi): plugins

This commit is contained in:
js0ny 2025-02-09 14:58:06 +00:00
parent 382064dc29
commit db94167c59
6 changed files with 62 additions and 32 deletions

1
.gitignore vendored
View file

@ -37,3 +37,4 @@ spacemacs/
lazy-lock.json
tools/doom/custom.el
tools/doom/custom.el

View file

@ -1,31 +1,31 @@
# dotfiles
This repository contains dotfiles for multiple platforms, with _colemak_ as the default keyboard layout.
No rice, no Unixporn/NTporn, just a simple setup that works for me.
Works for Windows, Linux and MacOS.
## Structure
```shell
 .
├──  .editorconfig # Editor configuration, for LF/CRLF correction
├──  .gitattributes # Git attributes, for LF/CRLF correction
├──  bootstrap # Setup scripts for new machines
├──  common # Single-file configurations (lesskey, vimrc etc`)
├──  platforms # Platform-specific configurations
├──  readme.md # This file
├──  scripts # Scripts for various tasks
└──  tools # Multi-file configurations (shell, neovim etc)
```
## Keybindings
```
^
e
< h i >
n
v
```
* dotfiles
This repository contains dotfiles for multiple platforms, with /colemak/
as the default keyboard layout.
No rice, no Unixporn/NTporn, just a simple setup that works for me.
Works for Windows, Linux and MacOS.
** Structure
#+begin_src shell
 .
├──  .editorconfig # Editor configuration, for LF/CRLF correction
├──  .gitattributes # Git attributes, for LF/CRLF correction
├──  bootstrap # Setup scripts for new machines
├──  common # Single-file configurations (lesskey, vimrc etc)
├──  platforms # Platform-specific configurations
├──  readme.md # This file
├──  scripts # Scripts for various tasks
└──  tools # Multi-file configurations (shell, neovim etc)
#+end_src
** Keybindings
#+begin_example
^
e
< h i >
n
v
#+end_example

2
tools/yazi/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
flavors/
plugins/

18
tools/yazi/init.lua Normal file
View file

@ -0,0 +1,18 @@
-- ~/.config/yazi/init.lua
function Linemode:size_and_mtime()
local time = math.floor(self._file.cha.mtime or 0)
if time == 0 then
time = ""
elseif os.date("%Y", time) == os.date("%Y") then
time = os.date("%b %d %H:%M", time)
else
time = os.date("%b %d %Y", time)
end
local size = self._file:size()
return string.format("%s %s", size and ya.readable_size(size) or "-", time)
end
-- require("dual-pane"):setup({ enabled = true })
require("starship"):setup()
require("yaziline"):setup()

5
tools/yazi/package.toml Normal file
View file

@ -0,0 +1,5 @@
[plugin]
deps = [{ use = "dawsers/dual-pane", rev = "c2fed12" }, { use = "Rolv-Apneseth/starship", rev = "d1cd0a3" }, { use = "llanosrocas/yaziline", rev = "864572c" }]
[flavor]
deps = [{ use = "yazi-rs/flavors:catppuccin-mocha", rev = "fd85060" }, { use = "yazi-rs/flavors:catppuccin-latte", rev = "fd85060" }, { use = "dangooddd/kanagawa", rev = "d98f0c3" }]

View file

@ -1,2 +1,6 @@
[manager]
show_hidden = true
show_hidden = true
linemode = "size_and_mtime"
[preview]
wrap = "yes"