pfetch: misc

This commit is contained in:
Dylan Araps 2020-01-26 22:24:34 +02:00
parent c36607909b
commit 32743859da
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

9
pfetch
View File

@ -25,10 +25,9 @@ log() {
align=$(printf '%*.s' "$((${#name}-info_length))" "") align=$(printf '%*.s' "$((${#name}-info_length))" "")
# Construct the information string. # Construct the information string.
out=
out="[3${PF_COL1-4};1m${name}" out="[3${PF_COL1-4};1m${name}"
out="$out${PF_SEP}${align}" out="$out${PF_SEP}${align}"
out="$out[3${PF_COL2-7}m${info}" out="$out[3${PF_COL2-7}m${info}"
} }
get_title() { get_title() {
@ -1340,13 +1339,11 @@ main() {
[ "$TERM" = minix ] || [ "$TERM" = minix ] ||
[ "$TERM" = cons25 ] || { [ "$TERM" = cons25 ] || {
# '[?7l': Disable line-wrapping. # '[?7l': Disable line-wrapping.
# '[?25l': Hide the cursor. printf '[?7l' >&6
printf '[?7l[?25l' >&6
# Leave the terminal how we found it on exit or Ctrl+C. # Leave the terminal how we found it on exit or Ctrl+C.
# '[?7h': Enable line-wrapping. # '[?7h': Enable line-wrapping.
# '[?25h': Show the cursor. trap 'printf [?7h >&6' EXIT
trap 'printf [?7h[?25h >&6' EXIT
} }
# Store the output of 'uname' to avoid calling it multiple times # Store the output of 'uname' to avoid calling it multiple times