Merge pull request #740 from konimex/ssh
Terminal: Disable terminal detection if device is connected over SSH
This commit is contained in:
commit
ab1e05adff
2 changed files with 14 additions and 9 deletions
|
@ -46,6 +46,7 @@
|
||||||
|
|
||||||
- Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)**
|
- Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)**
|
||||||
- [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)**
|
- [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)**
|
||||||
|
- Use `$SSH_TTY` for terminal detection if machine is connected via SSH.
|
||||||
|
|
||||||
**GPU**
|
**GPU**
|
||||||
|
|
||||||
|
|
22
neofetch
22
neofetch
|
@ -1648,15 +1648,19 @@ get_term() {
|
||||||
|
|
||||||
# Check $PPID for terminal emulator.
|
# Check $PPID for terminal emulator.
|
||||||
while [[ -z "$term" ]]; do
|
while [[ -z "$term" ]]; do
|
||||||
parent="$(get_ppid "$parent")"
|
if [[ "$SSH_CONNECTION" ]]; then
|
||||||
name="$(get_process_name "$parent")"
|
term="$SSH_TTY"
|
||||||
case "${name// }" in
|
else
|
||||||
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
|
parent="$(get_ppid "$parent")"
|
||||||
"login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;;
|
name="$(get_process_name "$parent")"
|
||||||
"ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;;
|
case "${name// }" in
|
||||||
"gnome-terminal-") term="gnome-terminal" ;;
|
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
|
||||||
*) term="${name##*/}" ;;
|
"login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;;
|
||||||
esac
|
"ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;;
|
||||||
|
"gnome-terminal-") term="gnome-terminal" ;;
|
||||||
|
*) term="${name##*/}" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Log that the function was run.
|
# Log that the function was run.
|
||||||
|
|
Loading…
Reference in a new issue