Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
ab1e05ad
Commit
ab1e05ad
authored
Jun 03, 2017
by
Herdiansyah
Committed by
GitHub
Jun 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #740 from konimex/ssh
Terminal: Disable terminal detection if device is connected over SSH
parents
56fa0a56
b355096f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
CHANGELOG.md
CHANGELOG.md
+1
-0
neofetch
neofetch
+13
-9
No files found.
CHANGELOG.md
View file @
ab1e05ad
...
...
@@ -46,6 +46,7 @@
-
Added font support for mate-terminal.
**[@mstraube](https://github.com/mstraube)**
-
[
Termite
]
Fix font mismatch.
**[@MatthewCox](https://github.com/MatthewCox)**
-
Use
`$SSH_TTY`
for terminal detection if machine is connected via SSH.
**GPU**
...
...
neofetch
View file @
ab1e05ad
...
...
@@ -1648,15 +1648,19 @@ get_term() {
# Check
$PPID
for terminal emulator.
while [[ -z "
$term
" ]]; do
parent="
$(
get_ppid
"
$parent
"
)
"
name="
$(
get_process_name
"
$parent
"
)
"
case "
${
name
//
}
" in
"
${
SHELL
/*\/
}
" | *"
sh
" | "
tmux
"* | "
screen
" | "
su
"*) ;;
"
login
"* | *"
Login
"* | "
init
" | "
(
init
)
") term="
$(
tty
)
" ;;
"
ruby
" | "
1
" | "
systemd
" | "
sshd
"* | "
python
"* | "
USER
"*"
PID
"*) break ;;
"
gnome-terminal-
") term="
gnome-terminal
" ;;
*) term="
${
name
##*/
}
" ;;
esac
if [[ "
$SSH_CONNECTION
" ]]; then
term="
$SSH_TTY
"
else
parent="
$(
get_ppid
"
$parent
"
)
"
name="
$(
get_process_name
"
$parent
"
)
"
case "
${
name
//
}
" in
"
${
SHELL
/*\/
}
" | *"
sh
" | "
tmux
"* | "
screen
" | "
su
"*) ;;
"
login
"* | *"
Login
"* | "
init
" | "
(
init
)
") term="
$(
tty
)
" ;;
"
ruby
" | "
1
" | "
systemd
" | "
sshd
"* | "
python
"* | "
USER
"*"
PID
"*) break ;;
"
gnome-terminal-
") term="
gnome-terminal
" ;;
*) term="
${
name
##*/
}
" ;;
esac
fi
done
# Log that the function was run.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment