yazi config
This commit is contained in:
parent
ee76511d46
commit
18c297347d
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
beep -f 4000 -l 150 -D 150 -n -f 4000 -l 150
|
||||
beep -f 4000 -l 150 -D 150 -n -f 4000 -l 150
|
||||
|
||||
13
home/user/.config/yazi/init.lua
Normal file
13
home/user/.config/yazi/init.lua
Normal file
@ -0,0 +1,13 @@
|
||||
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
|
||||
@ -0,0 +1,21 @@
|
||||
[mgr]
|
||||
sort_by = "natural"
|
||||
sort_dir_first = false
|
||||
linemode = "size_and_mtime"
|
||||
show_symlink = true
|
||||
|
||||
[preview]
|
||||
wrap = "no"
|
||||
tab_size = 4
|
||||
|
||||
|
||||
[opener]
|
||||
play = [
|
||||
{ run = "mpv %s", orphan = true, for = "unix" },
|
||||
]
|
||||
edit = [
|
||||
{ run = "cd \"${YAZI_ORIGINAL_CWD:-${PWD}}\" && ${EDITOR} %s", block = true, for = "unix" },
|
||||
]
|
||||
open = [
|
||||
{ run = "xdg-open %s1", desc = "Open" },
|
||||
]
|
||||
@ -75,6 +75,10 @@ alias beeptime='beep -D 400 -l 400 -r "$(date +%I)" -f 440 -n -D 1000 -l 0 -n -D
|
||||
alias vi='nvim'
|
||||
alias svi="sudo --preserve-env nvim"
|
||||
|
||||
# Yazi
|
||||
alias ya='YAZI_ORIGINAL_CWD="${PWD}" \yazi'
|
||||
alias yazi='ya'
|
||||
|
||||
# git
|
||||
for al in s d di co col cob ds u ps pst pl pr hs last lastd df amend br fuck sw swl swc swb
|
||||
do
|
||||
|
||||
@ -70,3 +70,10 @@ cargo-init() {
|
||||
cargo init "${1}" && cd "${1}" && \
|
||||
return "${?}"
|
||||
}
|
||||
|
||||
yacd() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
|
||||
yazi "${@}" --cwd-file="${tmp}"
|
||||
cd "$(cat "${tmp}")"
|
||||
rm -f "${tmp}" >/dev/null
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user