mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 09:08:38 +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.
|
# Check $PPID for terminal emulator.
|
||||||
while [[ -z "$term" ]]; do
|
while [[ -z "$term" ]]; do
|
||||||
|
if [[ "$SSH_CONNECTION" ]]; then
|
||||||
|
term="$SSH_TTY"
|
||||||
|
else
|
||||||
parent="$(get_ppid "$parent")"
|
parent="$(get_ppid "$parent")"
|
||||||
name="$(get_process_name "$parent")"
|
name="$(get_process_name "$parent")"
|
||||||
case "${name// }" in
|
case "${name// }" in
|
||||||
@@ -1657,6 +1660,7 @@ get_term() {
|
|||||||
"gnome-terminal-") term="gnome-terminal" ;;
|
"gnome-terminal-") term="gnome-terminal" ;;
|
||||||
*) term="${name##*/}" ;;
|
*) term="${name##*/}" ;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Log that the function was run.
|
# Log that the function was run.
|
||||||
|
Reference in New Issue
Block a user