summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorImbolc <me@imbolc.name>2023-06-26 14:54:38 +0600
committerGitHub <noreply@github.com>2023-06-26 04:54:38 -0400
commit6cb151ea4b58d006cfc52f54d52be05110bd5b90 (patch)
tree7be1610723e6d61fdf3dd192afeb0d91f318e95e
parentee607354077375be6afc2e62abba7ac4b5c0190a (diff)
Mention that the preview script should be executable (#343)
-rw-r--r--config/joshuto.toml2
-rwxr-xr-xconfig/preview_file.sh4
2 files changed, 5 insertions, 1 deletions
diff --git a/config/joshuto.toml b/config/joshuto.toml
index d1f2439..60cf360 100644
--- a/config/joshuto.toml
+++ b/config/joshuto.toml
@@ -31,7 +31,7 @@ reverse = false
[preview]
max_preview_size = 2097152 # 2MB
-preview_script = "~/.config/joshuto/preview_file.sh"
+preview_script = "~/.config/joshuto/preview_file.sh" # make sure it's marked as executable
[tab]
# inherit, home, root
diff --git a/config/preview_file.sh b/config/preview_file.sh
index a6940c6..15fa6fc 100755
--- a/config/preview_file.sh
+++ b/config/preview_file.sh
@@ -7,6 +7,10 @@
## ```
## preview_script = "~/.config/joshuto/preview_file.sh"
## ```
+## Make sure the file is marked as executable:
+## ```sh
+## chmod +x ~/.config/joshuto/preview_file.sh
+## ```
## Joshuto will call this script for each file when first hovered by the cursor.
## If this script returns with an exit code 0, the stdout of this script will be
## the file's preview text in Joshuto's right panel.