Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot enter shell wrapper [;] #192

Open
no1etal opened this issue Jan 2, 2025 · 7 comments
Open

Cannot enter shell wrapper [;] #192

no1etal opened this issue Jan 2, 2025 · 7 comments

Comments

@no1etal
Copy link

no1etal commented Jan 2, 2025

Zoxide and Shell not working. As I press the keys, nothing happens.
I have zoxide and fzf installed.

{ on = [ ";" ], run = "shell", desc = "Run a shell command" }, { on = [ ":" ], run = "shell --block", desc = "Run a shell command (block the UI until the command finishes)" },

{ on = [ "z" ], run = "zoxide zoxide", desc = "Jump to a directory using zoxide" }, { on = [ "Z" ], run = "zoxide fzf", desc = "Jump to a directory, or reveal a file using fzf" },

System: Arch
Yazi 0.4.2 (Arch Linux 2024-12-28)

@hankertrix
Copy link
Contributor

Please read https://yazi-rs.github.io/docs/configuration/keymap.

It seems like you just want to use the default key bindings. In that case, you can remove your keymap.toml file entirely as Yazi will use its default keybindings when no keymap.toml is found.

@no1etal
Copy link
Author

no1etal commented Jan 6, 2025

I would like to still use custom keys that I have configured.
Nevertheless, I wonder why key-maps are not working as configured.

@hankertrix
Copy link
Contributor

Could you upload your keymap.toml file?

From what you have pasted in your original post, it seems like a configuration error on your end.

@no1etal
Copy link
Author

no1etal commented Jan 6, 2025

Sure, LINK here (expires in one day)

@hankertrix
Copy link
Contributor

You have a lot of errors in your configuration.

Diff your file against this file: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap-default.toml

Zoxide and fzf don't work because of the configuration error on line 82 and 83:

	{ on = [ "z" ],         run = "zoxide zoxide",                                          desc = "Jump to a directory using zoxide" },
	{ on = [ "Z" ],         run = "zoxide fzf",                                             desc = "Jump to a directory, or reveal a file using fzf" },

It should be "plugin zoxide" and "plugin fzf" instead.

I also highly recommend removing everything except lines 306 - 324:

[[manager.prepend_keymap]]
on   = "<C-d>"
run  = "plugin diff"
desc = "Diff the selected with the hovered file"
 
[[manager.prepend_keymap]]
on   = "T"
run  = "plugin hide-preview"
desc = "Hide or show preview"
 
[[manager.prepend_keymap]]
on   = [ "c", "m" ]
run  = "plugin chmod"
desc = "Chmod on selected files"
 
[[manager.prepend_keymap]]
on   = "F"
run  = "plugin smart-filter"
desc = "Smart filter"

And changing lines 148 - 155 to the format above.

        { on = [ "g", "w" ],       run = "cd ~/hpsamba/home/drigy/watch/",   desc = "Go to the rtorrent watch directory" },
        { on = [ "g", "q" ],       run = "cd ~/hpsamba/home/storage/qnap/",   desc = "Go to the qnap directory" },
        { on = [ "g", "a" ],       run = "cd ~/hpsamba/home/storage/qnap/.myanon",   desc = "Go to the rorrent DL directory" },
        { on = [ "g", "z" ],       run = "cd $XDG_CONFIG_HOME/zinger/zingers.txt",   desc = "Go to the rorrent DL directory" },
        { on = [ "g", "s" ],       run = "cd $XDG_HOME/hpsamba/home/drigy",   desc = "Go to the rorrent my hpserver home dir" },
        { on = [ "g", "l" ],       run = "cd ~/.local",   desc = "Go to the .local directory" },
        { on = [ "g", "u" ],       run = "cd   /run/media/kopachke",   desc = "Go to mounted USB" },
        { on = [ "g", "." ],       run = "cd $DOTFILES/",   desc = "Go to the dotfiles" },

@no1etal
Copy link
Author

no1etal commented Jan 6, 2025

Many thanks for your effort, it is appreciated!

I suppose changes were done to yazi with updates as I haven't done much to config lines.

@hankertrix
Copy link
Contributor

You're welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants