diff --git a/manjaro.sh b/manjaro.sh index 2c87b23..3aa6534 100755 --- a/manjaro.sh +++ b/manjaro.sh @@ -111,3 +111,6 @@ sudo wget -O rainbowsmoke.jpg -P /usr/share/backgrounds/ultrawide https://superu # set up vdirsyncer with google calendar using # https://vdirsyncer.pimutils.org/en/stable/config.html#google + +# yazi plugins +ya pack -a 'pirafrank/what-size' diff --git a/nushell/config.nu b/nushell/config.nu index 7609b82..45d8b14 100644 --- a/nushell/config.nu +++ b/nushell/config.nu @@ -167,4 +167,15 @@ def zoxide_completer [context: string] { } } +# yazi helper +def --env y [...args] { + let tmp = (mktemp -t "yazi-cwd.XXXXXX") + yazi ...$args --cwd-file $tmp + let cwd = (open $tmp) + if $cwd != "" and $cwd != $env.PWD { + cd $cwd + } + rm -fp $tmp +} + source ~/.oh-my-posh.nu diff --git a/yazi/keymap.toml b/yazi/keymap.toml new file mode 100644 index 0000000..17b8d11 --- /dev/null +++ b/yazi/keymap.toml @@ -0,0 +1,4 @@ +[[manager.prepend_keymap]] +on = "" +run = "plugin what-size" +desc = "Calc size of selection or cwd"