Closed Dzordzu closed 11 months ago
Demo:
@kamiyaa can you look at it?
@kamiyaa can you look at it?
Yep! Sorry, I've just been busy :x
Looks good so far.
Is there a reason for putting it inside joshuto.toml
?
I think it would make more sense to keep inside keymap.toml
But on the other hand, that might make keymap.toml
more complicated than it needs to be
Also, if you could add documentation for the new commands inside docs/
either in this PR, or a followup PR, that would be great!
Is there a reason for putting it inside
joshuto.tom
l
Yep. It may be later used as the simple plugin system (not only for commands, but for example for another window)
I think it would make more sense to keep inside
keymap.toml
I also thought about it, but it is not a keymap, but a more general component
But on the other hand, that might make
keymap.toml
more complicated than it needs to be
Yep
Also, if you could add documentation for the new commands inside
docs/
Oh. I forgot to include it! I will create a commit with docs in the following days :)
Would this allow to chain "mixed" (shell + built-in joshuto
) commands by any chance?
Use case:
I have the following in keymap.toml
:
[default_view]
keymap = [
{ keys = ["*"], command = "shell /home/xfzv/.config/joshuto/toggle_executable.sh %s" },
]
toggle_executable.sh
:
#! /usr/bin/env bash
if [[ -x "$1" ]]; then
chmod -x "$1"
else
chmod +x "$1"
fi
Works fine, but I have to run :reload_dirlist
manually after pressing *
so that joshuto
reflects the permission change.
I wish I could use something like this for example:
[default_view]
keymap = [
{ keys = ["*"], command = "shell /home/xfzv/.config/joshuto/toggle_executable.sh %s" ; :reload_dirlist },
]
Implemented with https://github.com/kamiyaa/joshuto/commit/31beaabe6b2cf4119aacae6c1722cdc1e5ba2f5b :tada::
keymap = [
{ keys = ["*"], commands = ["/home/xfzv/.config/joshuto/toggle_executable.sh %s", "reload_dirlist"], description = "Toggle executable" },
]
what're we waiting for? everything looks good from here
I need to resolve conflicts, add more documentation. Furthermore I'm required to find a spare time and a will to contribute (a little personal issues, sorry for that!)
Just ping me when its ready!
I messed it so badly, that I needed to open another PR. Working at nights is really funny!
Implemented #338