Skip to content

Commit

Permalink
doc: add toggle exe hack (sayanarijit#726)
Browse files Browse the repository at this point in the history
  • Loading branch information
doums authored and PratyushBalaji committed Jan 29, 2025
1 parent dd731eb commit ed5c100
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/en/src/awesome-hacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,35 @@ xplr.config.modes.builtin.default.key_bindings.on_key.T = {

</details>

### Toggle exe

Toggle the execute permission on the focused node.

<details>
<summary>Expand for details</summary>

- 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"
]===],
},
},
}
```

</details>

## Also See:

- [Awesome Plugins][15]
Expand Down

0 comments on commit ed5c100

Please sign in to comment.