mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 01:00:17 +00:00
Terminal: Disable terminal detection if device is connected over SSH
This commit is contained in:
4
neofetch
4
neofetch
@@ -1648,6 +1648,9 @@ get_term() {
|
||||
|
||||
# Check $PPID for terminal emulator.
|
||||
while [[ -z "$term" ]]; do
|
||||
if [[ "$SSH_CONNECTION" ]]; then
|
||||
term="$SSH_TTY"
|
||||
else
|
||||
parent="$(get_ppid "$parent")"
|
||||
name="$(get_process_name "$parent")"
|
||||
case "${name// }" in
|
||||
@@ -1657,6 +1660,7 @@ get_term() {
|
||||
"gnome-terminal-") term="gnome-terminal" ;;
|
||||
*) term="${name##*/}" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
# Log that the function was run.
|
||||
|
Reference in New Issue
Block a user