Passing parameters to bat file #3348
Replies: 1 comment
-
|
Ok. Just in case someone else finds this useful. What I initially tried doing is making the explorer icon correspond to the application that itself was opening via a bat file (which, by default, is impossible on windows because icons are attached to resources of the opener and bat files have no resources), but since I pretty much exclusively navigate via terminal, my logic was -- keep Windows Windowsing and make my own casino with blackjack and hookers on the side. The solution that worked, as always, turned out much simpler. Instead of attempting to bypass the problem on the level of some side configuration of an app, solve it on a system level. Through a moderate amount of digging, I discovered that there IS a way of specifying icon source that's not attached to the executable that opens the file. Not a particularly convenient one, like pretty much any "custom" configuration on Windows, but A way: through regedit. Then it turned out that some kind people, who must have just about had it with this lack of functionality, made an app to simplify this process. Much of the other problems I had were caused by me franticly attempting to solve the initial one and breaking stuff in the process. Default configs cover 90% of what I need from yazi anyway, so I just reverted to them. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What system are you running Yazi on?
Windows 10
What terminal are you running Yazi in?
wt
yazi --debugoutputYazi Version: 25.2.11 (ce9092e 2025-02-11) Debug : false Triple : x86_64-pc-windows-msvc (windows-x86_64) Rustc : 1.84.1 (e71f9a9a 2025-01-27) Ya Version: 25.2.11 (ce9092e 2025-02-11) Emulator TERM : None TERM_PROGRAM : None TERM_PROGRAM_VERSION: None Brand.from_env : Some(Microsoft) Emulator.detect : Emulator { kind: Left(Microsoft), light: false, cell_size: Some((10, 20)) } Adapter Adapter.matches: Sixel Desktop XDG_SESSION_TYPE : None WAYLAND_DISPLAY : None DISPLAY : None SWAYSOCK : None HYPRLAND_INSTANCE_SIGNATURE: None WAYFIRE_SOCKET : None SSH shared.in_ssh_connection: false WSL WSL: false Neovim NVIM : false Neovim version: 0.11.2 Variables SHELL : None EDITOR : Some("nvim") VISUAL : None YAZI_FILE_ONE : Some("C:\\Program Files\\Git\\usr\\bin\\file.exe") YAZI_CONFIG_HOME: None YAZI_ZOXIDE_OPTS: None FZF_DEFAULT_OPTS: Some("") Text Opener default : Some(Opener { run: "%EDITOR% %*", block: true, orphan: false, desc: "%EDITOR%", for_: None, spread: true }) block-create: Some(Opener { run: "%EDITOR% %*", block: true, orphan: false, desc: "%EDITOR%", for_: None, spread: true }) block-rename: Some(Opener { run: "%EDITOR% %*", block: true, orphan: false, desc: "%EDITOR%", for_: None, spread: true }) Multiplexers TMUX : false tmux version : program not found tmux build flags : enable-sixel=Unknown ZELLIJ_SESSION_NAME: None Zellij version : program not found Dependencies file : 5.45 ueberzugpp : program not found ffmpeg/ffprobe: 6.0 / 6.0 pdftoppm : 24.08.0 magick : 7.1.1-27 fzf : 0.65.2 fd/fdfind : 8.7.0 / program not found rg : 14.1.0 chafa : 1.14.5 zoxide : 0.9.6 7zz/7z : program not found / 23.01 jq : 1.7 Clipboard wl-copy/paste: program not found / program not found xclip : program not found xsel : program not foundDescribe the question
I need an equivalent of
if I do:
when I go to open .scn file in yazi -- it doesn't work
If I pass relative path to Start-Process -- it opens an empty file
If I pass full path to Start-Process -- everything works as it should
I don't know exactly what's going wrong here. Can someone, please, help me figure it out?
PS: There's also weird thing with text/* mime, where a lot of well established formats like
.c,.cpp,.rs,.jsetc. open just fine, but, some of the more obscure files, like.scntoc(which is basically a companion to.scnfile from before written in a DSL based on XML... so, basically, also just pure text) and, oddly, even something like.glslor.osl(also text, of course) don't... maybe that also has some relation to the problem(?)Anything else?
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions