aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rwxr-xr-xpfetch21
2 files changed, 18 insertions, 5 deletions
diff --git a/README.md b/README.md
index 10fc363..583bd3c 100644
--- a/README.md
+++ b/README.md
@@ -88,7 +88,7 @@ _/\ __)/_) pkgs 130
# Default: first example below
# Valid: space separated string
#
-# OFF by default: shell palette
+# OFF by default: shell editor de palette
PF_INFO="ascii title os host kernel uptime pkgs memory"
# Example: Only ASCII.
diff --git a/pfetch b/pfetch
index 8a7c45d..343b0b7 100755
--- a/pfetch
+++ b/pfetch
@@ -277,10 +277,6 @@ get_kernel() {
esac
}
-get_shell() {
- log shell "${SHELL##*/}" >&6
-}
-
get_host() {
case $os in
Linux*)
@@ -672,6 +668,23 @@ get_memory() {
log memory "${mem_used:-?}M / ${mem_full:-?}M" >&6
}
+get_shell() {
+ # Display the basename of the '$SHELL' environment variable.
+ log shell "${SHELL##*/}" >&6
+}
+
+get_editor() {
+ # Display the value of '$VISUAL', if it's empty, display the
+ # value of '$EDITOR'.
+ log editor "${VISUAL:-$EDITOR}" >&6
+}
+
+get_de() {
+ # Display the value of '$XDG_CURRENT_DESKTOP', if it's empty,
+ # display the value of '$DESKTOP_SESSION'.
+ log de "${XDG_CURRENT_DESKTOP:-$DESKTOP_SESSION}" >&6
+}
+
get_palette() {
# Print the first 8 terminal colors. This uses the existing
# sequences to change text color with a sequence prepended