diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2020-01-26 22:08:57 +0200 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2020-01-26 22:08:57 +0200 |
| commit | a7b0439aebb8943b9ae241e0ec184656d0254a70 (patch) | |
| tree | b4931c025ddbe29e341909daa79afa6d05bd32fa | |
| parent | 0dcc4d6a82620b33c2a3aa54682d77aa67789c0e (diff) | |
| download | pfetch-a7b0439aebb8943b9ae241e0ec184656d0254a70.tar.gz | |
pfetch: Added PF_SOURCE. Closes #34
| -rw-r--r-- | README.md | 5 | ||||
| -rwxr-xr-x | pfetch | 5 |
2 files changed, 10 insertions, 0 deletions
@@ -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 @@ -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. |
