diff --git a/docs/en/src/awesome-hacks.md b/docs/en/src/awesome-hacks.md index 8cfb030e..b1e775dc 100644 --- a/docs/en/src/awesome-hacks.md +++ b/docs/en/src/awesome-hacks.md @@ -517,6 +517,35 @@ xplr.config.modes.builtin.default.key_bindings.on_key.T = { +### Toggle exe + +Toggle the execute permission on the focused node. + +
+Expand for details + +- Author: [@doums] +- Requires: chmod +- Tested on: Linux + +```lua +xplr.config.modes.builtin.default.key_bindings.on_key['*'] = { + help = 'toggle exe', + messages = { + { + BashExecSilently0 = [===[ + f="$XPLR_FOCUS_PATH" + if [ -x "$f" ]; then chmod -x "$f"; else chmod +x "$f"; fi + "$XPLR" -m 'ExplorePwd' + "$XPLR" -m 'FocusPath: %q' "$f" + ]===], + }, + }, +} +``` + +
+ ## Also See: - [Awesome Plugins][15]