diff --git a/README.md b/README.md index df4462a..49b8d5d 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,11 @@ PF_INFO="ascii" # Example: Only Information. PF_INFO="title os host kernel uptime pkgs memory" +# A file to source before running pfetch. +# Default: unset +# Valid: A shell script +PF_SOURCE="" + # Separator between info name and info data. # Default: unset # Valid: string diff --git a/pfetch b/pfetch index 77ee310..2311f16 100755 --- a/pfetch +++ b/pfetch @@ -1296,6 +1296,11 @@ main() { # This gives full control over what it displayed on the screen. exec 6>&1 >/dev/null + # Allow the user to execute their own script and modify or + # extend pfetch's behavior. + # shellcheck source=/dev/null + . "${PF_SOURCE:-/dev/null}" ||: + # Ensure that the 'TMPDIR' is writable as heredocs use it and # fail without the write permission. This was found to be the # case on Android where the temporary directory requires root.